Skip to content

Commit 9f330de

Browse files
committed
Auto merge of #124887 - jfgoog:update-cmake, r=onur-ozkan
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.
2 parents 030a12c + 4742482 commit 9f330de

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

Diff for: src/bootstrap/Cargo.lock

+2-2
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,9 @@ checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1"
157157

158158
[[package]]
159159
name = "cmake"
160-
version = "0.1.48"
160+
version = "0.1.50"
161161
source = "registry+https://github.com/rust-lang/crates.io-index"
162-
checksum = "e8ad8cef104ac57b68b89df3208164d228503abbdce70f6880ffa3d970e7443a"
162+
checksum = "a31c789563b815f77f4250caee12365734369f942439b7defd71e18a48197130"
163163
dependencies = [
164164
"cc",
165165
]

Diff for: src/bootstrap/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ test = false
3737
# bootstrap codebase(e.g., https://github.com/rust-lang/rust/issues/124565);
3838
# otherwise, some targets will fail. That's why these dependencies are explicitly pinned.
3939
cc = "=1.0.97"
40-
cmake = "=0.1.48"
40+
cmake = "=0.1.50"
4141

4242
build_helper = { path = "../tools/build_helper" }
4343
clap = { version = "4.4", default-features = false, features = ["std", "usage", "help", "derive", "error-context"] }

Diff for: src/bootstrap/src/core/build_steps/llvm.rs

+10
Original file line numberDiff line numberDiff line change
@@ -631,6 +631,16 @@ fn configure_cmake(
631631
cfg.define("CMAKE_SYSTEM_NAME", "SunOS");
632632
} else if target.contains("linux") {
633633
cfg.define("CMAKE_SYSTEM_NAME", "Linux");
634+
} else if target.contains("darwin") {
635+
cfg.define("CMAKE_SYSTEM_NAME", "Darwin");
636+
} else if target.contains("ios") {
637+
cfg.define("CMAKE_SYSTEM_NAME", "iOS");
638+
} else if target.contains("tvos") {
639+
cfg.define("CMAKE_SYSTEM_NAME", "tvOS");
640+
} else if target.contains("watchos") {
641+
cfg.define("CMAKE_SYSTEM_NAME", "watchOS");
642+
} else if target.contains("visionos") {
643+
cfg.define("CMAKE_SYSTEM_NAME", "visionOS");
634644
} else {
635645
builder.info(&format!(
636646
"could not determine CMAKE_SYSTEM_NAME from the target `{target}`, build may fail",

0 commit comments

Comments
 (0)