superenv: use Hardware::CPU.universal_archs
This defines the new HOMEBREW_ARCHS environment variable, which is currently only set during universal builds, so that the tool wrappers no longer need to hardcode i386/x86_64.
This commit is contained in:
parent
a892e52bfc
commit
1586a69879
@ -165,7 +165,7 @@ class Cmd
|
|||||||
args << '-march=native' if tool =~ /clang/
|
args << '-march=native' if tool =~ /clang/
|
||||||
end
|
end
|
||||||
|
|
||||||
args += %w{-arch i386 -arch x86_64} if cccfg? 'u'
|
args += ENV['HOMEBREW_ARCHS'].split(',').map {|a| "-arch #{a}"} if cccfg? 'u'
|
||||||
args << "-std=#{@arg0}" if @arg0 =~ /c[89]9/
|
args << "-std=#{@arg0}" if @arg0 =~ /c[89]9/
|
||||||
args
|
args
|
||||||
end
|
end
|
||||||
|
|||||||
@ -86,6 +86,7 @@ class << ENV
|
|||||||
end
|
end
|
||||||
|
|
||||||
def universal_binary
|
def universal_binary
|
||||||
|
ENV['HOMEBREW_ARCHS'] = Hardware::CPU.universal_archs.join(',')
|
||||||
append 'HOMEBREW_CCCFG', "u", ''
|
append 'HOMEBREW_CCCFG', "u", ''
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user