@@ -210,7 +210,6 @@ pub fn std_cargo(builder: &Builder<'_>,
210
210
// config.toml equivalent) is used
211
211
let llvm_config = builder. ensure ( native:: Llvm {
212
212
target : builder. config . build ,
213
- emscripten : false ,
214
213
} ) ;
215
214
cargo. env ( "LLVM_CONFIG" , llvm_config) ;
216
215
cargo. env ( "RUSTC_BUILD_SANITIZERS" , "1" ) ;
@@ -615,36 +614,27 @@ pub fn build_codegen_backend(builder: &Builder<'_>,
615
614
compiler : & Compiler ,
616
615
target : Interned < String > ,
617
616
backend : Interned < String > ) -> String {
618
- let mut features = String :: new ( ) ;
619
-
620
617
match & * backend {
621
- "llvm" | "emscripten" => {
618
+ "llvm" => {
622
619
// Build LLVM for our target. This will implicitly build the
623
620
// host LLVM if necessary.
624
621
let llvm_config = builder. ensure ( native:: Llvm {
625
622
target,
626
- emscripten : backend == "emscripten" ,
627
623
} ) ;
628
624
629
- if backend == "emscripten" {
630
- features. push_str ( " emscripten" ) ;
631
- }
632
-
633
625
builder. info ( & format ! ( "Building stage{} codegen artifacts ({} -> {}, {})" ,
634
626
compiler. stage, & compiler. host, target, backend) ) ;
635
627
636
628
// Pass down configuration from the LLVM build into the build of
637
629
// librustc_llvm and librustc_codegen_llvm.
638
- if builder. is_rust_llvm ( target) && backend != "emscripten" {
630
+ if builder. is_rust_llvm ( target) {
639
631
cargo. env ( "LLVM_RUSTLLVM" , "1" ) ;
640
632
}
641
633
642
634
cargo. env ( "LLVM_CONFIG" , & llvm_config) ;
643
- if backend != "emscripten" {
644
- let target_config = builder. config . target_config . get ( & target) ;
645
- if let Some ( s) = target_config. and_then ( |c| c. llvm_config . as_ref ( ) ) {
646
- cargo. env ( "CFG_LLVM_ROOT" , s) ;
647
- }
635
+ let target_config = builder. config . target_config . get ( & target) ;
636
+ if let Some ( s) = target_config. and_then ( |c| c. llvm_config . as_ref ( ) ) {
637
+ cargo. env ( "CFG_LLVM_ROOT" , s) ;
648
638
}
649
639
// Some LLVM linker flags (-L and -l) may be needed to link librustc_llvm.
650
640
if let Some ( ref s) = builder. config . llvm_ldflags {
@@ -662,9 +652,7 @@ pub fn build_codegen_backend(builder: &Builder<'_>,
662
652
"libstdc++.a" ) ;
663
653
cargo. env ( "LLVM_STATIC_STDCPP" , file) ;
664
654
}
665
- if builder. config . llvm_link_shared ||
666
- ( builder. config . llvm_thin_lto && backend != "emscripten" )
667
- {
655
+ if builder. config . llvm_link_shared || builder. config . llvm_thin_lto {
668
656
cargo. env ( "LLVM_LINK_SHARED" , "1" ) ;
669
657
}
670
658
if builder. config . llvm_use_libcxx {
@@ -676,8 +664,7 @@ pub fn build_codegen_backend(builder: &Builder<'_>,
676
664
}
677
665
_ => panic ! ( "unknown backend: {}" , backend) ,
678
666
}
679
-
680
- features
667
+ String :: new ( )
681
668
}
682
669
683
670
/// Creates the `codegen-backends` folder for a compiler that's about to be
0 commit comments