diff options
author | Kayla Washburn <mckayla@hey.com> | 2022-07-14 16:01:07 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-14 16:01:07 -0600 |
commit | 91a33c65f3bdc82bef4cbe95f614e1f533e5b368 (patch) | |
tree | 9c3033606de5d4ebbf5b84c1f80ae2c69987dc44 | |
parent | dbf5e95b59656b05f28218a27d128cae9fd68342 (diff) |
fix(ext/ffi): allow setting a custom lib path for libtcc.a (#15208)
-rw-r--r-- | ext/ffi/build.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/ffi/build.rs b/ext/ffi/build.rs index fd6aea608..091dd9599 100644 --- a/ext/ffi/build.rs +++ b/ext/ffi/build.rs @@ -58,6 +58,10 @@ fn main() {} #[cfg(not(target_os = "windows"))] fn main() { - build_tcc(); + if let Ok(tcc_path) = env::var("TCC_PATH") { + println!("cargo:rustc-link-search=native={}", tcc_path); + } else { + build_tcc(); + } println!("cargo:rustc-link-lib=static=tcc"); } |