aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorilovezfs2016-03-30 05:13:41 -0700
committerXu Cheng2016-03-31 13:16:50 +0800
commit3d3e874c680718c2f39fe407b3c6392fd3964dac (patch)
tree7f353a11125b153fe5225aa7c6e0fb865522cd57 /Library
parent7651757709b2eaa537cbda17271b127ed59568cf (diff)
downloadbrew-3d3e874c680718c2f39fe407b3c6392fd3964dac.tar.bz2
More comments on SDK handling for >= Xcode 7
Closes Homebrew/homebrew#50537. Signed-off-by: ilovezfs <ilovezfs@icloud.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/os/mac.rb20
1 files changed, 16 insertions, 4 deletions
diff --git a/Library/Homebrew/os/mac.rb b/Library/Homebrew/os/mac.rb
index 096cfb24b..af27911eb 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