Skip to content

Commit e8704e8

Browse files
committed
bootstrap: Set CMAKE_SYSTEM_NAME=Darwin on Apple platforms
compiler-rt's CMake setup seems to have special logic for Apple platforms that works poorly when this is not set.
1 parent a9cb15d commit e8704e8

File tree

1 file changed

+8
-0
lines changed
  • src/bootstrap/src/core/build_steps

1 file changed

+8
-0
lines changed

src/bootstrap/src/core/build_steps/llvm.rs

+8
Original file line numberDiff line numberDiff line change
@@ -697,6 +697,14 @@ fn configure_cmake(
697697
// reported, the system version is currently left unset.
698698

699699
if target.contains("apple") {
700+
if !target.contains("darwin") {
701+
// FIXME(madsmtm): compiler-rt's CMake setup is kinda weird, it seems like they do
702+
// version testing etc. for macOS (i.e. Darwin), even while building for iOS?
703+
//
704+
// So for now we set it to "Darwin" on all Apple platforms.
705+
cfg.define("CMAKE_SYSTEM_NAME", "Darwin");
706+
}
707+
700708
// Make sure that CMake does not build universal binaries on macOS.
701709
// Explicitly specify the one single target architecture.
702710
if target.starts_with("aarch64") {

0 commit comments

Comments
 (0)