Skip to content

Commit

Permalink
Haiku: explicitly set CMAKE_SYSTEM_NAME when cross-compiling
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
nielx committed Oct 16, 2020
1 parent 8e6f69a commit 7b652d3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/bootstrap/native.rs
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,8 @@ fn configure_cmake(
cfg.define("CMAKE_SYSTEM_NAME", "FreeBSD");
} else if target.contains("windows") {
cfg.define("CMAKE_SYSTEM_NAME", "Windows");
} else if target.contains("haiku") {
cfg.define("CMAKE_SYSTEM_NAME", "Haiku");
}
// When cross-compiling we should also set CMAKE_SYSTEM_VERSION, but in
// that case like CMake we cannot easily determine system version either.
Expand Down

0 comments on commit 7b652d3

Please sign in to comment.