[compiler-rt] cba15d1 - Add manually overriding of the darwin SDK version
Valentin Churavy via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 31 09:55:11 PDT 2020
Author: Valentin Churavy
Date: 2020-03-31T12:54:56-04:00
New Revision: cba15d1b5c5416402ca47ceec2acbbc62f760228
URL: https://github.com/llvm/llvm-project/commit/cba15d1b5c5416402ca47ceec2acbbc62f760228
DIFF: https://github.com/llvm/llvm-project/commit/cba15d1b5c5416402ca47ceec2acbbc62f760228.diff
LOG: Add manually overriding of the darwin SDK version
Summary:
When doing cross-compilation from Linux to MacOS we don't have
access to have access to `xcodebuild` and therefore need a way
to set the SDK version from the outside.
Fixes https://reviews.llvm.org/D68292#1853594 for me.
Reviewers: delcypher, yln
Reviewed By: delcypher
Subscribers: #julialang, mgorny, #sanitizers
Tags: #sanitizers
Differential Revision: https://reviews.llvm.org/D77026
Added:
Modified:
compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake
Removed:
################################################################################
diff --git a/compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake b/compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake
index 9f501a61c4b6..657d2c97eac8 100644
--- a/compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake
+++ b/compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake
@@ -44,8 +44,11 @@ function(find_darwin_sdk_dir var sdk_name)
endfunction()
function(find_darwin_sdk_version var sdk_name)
- # We deliberately don't cache the result here because
- # CMake's caching causes too many problems.
+ if (DARWIN_${sdk_name}_OVERRIDE_SDK_VERSION)
+ message(WARNING "Overriding ${sdk_name} SDK version to ${DARWIN_${sdk_name}_OVERRIDE_SDK_VERSION}")
+ set(${var} "${DARWIN_${sdk_name}_OVERRIDE_SDK_VERSION}" PARENT_SCOPE)
+ return()
+ endif()
set(result_process 1)
if(NOT DARWIN_PREFER_PUBLIC_SDK)
# Let's first try the internal SDK, otherwise use the public SDK.
More information about the llvm-commits
mailing list