Skip to content

Commit 5b00d25

Browse files
authored
Merge pull request #112 from jacob-hughes/dynamic_linking
Allow BDWGC to be linked dynamically
2 parents d8b6c63 + 2b17e85 commit 5b00d25

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

library/bdwgc/build.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ const BDWGC_BUILD_DIR: &str = "lib";
1010
compile_error!("Requires x86_64 with 64 bit pointer width.");
1111

1212
fn main() {
13+
if env::var("GC_LINK_DYNAMIC").map_or(false, |v| v == "true") {
14+
println!("cargo:rustc-link-lib=dylib=gc");
15+
return;
16+
}
17+
1318
let out_dir = env::var("OUT_DIR").unwrap();
1419
let bdwgc_src = PathBuf::from(BDWGC_REPO);
1520

0 commit comments

Comments
 (0)