Skip to content

Commit

Permalink
feat(build): default to --disable-static on TruffleRuby
Browse files Browse the repository at this point in the history
* Shared libraries are more flexible and compile faster, see
  https://github.com/Shopify/oracle-truffleruby-collab/issues/11
* Static libraries can still be chosen (e.g., for testing) with:
  gem install nokogiri -- --use-system-libraries=false --enable-static

Co-authored-by: Benoit Daloze <eregontp@gmail.com>
  • Loading branch information
flavorjones and eregon committed Mar 9, 2021
1 parent d30f4d6 commit bf56b45
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ext/nokogiri/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,8 @@ def config_clean?
end

def config_static?
enable_config("static", true)
default_static = !truffle?
enable_config("static", default_static)
end

def config_cross_build?
Expand Down Expand Up @@ -191,6 +192,10 @@ def nix?
!(windows? || solaris? || darwin?)
end

def truffle?
::RUBY_ENGINE == 'truffleruby'
end

def concat_flags(*args)
args.compact.join(" ")
end
Expand Down

0 comments on commit bf56b45

Please sign in to comment.