Skip to content

Commit 7b652d3

Browse files
committed
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.
1 parent 8e6f69a commit 7b652d3

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)