File tree Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Expand file tree Collapse file tree 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:
146146- ` crate-name ` — The name of the crate.
147147- ` file-names ` — The names of the files created by the ` link ` emit kind.
148148- ` sysroot ` — Path to the sysroot.
149+ - ` target-libdir ` - Path to the target libdir.
149150- ` cfg ` — List of cfg values. See [ conditional compilation] for more
150151 information about cfg values.
151152- ` 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 {
680680 println ! ( "{}" , targets. join( "\n " ) ) ;
681681 }
682682 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+ ) ,
683687 TargetSpec => println ! ( "{}" , sess. target. target. to_json( ) . pretty( ) ) ,
684688 FileNames | CrateName => {
685689 let input = input. unwrap_or_else ( || {
Original file line number Diff line number Diff line change @@ -391,6 +391,7 @@ impl ExternEntry {
391391pub enum PrintRequest {
392392 FileNames ,
393393 Sysroot ,
394+ TargetLibdir ,
394395 CrateName ,
395396 Cfg ,
396397 TargetList ,
@@ -912,7 +913,7 @@ pub fn rustc_short_optgroups() -> Vec<RustcOptGroup> {
912913 "" ,
913914 "print" ,
914915 "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|\
916917 target-cpus|target-features|relocation-models|\
917918 code-models|tls-models|target-spec-json|native-static-libs]",
918919 ) ,
@@ -1344,6 +1345,7 @@ fn collect_print_requests(
13441345 "crate-name" => PrintRequest :: CrateName ,
13451346 "file-names" => PrintRequest :: FileNames ,
13461347 "sysroot" => PrintRequest :: Sysroot ,
1348+ "target-libdir" => PrintRequest :: TargetLibdir ,
13471349 "cfg" => PrintRequest :: Cfg ,
13481350 "target-list" => PrintRequest :: TargetList ,
13491351 "target-cpus" => PrintRequest :: TargetCPUs ,
You can’t perform that action at this time.
0 commit comments