The experiment to add `-no_weak_imports` unconditionally has been a bit
of a failure. It's broken more than it's fixed and I don't think we can
have this as a default for Xcode 8.
Add `ENV.no_weak_imports` to be used by formulae authors and make
`ENV.no_weak_imports a no-op (for now).
We may reconsider this behaviour in future.
The `build` and `source_modified_time` arguments are always coming from
the matching attributes of the `Formula` instance. Thus query `formula`
for them instead of passing them individually.
Also enables sandbox for --interactive and --debug use of install
and test, using automatic retention.
Closes#66.
Signed-off-by: Andrew Janke <andrew@apjanke.net>
This came up in https://github.com/Homebrew/homebrew-emacs/pull/158#issuecomment-172031003; `install_metafiles` is passed the current directory, which can be changed during installation by `Dir.chdir`.
There may be cases where the metafiles are in a subdirectory, but my
guess is those are rare and this is brittle and undocumented behavior
anyway.
I want to decouple from the global ENV constant as much as possible so
that eventually we can change the build environment implementation.
detect_stdlibs only cares about the compiler, not the whole ENV.
Dependency is another similar, related class and it's super confusing
to have some Requirements that are named *Dependency.
ClosesHomebrew/homebrew#38891.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This is a more standard way to pass fd in UNIX world.
At the same time, it helps to remove a few hacks and
simplifies the code in the sandbox.
ClosesHomebrew/homebrew#38434.
Signed-off-by: Xu Cheng <xucheng@me.com>
This is a follow-up of Homebrew/homebrew#37734. I think we should treat `install_metafiles` as
a general issue rather than a formula-specific one.
ClosesHomebrew/homebrew#37968.
Signed-off-by: Xu Cheng <xucheng@me.com>
Since the Tab is written in the build process, the formula's build
object will have the correct args attached to it already, so we don't
need to reconstruct it.
Symlinks in opt and LinkedKegs point directly at a keg in the cellar, so
only resolving one symlink should suffice, and make it clear what path
we are actually interested in.