From 48cd833a15eaedcc7ec33244f00066c4c940f01e Mon Sep 17 00:00:00 2001 From: Misty De Meo Date: Tue, 29 Apr 2014 19:11:34 -0700 Subject: [PATCH] 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. --- Library/Homebrew/extend/ENV/super.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/extend/ENV/super.rb b/Library/Homebrew/extend/ENV/super.rb index a0efec4536..940cc36d2a 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