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.
This commit is contained in:
Mads Marquart 2025-03-24 22:42:23 +01:00
parent a9cb15d793
commit e8704e899c

View file

@ -697,6 +697,14 @@ fn configure_cmake(
// reported, the system version is currently left unset.
if target.contains("apple") {
if !target.contains("darwin") {
// FIXME(madsmtm): compiler-rt's CMake setup is kinda weird, it seems like they do
// version testing etc. for macOS (i.e. Darwin), even while building for iOS?
//
// So for now we set it to "Darwin" on all Apple platforms.
cfg.define("CMAKE_SYSTEM_NAME", "Darwin");
}
// Make sure that CMake does not build universal binaries on macOS.
// Explicitly specify the one single target architecture.
if target.starts_with("aarch64") {