From f0f62f2e298a1eaa2e6d09ddb18a33c985e3bfeb Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Mon, 27 Oct 2014 23:59:47 -0500 Subject: Always set sysroot for Xcode-only systems Fixes #33431. --- Library/Homebrew/extend/ENV/super.rb | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'Library/Homebrew') 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 -- cgit v1.2.3