Explorar o código

Add metadata for where compiler-rt is located

Compiler crates will need to use this!
Alex Crichton %!s(int64=6) %!d(string=hai) anos
pai
achega
b99d149051
Modificáronse 2 ficheiros con 4 adicións e 0 borrados
  1. 1 0
      Cargo.toml
  2. 3 0
      build.rs

+ 1 - 0
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

+ 3 - 0
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") {