[PATCH] D69659: [compiler-rt] Use xcrun instead of xcodebuild to find the SDK directory
Phabricator via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 31 14:24:46 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rG8baedb82bafe: [compiler-rt] Use xcrun instead of xcodebuild to find the SDK directory (authored by Alex Richardson <Alexander.Richardson at cl.cam.ac.uk>).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D69659/new/
https://reviews.llvm.org/D69659
Files:
compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake
compiler-rt/cmake/config-ix.cmake
Index: compiler-rt/cmake/config-ix.cmake
===================================================================
--- compiler-rt/cmake/config-ix.cmake
+++ compiler-rt/cmake/config-ix.cmake
@@ -316,6 +316,7 @@
find_darwin_sdk_dir(DARWIN_tvos_SYSROOT appletvos)
if(NOT DARWIN_osx_SYSROOT)
+ message(WARNING "Could not determine OS X sysroot, trying /usr/include")
if(EXISTS /usr/include)
set(DARWIN_osx_SYSROOT /)
else()
Index: compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake
===================================================================
--- compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake
+++ compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake
@@ -18,7 +18,7 @@
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 Path
+ COMMAND xcrun --sdk ${sdk_name}.internal --show-sdk-path
RESULT_VARIABLE result_process
OUTPUT_VARIABLE var_internal
OUTPUT_STRIP_TRAILING_WHITESPACE
@@ -27,7 +27,7 @@
endif()
if((NOT result_process EQUAL 0) OR "" STREQUAL "${var_internal}")
execute_process(
- COMMAND xcodebuild -version -sdk ${sdk_name} Path
+ COMMAND xcrun --sdk ${sdk_name} --show-sdk-path
RESULT_VARIABLE result_process
OUTPUT_VARIABLE var_internal
OUTPUT_STRIP_TRAILING_WHITESPACE
@@ -39,6 +39,7 @@
if(result_process EQUAL 0)
set(${var} ${var_internal} PARENT_SCOPE)
endif()
+ message(STATUS "Checking DARWIN_${sdk_name}_SYSROOT - '${var_internal}'")
set(DARWIN_${sdk_name}_CACHED_SYSROOT ${var_internal} CACHE STRING "Darwin SDK path for SDK ${sdk_name}." FORCE)
endfunction()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D69659.227345.patch
Type: text/x-patch
Size: 1740 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191031/ffa75189/attachment.bin>
More information about the llvm-commits
mailing list