Extract archflags method from cflags method

This commit is contained in:
Jack Nagel committed 2013-11-12 13:53:29 -06:00
1 parent dca614b7c8
commit 1f2873fc5c
1 file changed
+6 -1
+6 -1
View File
@@ -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.