add guard in Formula#file_modified? to prevent git popup
add guard in Superenv.bin before calling MacOS::Xcode.version
add guard against missing Xcode/CLT in Xcode.uncached_version
return nil instread of 0 in uncached_version when Xcode/CLT are not present, to distinguish from linuxbrew behavior
checks against pour_bottle? and needs_relocation?, add guard around keg.relocate_install_names to check pour_bottle?/needs_relocation? as well
needs_relocation? becomes skip_relocation?, use cellar attr to indicate relocation instead of does_not_need_relocation
MacOS.can_build? becomes MacOS.has_apple_developer_tools?
It's not clear whether it returns MAKEFLAGS with or without -j<n>, and
neither is particularly useful behavior, given you can easily get the
exact value by calling ENV["MAKEFLAGS"]. So let's not commit to this
API.
This code originated in a slightly different form in 8e88b22fd1ec65a344ce6e4facd6dad4b415b2ad:
8e88b22fd1/Library/Homebrew/extend/ENV.rb (L30-L32)
Back then, MacOS.default_compiler could return nil, which meant
ENV.compiler could do the same. This code was carried forward as the
surrounding code changed. At this point it should be unreachable.
On older Apple compilers "-O4" is known to cause build errors. On recent
clang, it's the same as "-O3" and you have to pass "-O3 -flto" to get
the old behavior.
It is activated by the same mechanism as the Homebrew/versions compilers
which now check if the GCC formula uses the same, correct version.
References Homebrew/homebrew#28418.
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 raise happened in no other ENV methods, and isn't really necessary
since fails_with guards against this method actually being called unless
gcc-4.2 is actually installed.
Since ENV.cc/cxx are accessors to ENV, any values being passed through
are coerced into strings, which means that a nil `ENV.cc` is actually
an empty string - which isn't considered to be false in Ruby.
Fixesmistydemeo/tigerbrew#161.
Fixesmistydemeo/tigerbrew#135.
The mapping of architectures to optimization flags is now retrieved from
Hardware::CPU and the selected flags are passed as an environmen
variable, rather than duplicated in the cc wrapper and re-calculated on
every invocation of the compiler.
ClosesHomebrew/homebrew#24540.
* Don't encode "-Qunused-arguments", as this is only supported in Clang
and will break building when C/C++ compiler is switched during the
process, e.g. building gcc. The warning is harmless without
"-Werror".
* Add new ENV function for selecting stdlib for Clang.
- The selection is no-op for non-system-clang compilers.
- Both superenv and stdenv are handled.
* Add new HOMEBREW_CCCFG flag and ccwrapper handling.
* Add options and ENV method to specify building in C++11 mode.
- Set C++ compiler flags to enable C++11 mode.
- To add options to support C++11 mode, a formula can now use
option :cxx11
to provide "--c++11" option, and detect and enable C++11 support in
install method using
ENV.cxx11 if build.cxx11?
ClosesHomebrew/homebrew#22453.