aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMisty De Meo2014-04-29 19:11:34 -0700
committerMisty De Meo2014-04-30 08:21:54 -0700
commit48cd833a15eaedcc7ec33244f00066c4c940f01e (patch)
treebc305dce4d333b8eec3f7cca39bbea44fc108f08 /Library
parentec852045b14029557e6d27d91e5eab8167803397 (diff)
downloadbrew-48cd833a15eaedcc7ec33244f00066c4c940f01e.tar.bz2
Superenv: determine_optflags should return a string
This is saved in HOMEBREW_OPTFLAGS and later mutated by ENV.universal_binary, so if this returns nil the sub will fail.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/extend/ENV/super.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/Library/Homebrew/extend/ENV/super.rb b/Library/Homebrew/extend/ENV/super.rb
index a0efec453..940cc36d2 100644
--- a/Library/Homebrew/extend/ENV/super.rb
+++ b/Library/Homebrew/extend/ENV/super.rb
@@ -207,8 +207,11 @@ module Superenv
Hardware::CPU.optimization_flags.fetch(arch)
elsif Hardware::CPU.intel? && !Hardware::CPU.sse4?
Hardware::CPU.optimization_flags.fetch(Hardware.oldest_cpu)
+ elsif compiler == :clang
+ "-march=native"
+ # This is mutated elsewhere, so return an empty string in this case
else
- "-march=native" if compiler == :clang
+ ""
end
end