MacOS.sdk: return newest SDK if requested not found
`MacOS.sdk` and `.sdk_path` will now return the newest installed SDK instead of nil if called on a system that doesn’t have an SDK for the currently-installed OS. For example, Xcode 7 on OS X 10.10 does not include the 10.10 SDK, only the 10.11 SDK; software can be built by specifying both SDKROOT and MACOSX_DEPLOYMENT_TARGET.
This commit is contained in:
parent
3a1d7e7259
commit
48bdd4811e
@ -89,6 +89,9 @@ module OS
|
||||
begin
|
||||
@locator.sdk_for v
|
||||
rescue SDKLocator::NoSDKError
|
||||
sdk = @locator.latest_sdk
|
||||
# don't return an SDK that's older than the OS version
|
||||
sdk unless sdk.nil? || sdk.version < version
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user