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() {
159
159
cmd. arg ( "-C" ) . arg ( "panic=abort" ) ;
160
160
}
161
161
162
- if cfg ! ( not ( feature= "llvm" ) ) && stage != "0" {
162
+ if env :: var ( "RUSTC_LLVM_ENABLED" ) == Ok ( "0" . to_string ( ) ) && stage != "0" {
163
163
cmd. arg ( "-Zno-trans" ) ;
164
164
}
165
165
Original file line number Diff line number Diff line change @@ -539,6 +539,12 @@ impl<'a> Builder<'a> {
539
539
. env ( "RUSTC_SNAPSHOT_LIBDIR" , self . rustc_libdir ( compiler) ) ;
540
540
}
541
541
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
+
542
548
// Ignore incremental modes except for stage0, since we're
543
549
// not guaranteeing correctness across builds if the compiler
544
550
// is changing under your feet.`
Original file line number Diff line number Diff line change @@ -41,4 +41,4 @@ syntax_pos = { path = "../libsyntax_pos" }
41
41
ar = " 0.3.0"
42
42
43
43
[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" }
21
21
syntax = { path = " ../libsyntax" }
22
22
syntax_ext = { path = " ../libsyntax_ext" }
23
23
syntax_pos = { path = " ../libsyntax_pos" }
24
+
25
+ [features ]
26
+ llvm = []
You can’t perform that action at this time.
0 commit comments