]> git.lizzy.rs Git - rust.git/commitdiff
Don't build any native compiler-builtin components for emscripten
authorBrian Anderson <banderson@mozilla.com>
Wed, 28 Sep 2016 16:08:59 +0000 (16:08 +0000)
committerBrian Anderson <banderson@mozilla.com>
Fri, 30 Sep 2016 21:04:09 +0000 (14:04 -0700)
src/bootstrap/sanity.rs
src/libcompiler_builtins/build.rs

index 9429af565258b7b11b9eb4657de55ea46229556a..c4e6399c2c36d270fc65fed47663379bf92bacff 100644 (file)
@@ -95,6 +95,13 @@ pub fn check(build: &mut Build) {
     // We're gonna build some custom C code here and there, host triples
     // also build some C++ shims for LLVM so we need a C++ compiler.
     for target in build.config.target.iter() {
+        // On emscripten we don't actually need the C compiler to just
+        // build the target artifacts, only for testing. For the sake
+        // of easier bot configuration, just skip detection.
+        if target.contains("emscripten") {
+            continue;
+        }
+
         need_cmd(build.cc(target).as_ref());
         if let Some(ar) = build.ar(target) {
             need_cmd(ar.as_ref());
index 66c683333b9854812767fc92e16b790c296f391d..acbd39bb1630c483c3a25064c8780eb95c118728 100644 (file)
@@ -73,6 +73,12 @@ fn extend(&mut self, sources: &[&'static str]) {
 
 fn main() {
     let target = env::var("TARGET").expect("TARGET was not set");
+
+    // Emscripten's runtime includes all the builtins
+    if target.contains("emscripten") {
+        return;
+    }
+
     let cfg = &mut gcc::Config::new();
 
     if target.contains("msvc") {