diff options
| author | Misty De Meo | 2013-08-02 22:28:55 -0700 |
|---|---|---|
| committer | Misty De Meo | 2013-08-15 22:46:57 -0700 |
| commit | 1586a69879a900ca1677da3c8ac0fe1cdc570932 (patch) | |
| tree | 0533a0584ddd7951a1ab741cc028eb92c051bdce /Library | |
| parent | a892e52bfc441f267ee01511d7ee454de70a8350 (diff) | |
| download | brew-1586a69879a900ca1677da3c8ac0fe1cdc570932.tar.bz2 | |
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.
Diffstat (limited to 'Library')
| -rwxr-xr-x | Library/ENV/4.3/cc | 2 | ||||
| -rw-r--r-- | Library/Homebrew/superenv.rb | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/Library/ENV/4.3/cc b/Library/ENV/4.3/cc index fcba40263..561df96d7 100755 --- a/Library/ENV/4.3/cc +++ b/Library/ENV/4.3/cc @@ -165,7 +165,7 @@ class Cmd args << '-march=native' if tool =~ /clang/ 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 end diff --git a/Library/Homebrew/superenv.rb b/Library/Homebrew/superenv.rb index ace71a33f..31f6da620 100644 --- a/Library/Homebrew/superenv.rb +++ b/Library/Homebrew/superenv.rb @@ -86,6 +86,7 @@ class << ENV end def universal_binary + ENV['HOMEBREW_ARCHS'] = Hardware::CPU.universal_archs.join(',') append 'HOMEBREW_CCCFG', "u", '' end |
