File tree 4 files changed +17
-2
lines changed
4 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -3949,6 +3949,7 @@ dependencies = [
3949
3949
" rustc_middle" ,
3950
3950
" rustc_span" ,
3951
3951
" scoped-tls" ,
3952
+ " rustc_target" ,
3952
3953
" tracing" ,
3953
3954
]
3954
3955
Original file line number Diff line number Diff line change @@ -4,14 +4,18 @@ version = "0.0.0"
4
4
edition = " 2021"
5
5
6
6
[dependencies ]
7
- rustc_hir = { path = " ../rustc_hir" }
7
+ # Use optional dependencies for rustc_* in order to support building this crate separately.
8
+ rustc_hir = { path = " ../rustc_hir" , optional = true }
8
9
rustc_middle = { path = " ../rustc_middle" , optional = true }
9
10
rustc_span = { path = " ../rustc_span" , optional = true }
11
+ rustc_target = { path = " ../rustc_target" , optional = true }
10
12
tracing = " 0.1"
11
13
scoped-tls = " 1.0"
12
14
13
15
[features ]
14
16
default = [
17
+ " rustc_hir" ,
15
18
" rustc_middle" ,
16
19
" rustc_span" ,
20
+ " rustc_target" ,
17
21
]
Original file line number Diff line number Diff line change 1
1
[toolchain ]
2
- channel = " nightly-2023-02-28 "
2
+ channel = " nightly-2023-06-14 "
3
3
components = [ " rustfmt" , " rustc-dev" ]
Original file line number Diff line number Diff line change 14
14
#![ feature( local_key_cell_methods) ]
15
15
#![ feature( ptr_metadata) ]
16
16
17
+ // Declare extern rustc_* crates to enable building this crate separately from the compiler.
18
+ #[ cfg( not( feature = "default" ) ) ]
19
+ extern crate rustc_hir;
20
+ #[ cfg( not( feature = "default" ) ) ]
21
+ extern crate rustc_middle;
22
+ #[ cfg( not( feature = "default" ) ) ]
23
+ extern crate rustc_span;
24
+ #[ cfg( not( feature = "default" ) ) ]
25
+ extern crate rustc_target;
26
+
17
27
pub mod rustc_internal;
18
28
pub mod stable_mir;
19
29
You can’t perform that action at this time.
0 commit comments