Skip to content

Commit afa72b5

Browse files
committed
Don't build any native compiler-builtin components for emscripten
1 parent 4f5e73b commit afa72b5

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

src/bootstrap/sanity.rs

+7
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,13 @@ pub fn check(build: &mut Build) {
9595
// We're gonna build some custom C code here and there, host triples
9696
// also build some C++ shims for LLVM so we need a C++ compiler.
9797
for target in build.config.target.iter() {
98+
// On emscripten we don't actually need the C compiler to just
99+
// build the target artifacts, only for testing. For the sake
100+
// of easier bot configuration, just skip detection.
101+
if target.contains("emscripten") {
102+
continue;
103+
}
104+
98105
need_cmd(build.cc(target).as_ref());
99106
if let Some(ar) = build.ar(target) {
100107
need_cmd(ar.as_ref());

src/libcompiler_builtins/build.rs

+6
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,12 @@ impl Sources {
7373

7474
fn main() {
7575
let target = env::var("TARGET").expect("TARGET was not set");
76+
77+
// Emscripten's runtime includes all the builtins
78+
if target.contains("emscripten") {
79+
return;
80+
}
81+
7682
let cfg = &mut gcc::Config::new();
7783

7884
if target.contains("msvc") {

0 commit comments

Comments
 (0)