diff --git a/build.rs b/build.rs index 3620303..673c528 100644 --- a/build.rs +++ b/build.rs @@ -39,6 +39,10 @@ lazy_static::lazy_static! { static ref V8_FORCE_MONOLITH_DOWNLOAD: bool = env::var("V8_FORCE_DOWNLOAD_V8_MONOLITH").map(|v| v == "yes").unwrap_or(false); } +// fn find_ld_default_library_paths() -> Vec { +// Command::new("ld").args("--verbose").status().expect() +// } + fn run_cmd(cmd: &str, args: &[&str]) { let failure_message = format!("Failed running command: {} {}", cmd, args.join(" ")); if !Command::new(cmd) @@ -107,7 +111,7 @@ fn main() { "cargo:rustc-flags=-L{} -lv8 -lv8_monolith_{} -ldl -lc", output_dir, *PROFILE ); - println!("cargo:rustc-link-lib=stdc++"); + println!("cargo:rustc-link-lib=static:-bundle,+whole-archive=stdc++"); } "macos" => { println!(