File tree Expand file tree Collapse file tree 4 files changed +11
-2
lines changed Expand file tree Collapse file tree 4 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -159,7 +159,7 @@ fn main() {
159159 cmd. arg ( "-C" ) . arg ( "panic=abort" ) ;
160160 }
161161
162- if cfg ! ( not ( feature= "llvm" ) ) && stage != "0" {
162+ if env :: var ( "RUSTC_LLVM_ENABLED" ) == Ok ( "0" . to_string ( ) ) && stage != "0" {
163163 cmd. arg ( "-Zno-trans" ) ;
164164 }
165165
Original file line number Diff line number Diff line change @@ -539,6 +539,12 @@ impl<'a> Builder<'a> {
539539 . env ( "RUSTC_SNAPSHOT_LIBDIR" , self . rustc_libdir ( compiler) ) ;
540540 }
541541
542+ if self . build . config . llvm_enabled {
543+ cargo. env ( "RUSTC_LLVM_ENABLED" , "1" ) ;
544+ } else {
545+ cargo. env ( "RUSTC_LLVM_ENABLED" , "0" ) ;
546+ }
547+
542548 // Ignore incremental modes except for stage0, since we're
543549 // not guaranteeing correctness across builds if the compiler
544550 // is changing under your feet.`
Original file line number Diff line number Diff line change @@ -41,4 +41,4 @@ syntax_pos = { path = "../libsyntax_pos" }
4141ar = " 0.3.0"
4242
4343[features ]
44- llvm = [" rustc_trans" ]
44+ llvm = [" rustc_trans" , " rustc_metadata/llvm " ]
Original file line number Diff line number Diff line change @@ -21,3 +21,6 @@ serialize = { path = "../libserialize" }
2121syntax = { path = " ../libsyntax" }
2222syntax_ext = { path = " ../libsyntax_ext" }
2323syntax_pos = { path = " ../libsyntax_pos" }
24+
25+ [features ]
26+ llvm = []
You can’t perform that action at this time.
0 commit comments