From 3d3e874c680718c2f39fe407b3c6392fd3964dac Mon Sep 17 00:00:00 2001 From: ilovezfs Date: Wed, 30 Mar 2016 05:13:41 -0700 Subject: [PATCH] More comments on SDK handling for >= Xcode 7 Closes Homebrew/homebrew#50537. Signed-off-by: ilovezfs --- Library/Homebrew/os/mac.rb | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/Library/Homebrew/os/mac.rb b/Library/Homebrew/os/mac.rb index 096cfb24b1..af27911ebb 100644 --- a/Library/Homebrew/os/mac.rb +++ b/Library/Homebrew/os/mac.rb @@ -86,10 +86,22 @@ module OS @active_developer_dir ||= Utils.popen_read("/usr/bin/xcode-select", "-print-path").strip end - # Returns the requested SDK, if installed. - # If the requested SDK is not installed returns either: - # a) The newest SDK (if any SDKs are available), or - # b) nil + # If a specific SDK is requested + # a) The requested SDK is returned, if it's installed. + # b) If the requested SDK is not installed, the newest SDK (if any SDKs + # are available) is returned. + # c) If no SDKs are available, nil is returned. + # If no specific SDK is requested + # a) For Xcode >= 7, the latest SDK is returned even if the latest SDK is + # named after a newer OS version than the running OS. The + # MACOSX_DEPLOYMENT_TARGET must be set to the OS for which you're + # actually building (usually the running OS version). + # https://github.com/Homebrew/homebrew/pull/50355 + # https://developer.apple.com/library/ios/documentation/DeveloperTools/Conceptual/WhatsNewXcode/Articles/Introduction.html#//apple_ref/doc/uid/TP40004626 + # Section "About SDKs and Simulator" + # b) For Xcode < 7, proceed as if the SDK for the running OS version had + # specifically been requested according to the rules above. + def sdk(v = nil) @locator ||= SDKLocator.new begin