2
2
//! command-line options.
3
3
4
4
use rustc_session:: lint;
5
- use crate :: middle :: cstore ;
5
+ use rustc_session :: utils :: NativeLibraryKind ;
6
6
use crate :: session:: { early_error, early_warn, Session } ;
7
7
use crate :: session:: search_paths:: SearchPath ;
8
8
@@ -415,7 +415,7 @@ top_level_options!(
415
415
describe_lints: bool [ UNTRACKED ] ,
416
416
output_types: OutputTypes [ TRACKED ] ,
417
417
search_paths: Vec <SearchPath > [ UNTRACKED ] ,
418
- libs: Vec <( String , Option <String >, Option <cstore :: NativeLibraryKind >) > [ TRACKED ] ,
418
+ libs: Vec <( String , Option <String >, Option <NativeLibraryKind >) > [ TRACKED ] ,
419
419
maybe_sysroot: Option <PathBuf > [ UNTRACKED ] ,
420
420
421
421
target_triple: TargetTriple [ TRACKED ] ,
@@ -2379,7 +2379,7 @@ fn select_debuginfo(
2379
2379
fn parse_libs (
2380
2380
matches : & getopts:: Matches ,
2381
2381
error_format : ErrorOutputType ,
2382
- ) -> Vec < ( String , Option < String > , Option < cstore :: NativeLibraryKind > ) > {
2382
+ ) -> Vec < ( String , Option < String > , Option < NativeLibraryKind > ) > {
2383
2383
matches
2384
2384
. opt_strs ( "l" )
2385
2385
. into_iter ( )
@@ -2390,10 +2390,12 @@ fn parse_libs(
2390
2390
let kind = parts. next ( ) . unwrap ( ) ;
2391
2391
let ( name, kind) = match ( parts. next ( ) , kind) {
2392
2392
( 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
+ }
2397
2399
( _, s) => {
2398
2400
early_error (
2399
2401
error_format,
@@ -2405,7 +2407,8 @@ fn parse_libs(
2405
2407
) ;
2406
2408
}
2407
2409
} ;
2408
- if kind == Some ( cstore:: NativeStaticNobundle ) && !nightly_options:: is_nightly_build ( ) {
2410
+ if kind == Some ( NativeLibraryKind :: NativeStaticNobundle ) &&
2411
+ !nightly_options:: is_nightly_build ( ) {
2409
2412
early_error (
2410
2413
error_format,
2411
2414
& format ! (
@@ -2855,7 +2858,7 @@ impl PpMode {
2855
2858
/// how the hash should be calculated when adding a new command-line argument.
2856
2859
mod dep_tracking {
2857
2860
use rustc_session:: lint;
2858
- use crate :: middle :: cstore ;
2861
+ use rustc_session :: utils :: NativeLibraryKind ;
2859
2862
use std:: collections:: BTreeMap ;
2860
2863
use std:: hash:: Hash ;
2861
2864
use std:: path:: PathBuf ;
@@ -2913,7 +2916,7 @@ mod dep_tracking {
2913
2916
impl_dep_tracking_hash_via_hash ! ( Option <RelroLevel >) ;
2914
2917
impl_dep_tracking_hash_via_hash ! ( Option <lint:: Level >) ;
2915
2918
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 >) ;
2917
2920
impl_dep_tracking_hash_via_hash ! ( CrateType ) ;
2918
2921
impl_dep_tracking_hash_via_hash ! ( MergeFunctions ) ;
2919
2922
impl_dep_tracking_hash_via_hash ! ( PanicStrategy ) ;
@@ -2924,7 +2927,7 @@ mod dep_tracking {
2924
2927
impl_dep_tracking_hash_via_hash ! ( DebugInfo ) ;
2925
2928
impl_dep_tracking_hash_via_hash ! ( UnstableFeatures ) ;
2926
2929
impl_dep_tracking_hash_via_hash ! ( OutputTypes ) ;
2927
- impl_dep_tracking_hash_via_hash ! ( cstore :: NativeLibraryKind ) ;
2930
+ impl_dep_tracking_hash_via_hash ! ( NativeLibraryKind ) ;
2928
2931
impl_dep_tracking_hash_via_hash ! ( Sanitizer ) ;
2929
2932
impl_dep_tracking_hash_via_hash ! ( Option <Sanitizer >) ;
2930
2933
impl_dep_tracking_hash_via_hash ! ( TargetTriple ) ;
@@ -2940,7 +2943,7 @@ mod dep_tracking {
2940
2943
impl_dep_tracking_hash_for_sortable_vec_of ! ( (
2941
2944
String ,
2942
2945
Option <String >,
2943
- Option <cstore :: NativeLibraryKind >
2946
+ Option <NativeLibraryKind >
2944
2947
) ) ;
2945
2948
impl_dep_tracking_hash_for_sortable_vec_of ! ( ( String , u64 ) ) ;
2946
2949
impl_dep_tracking_hash_for_sortable_vec_of ! ( Sanitizer ) ;
0 commit comments