mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 08:34:33 +00:00
use the windows builtins .obj when cross-compiling
This commit is contained in:
parent
e8f6f69bff
commit
a274da62d3
1 changed files with 10 additions and 1 deletions
|
@ -121,11 +121,20 @@ pub fn build_zig_host_native(
|
||||||
.env("HOME", env_home);
|
.env("HOME", env_home);
|
||||||
|
|
||||||
if let Some(shared_lib_path) = shared_lib_path {
|
if let Some(shared_lib_path) = shared_lib_path {
|
||||||
|
// with LLVM, the builtins are already part of the roc app,
|
||||||
|
// but with the dev backend, they are missing. To minimize work,
|
||||||
|
// we link them as part of the host executable
|
||||||
|
let builtins_obj = if target.contains("windows") {
|
||||||
|
bitcode::get_builtins_windows_obj_path()
|
||||||
|
} else {
|
||||||
|
bitcode::get_builtins_host_obj_path()
|
||||||
|
};
|
||||||
|
|
||||||
command.args(&[
|
command.args(&[
|
||||||
"build-exe",
|
"build-exe",
|
||||||
"-fPIE",
|
"-fPIE",
|
||||||
shared_lib_path.to_str().unwrap(),
|
shared_lib_path.to_str().unwrap(),
|
||||||
&bitcode::get_builtins_host_obj_path(),
|
&builtins_obj,
|
||||||
]);
|
]);
|
||||||
} else {
|
} else {
|
||||||
command.args(&["build-obj", "-fPIC"]);
|
command.args(&["build-obj", "-fPIC"]);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue