提交 afa72b5d 编写于 作者: B Brian Anderson

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

上级 4f5e73be
...@@ -95,6 +95,13 @@ pub fn check(build: &mut Build) { ...@@ -95,6 +95,13 @@ pub fn check(build: &mut Build) {
// We're gonna build some custom C code here and there, host triples // 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. // also build some C++ shims for LLVM so we need a C++ compiler.
for target in build.config.target.iter() { 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()); need_cmd(build.cc(target).as_ref());
if let Some(ar) = build.ar(target) { if let Some(ar) = build.ar(target) {
need_cmd(ar.as_ref()); need_cmd(ar.as_ref());
......
...@@ -73,6 +73,12 @@ fn extend(&mut self, sources: &[&'static str]) { ...@@ -73,6 +73,12 @@ fn extend(&mut self, sources: &[&'static str]) {
fn main() { fn main() {
let target = env::var("TARGET").expect("TARGET was not set"); 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(); let cfg = &mut gcc::Config::new();
if target.contains("msvc") { if target.contains("msvc") {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册