Skip to content

Commit 004a3aa

Browse files
authored
Rollup merge of #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 ae95005 + 7b652d3 commit 004a3aa

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/bootstrap/native.rs

+2
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)