We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 140bfd8 + eb02996 commit 275fe38Copy full SHA for 275fe38
ext/extconf.rb
@@ -24,7 +24,12 @@
24
$CXXFLAGS << ' -march=native -mtune=native'
25
end
26
27
-if enable_config('lto', true)
+# darwin nix clang doesn't support lto
28
+# disable -lto flag for darwin + nix
29
+# see: https://github.com/sass/sassc-ruby/issues/148
30
+enable_lto_by_default = (Gem::Platform.local.os == "darwin" && !ENV['NIX_CC'].nil?)
31
+
32
+if enable_config('lto', enable_lto_by_default)
33
$CFLAGS << ' -flto'
34
$CXXFLAGS << ' -flto'
35
$LDFLAGS << ' -flto'
0 commit comments