aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Nagel2013-11-12 12:00:17 -0600
committerJack Nagel2013-11-12 13:53:29 -0600
commit16d242970376e6944191a038b3b259c0ecfb29d1 (patch)
tree983ba5d4e2d7b20aae761d8fdb8ae16166f6d859
parent8b7ddc1fed6af65ddbdfa9b646a1f7cfcf6019ed (diff)
downloadbrew-16d242970376e6944191a038b3b259c0ecfb29d1.tar.bz2
Extract archflags method from cflags method
-rwxr-xr-xLibrary/ENV/4.3/cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/Library/ENV/4.3/cc b/Library/ENV/4.3/cc
index 1c1f3adce..cd77caf0b 100755
--- a/Library/ENV/4.3/cc
+++ b/Library/ENV/4.3/cc
@@ -185,7 +185,7 @@ class Cmd
args << '-march=native' if tool =~ /clang/
end
- ENV['HOMEBREW_ARCHS'].split(',').each { |a| args << "-arch" << a } if cccfg? 'u'
+ args.concat(archflags)
args << "-std=#{@arg0}" if @arg0 =~ /c[89]9/
args
end
@@ -196,6 +196,11 @@ class Cmd
args << '-stdlib=libstdc++' if cccfg? 'h'
args
end
+ def archflags
+ args = []
+ ENV['HOMEBREW_ARCHS'].split(',').each { |a| args << "-arch" << a } if cccfg? 'u'
+ args
+ end
def syslibpath
# We reject brew's lib as we explicitly add this as a -L flag, thus it
# is given higher priority by cc, so it surpasses the system libpath.