Skip to content

Commit

Permalink
Don't build any native compiler-builtin components for emscripten
Browse files Browse the repository at this point in the history
  • Loading branch information
brson committed Sep 30, 2016
1 parent 4f5e73b commit afa72b5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/bootstrap/sanity.rs
Expand Up @@ -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());
Expand Down
6 changes: 6 additions & 0 deletions src/libcompiler_builtins/build.rs
Expand Up @@ -73,6 +73,12 @@ impl Sources {

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") {
Expand Down

0 comments on commit afa72b5

Please sign in to comment.