We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents e27f9b0 + d77cf57 commit 1cfa1c1Copy full SHA for 1cfa1c1
1 file changed
ext/sqlite3/extconf.rb
@@ -51,7 +51,11 @@ def configure_packaged_libraries
51
minimal_recipe.tap do |recipe|
52
recipe.configure_options += ["--enable-shared=no", "--enable-static=yes"]
53
ENV.to_h.tap do |env|
54
- env["CFLAGS"] = [env["CFLAGS"], "-fPIC"].join(" ") # needed for linking the static library into a shared library
+ additional_cflags = [
55
+ "-fPIC", # needed for linking the static library into a shared library
56
+ "-O2", # see https://github.com/sparklemotion/sqlite3-ruby/issues/335 for some benchmarks
57
+ ]
58
+ env["CFLAGS"] = [env["CFLAGS"], additional_cflags].flatten.join(" ")
59
recipe.configure_options += env.select { |k,v| ENV_ALLOWLIST.include?(k) }
60
.map { |key, value| "#{key}=#{value.strip}" }
61
end
0 commit comments