Skip to content

Commit 4fd1c77

Browse files
author
aspen
committed
Document the CMake defines.
1 parent 5f3dbd8 commit 4fd1c77

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/bootstrap/native.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,12 @@ impl Step for Llvm {
177177

178178
// Are we compiling for iOS/tvOS?
179179
if target.contains("apple") && !target.contains("darwin") {
180+
// These two defines prevent CMake from automatically trying to add a MacOSX sysroot, which leads to a compiler error.
180181
cfg.define("CMAKE_OSX_SYSROOT", "/");
181182
cfg.define("CMAKE_OSX_DEPLOYMENT_TARGET", "");
182-
cfg.define("LLVM_ENABLE_PLUGINS", "OFF"); // Prevent cmake from adding -bundle to CFLAGS automatically.
183+
// Prevent cmake from adding -bundle to CFLAGS automatically, which leads to a compiler error because "-bitcode_bundle" also gets added.
184+
cfg.define("LLVM_ENABLE_PLUGINS", "OFF");
185+
// Zlib fails to link properly, leading to a compiler error.
183186
cfg.define("LLVM_ENABLE_ZLIB", "OFF");
184187
}
185188

0 commit comments

Comments
 (0)