Add ENV.refurbish_args helper

Rationale: our arg refurbishment is normally only turned on when
called via the `make` wrapper, for compatibility reasons. However,
there are numberous places we'd like this to be turned on elsewhere,
like software that builds via `python setup.py` where bad flags from
the system python can be pulled in.

This helper appends 'O' to CCCFG, which enables refurbishment for
all calls of the compiler shims.
This commit is contained in:
Misty De Meo 2014-03-20 15:20:27 -07:00
parent 05d759606a
commit 0ec7e39287
2 changed files with 7 additions and 0 deletions

View File

@ -359,4 +359,7 @@ module Stdenv
Hardware::CPU.cores
end
end
# This method does nothing in stdenv since there's no arg refurbishment
def refurbish_args; end
end

View File

@ -295,6 +295,10 @@ module Superenv
end
end
def refurbish_args
append 'HOMEBREW_CCCFG', "O", ''
end
# m32 on superenv does not add any CC flags. It prevents "-m32" from being erased.
def m32
append 'HOMEBREW_CCCFG', "3", ''