Skip to content
Snippets Groups Projects
Unverified Commit 706e7e71 authored by Dominyk Tiller's avatar Dominyk Tiller
Browse files

mac/super: restore definition of effective_sysroot

In https://github.com/Homebrew/brew/commit/0d189fae57bad6c209b471eba9e0b254a2b40886
we completely removed `effective_sysroot`, which consequently left all the
`effective_sysroot`/usr/include calls pointing at `/usr/include`. This is wildly
problematic on systems where the Command Line Tools aren't installed because
`/usr/include` is not a default-created folder prior to CLT installation.

I'm unsure if `effective_sysroot` should still be mentioned in Library/Homebrew/extend/ENV/super.rb
at all. If it can be deleted, feel free to do that without waiting for me to review.

This seems to fix:
* https://github.com/Homebrew/homebrew-core/issues/2991
* https://github.com/Homebrew/homebrew-core/issues/2986
* https://github.com/Homebrew/homebrew-core/issues/2962
parent f6dad377
No related branches found
No related tags found
No related merge requests found
......@@ -7,6 +7,10 @@ module Superenv
bin.realpath unless bin.nil?
end
def effective_sysroot
MacOS::Xcode.without_clt? ? MacOS.sdk_path.to_s : nil
end
def homebrew_extra_paths
paths = []
# On 10.9, there are shims for all tools in /usr/bin.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment