@@ -373,7 +373,7 @@ impl<'a> GccLinker<'a> {
373
373
// * On OSX they have their own linker, not binutils'
374
374
// * For WebAssembly the only functional linker is LLD, which doesn't
375
375
// support hint flags
376
- !self . sess . target . is_like_osx && !self . sess . target . is_like_wasm
376
+ !self . sess . target . is_like_darwin && !self . sess . target . is_like_wasm
377
377
}
378
378
379
379
// Some platforms take hints about whether a library is static or dynamic.
@@ -425,7 +425,7 @@ impl<'a> GccLinker<'a> {
425
425
426
426
fn build_dylib ( & mut self , crate_type : CrateType , out_filename : & Path ) {
427
427
// On mac we need to tell the linker to let this library be rpathed
428
- if self . sess . target . is_like_osx {
428
+ if self . sess . target . is_like_darwin {
429
429
if self . is_cc ( ) {
430
430
// `-dynamiclib` makes `cc` pass `-dylib` to the linker.
431
431
self . cc_arg ( "-dynamiclib" ) ;
@@ -470,7 +470,7 @@ impl<'a> GccLinker<'a> {
470
470
471
471
fn with_as_needed ( & mut self , as_needed : bool , f : impl FnOnce ( & mut Self ) ) {
472
472
if !as_needed {
473
- if self . sess . target . is_like_osx {
473
+ if self . sess . target . is_like_darwin {
474
474
// FIXME(81490): ld64 doesn't support these flags but macOS 11
475
475
// has -needed-l{} / -needed_library {}
476
476
// but we have no way to detect that here.
@@ -485,7 +485,7 @@ impl<'a> GccLinker<'a> {
485
485
f ( self ) ;
486
486
487
487
if !as_needed {
488
- if self . sess . target . is_like_osx {
488
+ if self . sess . target . is_like_darwin {
489
489
// See above FIXME comment
490
490
} else if self . is_gnu && !self . sess . target . is_like_windows {
491
491
self . link_arg ( "--as-needed" ) ;
@@ -618,7 +618,7 @@ impl<'a> Linker for GccLinker<'a> {
618
618
let colon = if verbatim && self . is_gnu { ":" } else { "" } ;
619
619
if !whole_archive {
620
620
self . link_or_cc_arg ( format ! ( "-l{colon}{name}" ) ) ;
621
- } else if self . sess . target . is_like_osx {
621
+ } else if self . sess . target . is_like_darwin {
622
622
// -force_load is the macOS equivalent of --whole-archive, but it
623
623
// involves passing the full path to the library to link.
624
624
self . link_arg ( "-force_load" ) ;
@@ -634,7 +634,7 @@ impl<'a> Linker for GccLinker<'a> {
634
634
self . hint_static ( ) ;
635
635
if !whole_archive {
636
636
self . link_or_cc_arg ( path) ;
637
- } else if self . sess . target . is_like_osx {
637
+ } else if self . sess . target . is_like_darwin {
638
638
self . link_arg ( "-force_load" ) . link_arg ( path) ;
639
639
} else {
640
640
self . link_arg ( "--whole-archive" ) . link_arg ( path) . link_arg ( "--no-whole-archive" ) ;
@@ -669,7 +669,7 @@ impl<'a> Linker for GccLinker<'a> {
669
669
// -dead_strip can't be part of the pre_link_args because it's also used
670
670
// for partial linking when using multiple codegen units (-r). So we
671
671
// insert it here.
672
- if self . sess . target . is_like_osx {
672
+ if self . sess . target . is_like_darwin {
673
673
self . link_arg ( "-dead_strip" ) ;
674
674
675
675
// If we're building a dylib, we don't use --gc-sections because LLVM
@@ -727,7 +727,7 @@ impl<'a> Linker for GccLinker<'a> {
727
727
728
728
fn debuginfo ( & mut self , strip : Strip , _: & [ PathBuf ] ) {
729
729
// MacOS linker doesn't support stripping symbols directly anymore.
730
- if self . sess . target . is_like_osx {
730
+ if self . sess . target . is_like_darwin {
731
731
return ;
732
732
}
733
733
@@ -794,7 +794,7 @@ impl<'a> Linker for GccLinker<'a> {
794
794
795
795
debug ! ( "EXPORTED SYMBOLS:" ) ;
796
796
797
- if self . sess . target . is_like_osx {
797
+ if self . sess . target . is_like_darwin {
798
798
// Write a plain, newline-separated list of symbols
799
799
let res: io:: Result < ( ) > = try {
800
800
let mut f = File :: create_buffered ( & path) ?;
@@ -840,7 +840,7 @@ impl<'a> Linker for GccLinker<'a> {
840
840
}
841
841
}
842
842
843
- if self . sess . target . is_like_osx {
843
+ if self . sess . target . is_like_darwin {
844
844
self . link_arg ( "-exported_symbols_list" ) . link_arg ( path) ;
845
845
} else if self . sess . target . is_like_solaris {
846
846
self . link_arg ( "-M" ) . link_arg ( path) ;
0 commit comments