Explorar o código

Don't build any native compiler-builtin components for emscripten

rust-lang/rust#36339
Jorge Aparicio %!s(int64=8) %!d(string=hai) anos
pai
achega
c30dcb0d30
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  1. 6 0
      build.rs

+ 6 - 0
build.rs

@@ -50,6 +50,12 @@ fn main() {
     println!("cargo:rerun-if-changed=build.rs");
     println!("cargo:rerun-if-changed=build.rs");
 
 
     let target = env::var("TARGET").unwrap();
     let target = env::var("TARGET").unwrap();
+
+    // Emscripten's runtime includes all the builtins
+    if target.contains("emscripten") {
+        return;
+    }
+
     let Cfg { ref target_arch, ref target_os, ref target_env, ref target_vendor, .. } =
     let Cfg { ref target_arch, ref target_os, ref target_env, ref target_vendor, .. } =
         Cfg::new(&target).unwrap_or_else(|e| {
         Cfg::new(&target).unwrap_or_else(|e| {
             writeln!(io::stderr(), "{}", e).ok();
             writeln!(io::stderr(), "{}", e).ok();