-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade cmake to v0.1.50 #124887
Upgrade cmake to v0.1.50 #124887
Conversation
rustbot has assigned @albertlarsan68. Use |
I hope this will be much easier than @bors r+ rollup=never |
Upgrade cmake to v0.1.50 This is the latest version. Now that the cc crate has been successfully upgraded, we should upgrade cmake as well, as v0.1.48 is now over 2 years old.
This comment has been minimized.
This comment has been minimized.
💔 Test failed - checks-actions |
This is the latest version. Now that the cc crate has been successfully upgraded, we should upgrade cmake as well, as v0.1.48 is now over 2 years old. cmake v1.0.49 requires CMAKE_SYSTEM_NAME to be set when cross-compiling, so ensure that we do this for supported Apple OSes.
This PR changes how LLVM is built. Consider updating src/bootstrap/download-ci-llvm-stamp. |
Try CI again? |
fyi I missed the PR due to "S-waiting-on-author" label. @bors r+ |
Upgrade cmake to v0.1.50 This is the latest version. Now that the cc crate has been successfully upgraded, we should upgrade cmake as well, as v0.1.48 is now over 2 years old. cmake v1.0.49 requires CMAKE_SYSTEM_NAME to be set when cross-compiling, so ensure that we do this for supported Apple OSes.
The job Click to see the possible cause of the failure (guessed by this bot)
|
💔 Test failed - checks-actions |
@bors rollup=never |
The result of these two changes is that when running cmake, we add These two seem to interact badly with some built-in cmake logic. On my system, /usr/share/cmake-3.28/Modules/Platform/Darwin-Initialize.cmake has logic based on CMAKE_OSX_SYSROOT: if(CMAKE_OSX_SYSROOT)
# Use the existing value without further computation to choose a default.
set(_CMAKE_OSX_SYSROOT_DEFAULT "${CMAKE_OSX_SYSROOT}")
elseif(NOT "x$ENV{SDKROOT}" STREQUAL "x" AND
(NOT "x$ENV{SDKROOT}" MATCHES "/" OR IS_DIRECTORY "$ENV{SDKROOT}"))
# Use the value of SDKROOT from the environment.
set(_CMAKE_OSX_SYSROOT_DEFAULT "$ENV{SDKROOT}")
elseif(CMAKE_SYSTEM_NAME STREQUAL iOS)
set(_CMAKE_OSX_SYSROOT_DEFAULT "iphoneos")
elseif(CMAKE_SYSTEM_NAME STREQUAL tvOS)
set(_CMAKE_OSX_SYSROOT_DEFAULT "appletvos")
# etc. Then, later on: # Transform CMAKE_OSX_SYSROOT to absolute path
set(_CMAKE_OSX_SYSROOT_PATH "")
if(CMAKE_OSX_SYSROOT)
if("x${CMAKE_OSX_SYSROOT}" MATCHES "/")
# This is a path to the SDK. Make sure it exists.
if(NOT IS_DIRECTORY "${CMAKE_OSX_SYSROOT}")
message(WARNING "Ignoring CMAKE_OSX_SYSROOT value:\n ${CMAKE_OSX_SYSROOT}\n"
"because the directory does not exist.")
set(CMAKE_OSX_SYSROOT "")
endif()
set(_CMAKE_OSX_SYSROOT_PATH "${CMAKE_OSX_SYSROOT}")
else()
_apple_resolve_sdk_path(${CMAKE_OSX_SYSROOT} _sdk_path)
if(IS_DIRECTORY "${_sdk_path}")
set(_CMAKE_OSX_SYSROOT_PATH "${_sdk_path}")
# For non-Xcode generators use the path.
if(NOT "${CMAKE_GENERATOR}" MATCHES "Xcode")
set(CMAKE_OSX_SYSROOT "${_CMAKE_OSX_SYSROOT_PATH}")
endif()
endif()
endif()
endif() This gets triggered from /usr/share/cmake-3.28/Modules/Platform/iOS-Initialize.cmake, which begins: include(Platform/Darwin-Initialize)
if(NOT _CMAKE_OSX_SYSROOT_PATH MATCHES "/iPhone(OS|Simulator)")
message(FATAL_ERROR "${CMAKE_OSX_SYSROOT} is not an iOS SDK")
endif() So what seem to be happening is
|
Note to future someone: Cmake caching makes this one hard to debug. You need to blow away build/aarch64-apple-ios/native/sanitizers between builds. |
@bors r- (manually r- because the tree looks wonky with some PRs that shouldn't be elligble for rollup) |
@jfgoog any updates on this? thanks |
I wasn't able to get it to work, and had to move on. I think I put all the stuff I figured out in this CL, so I hope it will be useful to someone else who wants to give it a try. |
@Dylan-DPC Should we close PR if author is not interesting in proceeding? |
@alex-semenyuk yes. Will close this one :) |
This is the latest version. Now that the cc crate has been successfully upgraded, we should upgrade cmake as well, as v0.1.48 is now over 2 years old.
cmake v1.0.49 requires CMAKE_SYSTEM_NAME to be set when cross-compiling, so ensure that we do this for supported Apple OSes.