diff --git a/library/compiler-builtins/Cargo.toml b/library/compiler-builtins/Cargo.toml index 97cad699cb99..5b9469b3d2bc 100644 --- a/library/compiler-builtins/Cargo.toml +++ b/library/compiler-builtins/Cargo.toml @@ -11,6 +11,7 @@ description = """ Compiler intrinsics used by the Rust compiler. Also available for other targets if necessary! """ +links = 'compiler-rt' [lib] test = false diff --git a/library/compiler-builtins/build.rs b/library/compiler-builtins/build.rs index f5ada024f41e..752bba1343f6 100644 --- a/library/compiler-builtins/build.rs +++ b/library/compiler-builtins/build.rs @@ -4,6 +4,9 @@ fn main() { println!("cargo:rerun-if-changed=build.rs"); let target = env::var("TARGET").unwrap(); + let cwd = env::current_dir().unwrap(); + + println!("cargo:compiler-rt={}", cwd.join("compiler-rt").display()); // Emscripten's runtime includes all the builtins if target.contains("emscripten") {