bootstrap: Override CMAKE_OSX_SYSROOT when building compiler-rt
Similarly to what was previously done for the `llvm` step.
This commit is contained in:
parent
e8704e899c
commit
011eabd690
1 changed files with 4 additions and 3 deletions
|
@ -385,9 +385,6 @@ impl Step for Llvm {
|
||||||
|| target.contains("apple-watchos")
|
|| target.contains("apple-watchos")
|
||||||
|| target.contains("apple-visionos")
|
|| 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.
|
// 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");
|
cfg.define("LLVM_ENABLE_PLUGINS", "OFF");
|
||||||
// Zlib fails to link properly, leading to a compiler error.
|
// 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.
|
// So for now we set it to "Darwin" on all Apple platforms.
|
||||||
cfg.define("CMAKE_SYSTEM_NAME", "Darwin");
|
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.
|
// Make sure that CMake does not build universal binaries on macOS.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue