Skip to content

Commit

Permalink
Add manually overriding of the darwin SDK version
Browse files Browse the repository at this point in the history
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
  • Loading branch information
vchuravy committed Mar 31, 2020
1 parent a76e68c commit cba15d1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake
Expand Up @@ -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.
Expand Down

0 comments on commit cba15d1

Please sign in to comment.