forked from OSchip/llvm-project
Fix compiler-rt build on macOS without XCode
Summary:
Starting with 8a5bfbe6db
(D68292) this file
unconditionally uses xcodebuild to get the SDK version. On my system this
always fails with
`xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance`
Reviewers: delcypher, yln
Reviewed By: delcypher, yln
Subscribers: dberris, mgorny, #sanitizers, llvm-commits
Tags: #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D69610
This commit is contained in:
parent
54a873b158
commit
52beec76de
|
@ -49,7 +49,7 @@ function(find_darwin_sdk_version var sdk_name)
|
|||
if(NOT DARWIN_PREFER_PUBLIC_SDK)
|
||||
# Let's first try the internal SDK, otherwise use the public SDK.
|
||||
execute_process(
|
||||
COMMAND xcodebuild -version -sdk ${sdk_name}.internal SDKVersion
|
||||
COMMAND xcrun --sdk ${sdk_name}.internal --show-sdk-version
|
||||
RESULT_VARIABLE result_process
|
||||
OUTPUT_VARIABLE var_internal
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
|
@ -58,7 +58,7 @@ function(find_darwin_sdk_version var sdk_name)
|
|||
endif()
|
||||
if((NOT ${result_process} EQUAL 0) OR "" STREQUAL "${var_internal}")
|
||||
execute_process(
|
||||
COMMAND xcodebuild -version -sdk ${sdk_name} SDKVersion
|
||||
COMMAND xcrun --sdk ${sdk_name} --show-sdk-version
|
||||
RESULT_VARIABLE result_process
|
||||
OUTPUT_VARIABLE var_internal
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
|
|
Loading…
Reference in New Issue