From b99d14905136dcd4456e272e404bcb66f7d5b65c Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Wed, 21 Nov 2018 12:55:06 -0800 Subject: [PATCH] Add metadata for where compiler-rt is located Compiler crates will need to use this! --- Cargo.toml | 1 + build.rs | 3 +++ 2 files changed, 4 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 97cad69..5b9469b 100644 --- a/Cargo.toml +++ b/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/build.rs b/build.rs index f5ada02..752bba1 100644 --- a/build.rs +++ b/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") {