diff options
| author | Jack Nagel | 2014-05-06 15:21:01 -0500 | 
|---|---|---|
| committer | Jack Nagel | 2014-05-06 18:55:04 -0500 | 
| commit | c7409f3e90afe8b4a22f50d880cdca54740babbe (patch) | |
| tree | f014d7abec67173ea4b500fd70faeb579cd93357 | |
| parent | 400e6a38edd1d1637d6dd8423b6c3787a419c500 (diff) | |
| download | homebrew-c7409f3e90afe8b4a22f50d880cdca54740babbe.tar.bz2 | |
Preserve -Xarch_<arch> context when filtering args
| -rwxr-xr-x | Library/ENV/4.3/cc | 15 | 
1 files changed, 12 insertions, 3 deletions
| diff --git a/Library/ENV/4.3/cc b/Library/ENV/4.3/cc index e9f8d4139..2f5094c55 100755 --- a/Library/ENV/4.3/cc +++ b/Library/ENV/4.3/cc @@ -125,7 +125,18 @@ class Cmd      enum = @args.each      loop do -      args += refurbish_arg(enum.next, enum) +      case arg = enum.next +      when "-arch" +        enum.next +      when /^-Xarch_/ +        refurbished = refurbish_arg(enum.next, enum) +        unless refurbished.empty? +          args << arg +          args += refurbished +        end +      else +        args += refurbish_arg(arg, enum) +      end      end      args @@ -135,8 +146,6 @@ class Cmd      args = []      case arg -    when '-arch', /^-Xarch_/ -      enum.next      when '-m32'        # If ENV.m32 was set, we allow the "-m32" flag, but we don't add anything        args << '-m32' if cccfg? '3' | 
