File tree Expand file tree Collapse file tree 7 files changed +17
-0
lines changed Expand file tree Collapse file tree 7 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ features = ['unprefixed_malloc_on_supported_platforms']
2727
2828[features ]
2929# tidy-alphabetical-start
30+ check_only = [' rustc_driver_impl/check_only' ]
3031jemalloc = [' dep:tikv-jemalloc-sys' ]
3132llvm = [' rustc_driver_impl/llvm' ]
3233max_level_info = [' rustc_driver_impl/max_level_info' ]
Original file line number Diff line number Diff line change @@ -43,3 +43,6 @@ serde_json = "1"
4343smallvec = { version = " 1.8.1" , features = [" union" , " may_dangle" ] }
4444tracing = " 0.1"
4545# tidy-alphabetical-end
46+
47+ [features ]
48+ check_only = [" rustc_llvm/check_only" ]
Original file line number Diff line number Diff line change @@ -72,6 +72,7 @@ ctrlc = "3.4.4"
7272
7373[features ]
7474# tidy-alphabetical-start
75+ check_only = [' rustc_interface/check_only' ]
7576llvm = [' rustc_interface/llvm' ]
7677max_level_info = [' rustc_log/max_level_info' ]
7778rustc_randomized_layouts = [
Original file line number Diff line number Diff line change @@ -56,5 +56,6 @@ rustc_abi = { path = "../rustc_abi" }
5656
5757[features ]
5858# tidy-alphabetical-start
59+ check_only = [' rustc_codegen_llvm?/check_only' ]
5960llvm = [' dep:rustc_codegen_llvm' ]
6061# tidy-alphabetical-end
Original file line number Diff line number Diff line change @@ -14,3 +14,7 @@ libc = "0.2.73"
1414# pinned `cc` in `rustc_codegen_ssa` if you update `cc` here.
1515cc = " =1.2.16"
1616# tidy-alphabetical-end
17+
18+ [features ]
19+ # Used by ./x.py check --compile-time-deps to skip building C++ code
20+ check_only = []
Original file line number Diff line number Diff line change @@ -106,6 +106,10 @@ fn output(cmd: &mut Command) -> String {
106106}
107107
108108fn main ( ) {
109+ if cfg ! ( feature = "check_only" ) {
110+ return ;
111+ }
112+
109113 for component in REQUIRED_COMPONENTS . iter ( ) . chain ( OPTIONAL_COMPONENTS . iter ( ) ) {
110114 println ! ( "cargo:rustc-check-cfg=cfg(llvm_component,values(\" {component}\" ))" ) ;
111115 }
Original file line number Diff line number Diff line change @@ -775,6 +775,9 @@ impl Build {
775775 if self . config . rust_randomize_layout && check ( "rustc_randomized_layouts" ) {
776776 features. push ( "rustc_randomized_layouts" ) ;
777777 }
778+ if self . config . compile_time_deps && kind == Kind :: Check {
779+ features. push ( "check_only" ) ;
780+ }
778781
779782 // If debug logging is on, then we want the default for tracing:
780783 // https://github.com/tokio-rs/tracing/blob/3dd5c03d907afdf2c39444a29931833335171554/tracing/src/level_filters.rs#L26
You can’t perform that action at this time.
0 commit comments