aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2013-11-12 12:00:17 -0600
committerJack Nagel2013-11-12 13:53:29 -0600
commit1f2873fc5cb97efef5927eb100eef41447129bba (patch)
tree0d9a71c7041a5c7e504c38c8db2c738a7a27f98e /Library
parentdca614b7c832774f29385ba3abd589f57e40bcae (diff)
downloadhomebrew-1f2873fc5cb97efef5927eb100eef41447129bba.tar.bz2
Extract archflags method from cflags method
Diffstat (limited to 'Library')
-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.