File tree 3 files changed +8
-1
lines changed
3 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -146,6 +146,7 @@ The valid types of print values are:
146
146
- ` crate-name ` — The name of the crate.
147
147
- ` file-names ` — The names of the files created by the ` link ` emit kind.
148
148
- ` sysroot ` — Path to the sysroot.
149
+ - ` target-libdir ` - Path to the target libdir.
149
150
- ` cfg ` — List of cfg values. See [ conditional compilation] for more
150
151
information about cfg values.
151
152
- ` target-list ` — List of known targets. The target may be selected with the
Original file line number Diff line number Diff line change @@ -680,6 +680,10 @@ impl RustcDefaultCalls {
680
680
println ! ( "{}" , targets. join( "\n " ) ) ;
681
681
}
682
682
Sysroot => println ! ( "{}" , sess. sysroot. display( ) ) ,
683
+ TargetLibdir => println ! (
684
+ "{}" ,
685
+ sess. target_tlib_path. as_ref( ) . unwrap_or( & sess. host_tlib_path) . dir. display( )
686
+ ) ,
683
687
TargetSpec => println ! ( "{}" , sess. target. target. to_json( ) . pretty( ) ) ,
684
688
FileNames | CrateName => {
685
689
let input = input. unwrap_or_else ( || {
Original file line number Diff line number Diff line change @@ -391,6 +391,7 @@ impl ExternEntry {
391
391
pub enum PrintRequest {
392
392
FileNames ,
393
393
Sysroot ,
394
+ TargetLibdir ,
394
395
CrateName ,
395
396
Cfg ,
396
397
TargetList ,
@@ -912,7 +913,7 @@ pub fn rustc_short_optgroups() -> Vec<RustcOptGroup> {
912
913
"" ,
913
914
"print" ,
914
915
"Compiler information to print on stdout" ,
915
- "[crate-name|file-names|sysroot|cfg|target-list|\
916
+ "[crate-name|file-names|sysroot|target-libdir| cfg|target-list|\
916
917
target-cpus|target-features|relocation-models|\
917
918
code-models|tls-models|target-spec-json|native-static-libs]",
918
919
) ,
@@ -1344,6 +1345,7 @@ fn collect_print_requests(
1344
1345
"crate-name" => PrintRequest :: CrateName ,
1345
1346
"file-names" => PrintRequest :: FileNames ,
1346
1347
"sysroot" => PrintRequest :: Sysroot ,
1348
+ "target-libdir" => PrintRequest :: TargetLibdir ,
1347
1349
"cfg" => PrintRequest :: Cfg ,
1348
1350
"target-list" => PrintRequest :: TargetList ,
1349
1351
"target-cpus" => PrintRequest :: TargetCPUs ,
You can’t perform that action at this time.
0 commit comments