-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Set CMAKE_SYSTEM_NAME when cross-compiling #75376
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
7697599
to
d57b923
Compare
@Mark-Simulacrum I would appreciate the review of this, to unblock #74576, where incorrect evaluation of CMAKE_SYSTEM_NAME breaks the tsan build. Thanks. |
https://cmake.org/cmake/help/latest/variable/CMAKE_SYSTEM_NAME.html seems to indicate that we should also be setting CMAKE_SYSTEM_VERSION - is that not the case? |
Yes, I would expect that should be done as well. Fixing this might be non-trivial since rustc targets do not include version. |
Seems reasonable. r=me with a comment added about the version not being set and our belief that not setting it should be fine (basically your last comment inserted into the code). |
Configure CMAKE_SYSTEM_NAME when cross-compiling in `configure_cmake`, to tell CMake about target system. Previously this was done only for LLVM step and now applies more generally to steps using cmake.
d57b923
to
91f87bc
Compare
Added a comment about CMAKE_SYSTEM_VERSION. |
@bors r+ |
📌 Commit 91f87bc has been approved by |
Rollup of 4 pull requests Successful merges: - rust-lang#75376 (Set CMAKE_SYSTEM_NAME when cross-compiling) - rust-lang#75448 (merge `as_local_hir_id` with `local_def_id_to_hir_id`) - rust-lang#75513 (Recover gracefully from `struct` parse errors) - rust-lang#75545 (std/sys/unix/time: make it easier for LLVM to optimize `Instant` subtraction.) Failed merges: - rust-lang#75514 (Replaced `log` with `tracing`) r? @ghost
Configure CMAKE_SYSTEM_NAME when cross-compiling in
configure_cmake
,to tell CMake about target system. Previously this was done only for
LLVM step and now applies more generally to steps using cmake.
Helps with #74576.