@@ -210,7 +210,6 @@ pub fn std_cargo(builder: &Builder<'_>,
210210 // config.toml equivalent) is used
211211 let llvm_config = builder. ensure ( native:: Llvm {
212212 target : builder. config . build ,
213- emscripten : false ,
214213 } ) ;
215214 cargo. env ( "LLVM_CONFIG" , llvm_config) ;
216215 cargo. env ( "RUSTC_BUILD_SANITIZERS" , "1" ) ;
@@ -615,36 +614,27 @@ pub fn build_codegen_backend(builder: &Builder<'_>,
615614 compiler : & Compiler ,
616615 target : Interned < String > ,
617616 backend : Interned < String > ) -> String {
618- let mut features = String :: new ( ) ;
619-
620617 match & * backend {
621- "llvm" | "emscripten" => {
618+ "llvm" => {
622619 // Build LLVM for our target. This will implicitly build the
623620 // host LLVM if necessary.
624621 let llvm_config = builder. ensure ( native:: Llvm {
625622 target,
626- emscripten : backend == "emscripten" ,
627623 } ) ;
628624
629- if backend == "emscripten" {
630- features. push_str ( " emscripten" ) ;
631- }
632-
633625 builder. info ( & format ! ( "Building stage{} codegen artifacts ({} -> {}, {})" ,
634626 compiler. stage, & compiler. host, target, backend) ) ;
635627
636628 // Pass down configuration from the LLVM build into the build of
637629 // librustc_llvm and librustc_codegen_llvm.
638- if builder. is_rust_llvm ( target) && backend != "emscripten" {
630+ if builder. is_rust_llvm ( target) {
639631 cargo. env ( "LLVM_RUSTLLVM" , "1" ) ;
640632 }
641633
642634 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) ;
648638 }
649639 // Some LLVM linker flags (-L and -l) may be needed to link librustc_llvm.
650640 if let Some ( ref s) = builder. config . llvm_ldflags {
@@ -662,9 +652,7 @@ pub fn build_codegen_backend(builder: &Builder<'_>,
662652 "libstdc++.a" ) ;
663653 cargo. env ( "LLVM_STATIC_STDCPP" , file) ;
664654 }
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 {
668656 cargo. env ( "LLVM_LINK_SHARED" , "1" ) ;
669657 }
670658 if builder. config . llvm_use_libcxx {
@@ -676,8 +664,7 @@ pub fn build_codegen_backend(builder: &Builder<'_>,
676664 }
677665 _ => panic ! ( "unknown backend: {}" , backend) ,
678666 }
679-
680- features
667+ String :: new ( )
681668}
682669
683670/// Creates the `codegen-backends` folder for a compiler that's about to be
0 commit comments