diff --git a/ext/extconf.rb b/ext/extconf.rb index 6d925dab..259bdcfd 100644 --- a/ext/extconf.rb +++ b/ext/extconf.rb @@ -24,12 +24,7 @@ $CXXFLAGS << ' -march=native -mtune=native' end -# darwin nix clang doesn't support lto -# disable -lto flag for darwin + nix -# see: https://github.com/sass/sassc-ruby/issues/148 -enable_lto_by_default = (Gem::Platform.local.os == "darwin" && ENV['NIX_CC'].nil?) - -if enable_config('lto', enable_lto_by_default) +if enable_config('lto', true) $CFLAGS << ' -flto' $CXXFLAGS << ' -flto' $LDFLAGS << ' -flto'