Skip to content

Commit ec025ba

Browse files
authored
Rollup merge of rust-lang#78009 - nielx:fix/CMAKE_SYSTEM_NAME, r=Mark-Simulacrum
Haiku: explicitly set CMAKE_SYSTEM_NAME when cross-compiling This resolves issues where the cross-build of LLVM fails because it tries to link to the host's system libraries instead of the target's system libraries.
2 parents 983299f + 7b652d3 commit ec025ba

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/bootstrap/native.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,8 @@ fn configure_cmake(
378378
cfg.define("CMAKE_SYSTEM_NAME", "FreeBSD");
379379
} else if target.contains("windows") {
380380
cfg.define("CMAKE_SYSTEM_NAME", "Windows");
381+
} else if target.contains("haiku") {
382+
cfg.define("CMAKE_SYSTEM_NAME", "Haiku");
381383
}
382384
// When cross-compiling we should also set CMAKE_SYSTEM_VERSION, but in
383385
// that case like CMake we cannot easily determine system version either.

0 commit comments

Comments
 (0)