[PATCH] D69610: Fix compiler-rt build on macOS without XCode

Alexander Richardson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 31 04:39:56 PDT 2019


arichardson updated this revision to Diff 227262.
arichardson added a comment.

Use xcrun instead of xcodebuild


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D69610/new/

https://reviews.llvm.org/D69610

Files:
  compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake


Index: compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake
===================================================================
--- compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake
+++ compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake
@@ -49,7 +49,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 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 @@
   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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D69610.227262.patch
Type: text/x-patch
Size: 1003 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191031/5af547de/attachment.bin>


More information about the llvm-commits mailing list