Skip to content

Commit

Permalink
Rollup merge of rust-lang#78009 - nielx:fix/CMAKE_SYSTEM_NAME, r=Mark…
Browse files Browse the repository at this point in the history
…-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.
  • Loading branch information
JohnTitor committed Oct 21, 2020
2 parents 983299f + 7b652d3 commit ec025ba
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 ec025ba

Please sign in to comment.