Extract archflags method from cflags method
This commit is contained in:
parent
8b7ddc1fed
commit
16d2429703
@ -185,7 +185,7 @@ class Cmd
|
|||||||
args << '-march=native' if tool =~ /clang/
|
args << '-march=native' if tool =~ /clang/
|
||||||
end
|
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 << "-std=#{@arg0}" if @arg0 =~ /c[89]9/
|
||||||
args
|
args
|
||||||
end
|
end
|
||||||
@ -196,6 +196,11 @@ class Cmd
|
|||||||
args << '-stdlib=libstdc++' if cccfg? 'h'
|
args << '-stdlib=libstdc++' if cccfg? 'h'
|
||||||
args
|
args
|
||||||
end
|
end
|
||||||
|
def archflags
|
||||||
|
args = []
|
||||||
|
ENV['HOMEBREW_ARCHS'].split(',').each { |a| args << "-arch" << a } if cccfg? 'u'
|
||||||
|
args
|
||||||
|
end
|
||||||
def syslibpath
|
def syslibpath
|
||||||
# We reject brew's lib as we explicitly add this as a -L flag, thus it
|
# 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.
|
# is given higher priority by cc, so it surpasses the system libpath.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user