mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 08:34:33 +00:00
link_windows
just uses zig
This commit is contained in:
parent
06e5fe8cba
commit
6f3c8477e6
1 changed files with 24 additions and 3 deletions
|
@ -1096,11 +1096,32 @@ fn link_wasm32(
|
||||||
|
|
||||||
fn link_windows(
|
fn link_windows(
|
||||||
_target: &Triple,
|
_target: &Triple,
|
||||||
_output_path: PathBuf,
|
output_path: PathBuf,
|
||||||
_input_paths: &[&str],
|
input_paths: &[&str],
|
||||||
_link_type: LinkType,
|
_link_type: LinkType,
|
||||||
) -> io::Result<(Child, PathBuf)> {
|
) -> io::Result<(Child, PathBuf)> {
|
||||||
todo!("Add windows support to the surgical linker. See issue #2608.")
|
let zig_str_path = find_zig_str_path();
|
||||||
|
let wasi_libc_path = find_wasi_libc_path();
|
||||||
|
|
||||||
|
let child = Command::new(&zig_executable())
|
||||||
|
.args(&["build-exe"])
|
||||||
|
.args(input_paths)
|
||||||
|
.args([
|
||||||
|
"-lc",
|
||||||
|
&format!("-femit-bin={}", output_path.to_str().unwrap()),
|
||||||
|
"-target",
|
||||||
|
"native",
|
||||||
|
"--pkg-begin",
|
||||||
|
"str",
|
||||||
|
zig_str_path.to_str().unwrap(),
|
||||||
|
"--pkg-end",
|
||||||
|
"--strip",
|
||||||
|
"-O",
|
||||||
|
"Debug",
|
||||||
|
])
|
||||||
|
.spawn()?;
|
||||||
|
|
||||||
|
Ok((child, output_path))
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn llvm_module_to_dylib(
|
pub fn llvm_module_to_dylib(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue