22//! command-line options.
33
44use rustc_session:: lint;
5- use crate :: middle :: cstore ;
5+ use rustc_session :: utils :: NativeLibraryKind ;
66use crate :: session:: { early_error, early_warn, Session } ;
77use crate :: session:: search_paths:: SearchPath ;
88
@@ -415,7 +415,7 @@ top_level_options!(
415415 describe_lints: bool [ UNTRACKED ] ,
416416 output_types: OutputTypes [ TRACKED ] ,
417417 search_paths: Vec <SearchPath > [ UNTRACKED ] ,
418- libs: Vec <( String , Option <String >, Option <cstore :: NativeLibraryKind >) > [ TRACKED ] ,
418+ libs: Vec <( String , Option <String >, Option <NativeLibraryKind >) > [ TRACKED ] ,
419419 maybe_sysroot: Option <PathBuf > [ UNTRACKED ] ,
420420
421421 target_triple: TargetTriple [ TRACKED ] ,
@@ -2379,7 +2379,7 @@ fn select_debuginfo(
23792379fn parse_libs (
23802380 matches : & getopts:: Matches ,
23812381 error_format : ErrorOutputType ,
2382- ) -> Vec < ( String , Option < String > , Option < cstore :: NativeLibraryKind > ) > {
2382+ ) -> Vec < ( String , Option < String > , Option < NativeLibraryKind > ) > {
23832383 matches
23842384 . opt_strs ( "l" )
23852385 . into_iter ( )
@@ -2390,10 +2390,12 @@ fn parse_libs(
23902390 let kind = parts. next ( ) . unwrap ( ) ;
23912391 let ( name, kind) = match ( parts. next ( ) , kind) {
23922392 ( None , name) => ( name, None ) ,
2393- ( Some ( name) , "dylib" ) => ( name, Some ( cstore:: NativeUnknown ) ) ,
2394- ( Some ( name) , "framework" ) => ( name, Some ( cstore:: NativeFramework ) ) ,
2395- ( Some ( name) , "static" ) => ( name, Some ( cstore:: NativeStatic ) ) ,
2396- ( Some ( name) , "static-nobundle" ) => ( name, Some ( cstore:: NativeStaticNobundle ) ) ,
2393+ ( Some ( name) , "dylib" ) => ( name, Some ( NativeLibraryKind :: NativeUnknown ) ) ,
2394+ ( Some ( name) , "framework" ) => ( name, Some ( NativeLibraryKind :: NativeFramework ) ) ,
2395+ ( Some ( name) , "static" ) => ( name, Some ( NativeLibraryKind :: NativeStatic ) ) ,
2396+ ( Some ( name) , "static-nobundle" ) => {
2397+ ( name, Some ( NativeLibraryKind :: NativeStaticNobundle ) )
2398+ }
23972399 ( _, s) => {
23982400 early_error (
23992401 error_format,
@@ -2405,7 +2407,8 @@ fn parse_libs(
24052407 ) ;
24062408 }
24072409 } ;
2408- if kind == Some ( cstore:: NativeStaticNobundle ) && !nightly_options:: is_nightly_build ( ) {
2410+ if kind == Some ( NativeLibraryKind :: NativeStaticNobundle ) &&
2411+ !nightly_options:: is_nightly_build ( ) {
24092412 early_error (
24102413 error_format,
24112414 & format ! (
@@ -2855,7 +2858,7 @@ impl PpMode {
28552858/// how the hash should be calculated when adding a new command-line argument.
28562859mod dep_tracking {
28572860 use rustc_session:: lint;
2858- use crate :: middle :: cstore ;
2861+ use rustc_session :: utils :: NativeLibraryKind ;
28592862 use std:: collections:: BTreeMap ;
28602863 use std:: hash:: Hash ;
28612864 use std:: path:: PathBuf ;
@@ -2913,7 +2916,7 @@ mod dep_tracking {
29132916 impl_dep_tracking_hash_via_hash ! ( Option <RelroLevel >) ;
29142917 impl_dep_tracking_hash_via_hash ! ( Option <lint:: Level >) ;
29152918 impl_dep_tracking_hash_via_hash ! ( Option <PathBuf >) ;
2916- impl_dep_tracking_hash_via_hash ! ( Option <cstore :: NativeLibraryKind >) ;
2919+ impl_dep_tracking_hash_via_hash ! ( Option <NativeLibraryKind >) ;
29172920 impl_dep_tracking_hash_via_hash ! ( CrateType ) ;
29182921 impl_dep_tracking_hash_via_hash ! ( MergeFunctions ) ;
29192922 impl_dep_tracking_hash_via_hash ! ( PanicStrategy ) ;
@@ -2924,7 +2927,7 @@ mod dep_tracking {
29242927 impl_dep_tracking_hash_via_hash ! ( DebugInfo ) ;
29252928 impl_dep_tracking_hash_via_hash ! ( UnstableFeatures ) ;
29262929 impl_dep_tracking_hash_via_hash ! ( OutputTypes ) ;
2927- impl_dep_tracking_hash_via_hash ! ( cstore :: NativeLibraryKind ) ;
2930+ impl_dep_tracking_hash_via_hash ! ( NativeLibraryKind ) ;
29282931 impl_dep_tracking_hash_via_hash ! ( Sanitizer ) ;
29292932 impl_dep_tracking_hash_via_hash ! ( Option <Sanitizer >) ;
29302933 impl_dep_tracking_hash_via_hash ! ( TargetTriple ) ;
@@ -2940,7 +2943,7 @@ mod dep_tracking {
29402943 impl_dep_tracking_hash_for_sortable_vec_of ! ( (
29412944 String ,
29422945 Option <String >,
2943- Option <cstore :: NativeLibraryKind >
2946+ Option <NativeLibraryKind >
29442947 ) ) ;
29452948 impl_dep_tracking_hash_for_sortable_vec_of ! ( ( String , u64 ) ) ;
29462949 impl_dep_tracking_hash_for_sortable_vec_of ! ( Sanitizer ) ;
0 commit comments