mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
bootstrap: Override CMAKE_OSX_SYSROOT when building compiler-rt
Similarly to what was previously done for the `llvm` step.
This commit is contained in:
@@ -385,9 +385,6 @@ fn run(self, builder: &Builder<'_>) -> LlvmResult {
|
||||
|| target.contains("apple-watchos")
|
||||
|| target.contains("apple-visionos")
|
||||
{
|
||||
// These two defines prevent CMake from automatically trying to add a MacOSX sysroot, which leads to a compiler error.
|
||||
cfg.define("CMAKE_OSX_SYSROOT", "/");
|
||||
cfg.define("CMAKE_OSX_DEPLOYMENT_TARGET", "");
|
||||
// Prevent cmake from adding -bundle to CFLAGS automatically, which leads to a compiler error because "-bitcode_bundle" also gets added.
|
||||
cfg.define("LLVM_ENABLE_PLUGINS", "OFF");
|
||||
// Zlib fails to link properly, leading to a compiler error.
|
||||
@@ -703,6 +700,10 @@ fn configure_cmake(
|
||||
//
|
||||
// So for now we set it to "Darwin" on all Apple platforms.
|
||||
cfg.define("CMAKE_SYSTEM_NAME", "Darwin");
|
||||
|
||||
// These two defines prevent CMake from automatically trying to add a MacOSX sysroot, which leads to a compiler error.
|
||||
cfg.define("CMAKE_OSX_SYSROOT", "/");
|
||||
cfg.define("CMAKE_OSX_DEPLOYMENT_TARGET", "");
|
||||
}
|
||||
|
||||
// Make sure that CMake does not build universal binaries on macOS.
|
||||
|
||||
Reference in New Issue
Block a user