Fix linking with PIC

This commit is contained in:
Brendan Hansknecht 2021-08-28 15:24:02 -07:00
parent c7f5793d2a
commit c1cae950e7
2 changed files with 12 additions and 1 deletions

View file

@ -84,6 +84,9 @@ pub fn build_zig_host_native(
// include libc
"--library",
"c",
"-fPIC",
"-O",
"ReleaseSafe",
])
.output()
.unwrap()
@ -157,6 +160,9 @@ pub fn build_zig_host_native(
// include libc
"--library",
"c",
"-fPIC",
"-O",
"ReleaseSafe",
])
.output()
.unwrap()
@ -198,6 +204,9 @@ pub fn build_zig_host_wasm32(
"i386-linux-musl",
// "wasm32-wasi",
// "-femit-llvm-ir=/home/folkertdev/roc/roc/examples/benchmarks/platform/host.ll",
"-fPIC",
"-O",
"ReleaseSafe",
])
.output()
.unwrap()
@ -258,6 +267,8 @@ pub fn rebuild_host(target: &Triple, host_input_path: &Path) {
.env_clear()
.env("PATH", &env_path)
.args(&[
"-O2",
"-fPIC",
"-c",
c_host_src.to_str().unwrap(),
"-o",