diff options
| author | Jack Nagel | 2014-10-27 23:59:47 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-10-29 11:03:54 -0500 |
| commit | f0f62f2e298a1eaa2e6d09ddb18a33c985e3bfeb (patch) | |
| tree | 4a31cf349d2157cc8e40113abef1ed711ddafb66 /Library/Homebrew | |
| parent | d70e978c905f98cc055714b8ce711cac8e933a1b (diff) | |
| download | homebrew-f0f62f2e298a1eaa2e6d09ddb18a33c985e3bfeb.tar.bz2 | |
Always set sysroot for Xcode-only systems
Fixes #33431.
Diffstat (limited to 'Library/Homebrew')
| -rw-r--r-- | Library/Homebrew/extend/ENV/super.rb | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/Library/Homebrew/extend/ENV/super.rb b/Library/Homebrew/extend/ENV/super.rb index 31718a2b9..cb3c12b33 100644 --- a/Library/Homebrew/extend/ENV/super.rb +++ b/Library/Homebrew/extend/ENV/super.rb @@ -46,7 +46,7 @@ module Superenv self['HOMEBREW_BREW_FILE'] = HOMEBREW_BREW_FILE.to_s self['HOMEBREW_PREFIX'] = HOMEBREW_PREFIX.to_s self['HOMEBREW_TEMP'] = HOMEBREW_TEMP.to_s - self['HOMEBREW_SDKROOT'] = "#{MacOS.sdk_path}" if MacOS::Xcode.without_clt? + self['HOMEBREW_SDKROOT'] = effective_sysroot self['HOMEBREW_OPTFLAGS'] = determine_optflags self['HOMEBREW_ARCHFLAGS'] = '' self['CMAKE_PREFIX_PATH'] = determine_cmake_prefix_path @@ -59,12 +59,6 @@ module Superenv self["HOMEBREW_INCLUDE_PATHS"] = determine_include_paths self["HOMEBREW_LIBRARY_PATHS"] = determine_library_paths - # On 10.9 the developer tools honor the correct sysroot by default. - # On 10.7 and 10.8 we need to set it ourselves. - if MacOS::Xcode.without_clt? && (MacOS.version <= "10.8" || compiler != :clang) - self["HOMEBREW_SYSROOT"] = effective_sysroot - end - # On 10.9, the tools in /usr/bin proxy to the active developer directory. # This means we can use them for any combination of CLT and Xcode. self["HOMEBREW_PREFER_CLT_PROXIES"] = "1" if MacOS.version >= "10.9" @@ -96,7 +90,7 @@ module Superenv end def effective_sysroot - if MacOS::Xcode.without_clt? then MacOS.sdk_path.to_s else "" end + MacOS::Xcode.without_clt? ? MacOS.sdk_path.to_s : nil end def determine_cxx |
