File tree Expand file tree Collapse file tree 4 files changed +17
-2
lines changed Expand file tree Collapse file tree 4 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -4112,6 +4112,7 @@ dependencies = [
4112
4112
" rustc_hir" ,
4113
4113
" rustc_middle" ,
4114
4114
" rustc_span" ,
4115
+ " rustc_target" ,
4115
4116
" tracing" ,
4116
4117
]
4117
4118
Original file line number Diff line number Diff line change @@ -4,13 +4,17 @@ 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
12
14
[features ]
13
15
default = [
16
+ " rustc_hir" ,
14
17
" rustc_middle" ,
15
18
" rustc_span" ,
19
+ " rustc_target" ,
16
20
]
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