mirror of
https://github.com/roc-lang/roc.git
synced 2024-09-20 15:27:45 +03:00
Merge pull request #3212 from jaredly/cpath
Pass CPATH in to build_c_host_native to fix building the c platform under manual install
This commit is contained in:
commit
a17a6a3147
@ -313,6 +313,7 @@ pub fn build_zig_host_wasm32(
|
||||
pub fn build_c_host_native(
|
||||
env_path: &str,
|
||||
env_home: &str,
|
||||
env_cpath: &str,
|
||||
dest: &str,
|
||||
sources: &[&str],
|
||||
opt_level: OptLevel,
|
||||
@ -322,6 +323,7 @@ pub fn build_c_host_native(
|
||||
command
|
||||
.env_clear()
|
||||
.env("PATH", &env_path)
|
||||
.env("CPATH", &env_cpath)
|
||||
.env("HOME", &env_home)
|
||||
.args(sources)
|
||||
.args(&["-o", dest]);
|
||||
@ -417,6 +419,8 @@ pub fn rebuild_host(
|
||||
|
||||
let env_path = env::var("PATH").unwrap_or_else(|_| "".to_string());
|
||||
let env_home = env::var("HOME").unwrap_or_else(|_| "".to_string());
|
||||
let env_cpath = env::var("CPATH").unwrap_or_else(|_| "".to_string());
|
||||
|
||||
|
||||
if zig_host_src.exists() {
|
||||
// Compile host.zig
|
||||
@ -531,6 +535,7 @@ pub fn rebuild_host(
|
||||
let output = build_c_host_native(
|
||||
&env_path,
|
||||
&env_home,
|
||||
&env_cpath,
|
||||
c_host_dest.to_str().unwrap(),
|
||||
&[c_host_src.to_str().unwrap()],
|
||||
opt_level,
|
||||
@ -586,6 +591,7 @@ pub fn rebuild_host(
|
||||
let output = build_c_host_native(
|
||||
&env_path,
|
||||
&env_home,
|
||||
&env_cpath,
|
||||
host_dest.to_str().unwrap(),
|
||||
&[
|
||||
c_host_src.to_str().unwrap(),
|
||||
@ -599,6 +605,7 @@ pub fn rebuild_host(
|
||||
let output = build_c_host_native(
|
||||
&env_path,
|
||||
&env_home,
|
||||
&env_cpath,
|
||||
c_host_dest.to_str().unwrap(),
|
||||
&[c_host_src.to_str().unwrap()],
|
||||
opt_level,
|
||||
@ -639,6 +646,7 @@ pub fn rebuild_host(
|
||||
let output = build_c_host_native(
|
||||
&env_path,
|
||||
&env_home,
|
||||
&env_cpath,
|
||||
host_dest.to_str().unwrap(),
|
||||
&[c_host_src.to_str().unwrap()],
|
||||
opt_level,
|
||||
|
Loading…
Reference in New Issue
Block a user