@@ -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" ) ;
@@ -471,7 +471,7 @@ impl<'a> GccLinker<'a> {
471
471
472
472
fn with_as_needed ( & mut self , as_needed : bool , f : impl FnOnce ( & mut Self ) ) {
473
473
if !as_needed {
474
- if self . sess . target . is_like_osx {
474
+ if self . sess . target . is_like_darwin {
475
475
// FIXME(81490): ld64 doesn't support these flags but macOS 11
476
476
// has -needed-l{} / -needed_library {}
477
477
// but we have no way to detect that here.
@@ -486,7 +486,7 @@ impl<'a> GccLinker<'a> {
486
486
f ( self ) ;
487
487
488
488
if !as_needed {
489
- if self . sess . target . is_like_osx {
489
+ if self . sess . target . is_like_darwin {
490
490
// See above FIXME comment
491
491
} else if self . is_gnu && !self . sess . target . is_like_windows {
492
492
self . link_arg ( "--as-needed" ) ;
@@ -619,7 +619,7 @@ impl<'a> Linker for GccLinker<'a> {
619
619
let colon = if verbatim && self . is_gnu { ":" } else { "" } ;
620
620
if !whole_archive {
621
621
self . link_or_cc_arg ( format ! ( "-l{colon}{name}" ) ) ;
622
- } else if self . sess . target . is_like_osx {
622
+ } else if self . sess . target . is_like_darwin {
623
623
// -force_load is the macOS equivalent of --whole-archive, but it
624
624
// involves passing the full path to the library to link.
625
625
self . link_arg ( "-force_load" ) ;
@@ -635,7 +635,7 @@ impl<'a> Linker for GccLinker<'a> {
635
635
self . hint_static ( ) ;
636
636
if !whole_archive {
637
637
self . link_or_cc_arg ( path) ;
638
- } else if self . sess . target . is_like_osx {
638
+ } else if self . sess . target . is_like_darwin {
639
639
self . link_arg ( "-force_load" ) . link_arg ( path) ;
640
640
} else {
641
641
self . link_arg ( "--whole-archive" ) . link_arg ( path) . link_arg ( "--no-whole-archive" ) ;
@@ -670,7 +670,7 @@ impl<'a> Linker for GccLinker<'a> {
670
670
// -dead_strip can't be part of the pre_link_args because it's also used
671
671
// for partial linking when using multiple codegen units (-r). So we
672
672
// insert it here.
673
- if self . sess . target . is_like_osx {
673
+ if self . sess . target . is_like_darwin {
674
674
self . link_arg ( "-dead_strip" ) ;
675
675
676
676
// If we're building a dylib, we don't use --gc-sections because LLVM
@@ -728,7 +728,7 @@ impl<'a> Linker for GccLinker<'a> {
728
728
729
729
fn debuginfo ( & mut self , strip : Strip , _: & [ PathBuf ] ) {
730
730
// MacOS linker doesn't support stripping symbols directly anymore.
731
- if self . sess . target . is_like_osx {
731
+ if self . sess . target . is_like_darwin {
732
732
return ;
733
733
}
734
734
@@ -795,7 +795,7 @@ impl<'a> Linker for GccLinker<'a> {
795
795
796
796
debug ! ( "EXPORTED SYMBOLS:" ) ;
797
797
798
- if self . sess . target . is_like_osx {
798
+ if self . sess . target . is_like_darwin {
799
799
// Write a plain, newline-separated list of symbols
800
800
let res: io:: Result < ( ) > = try {
801
801
let mut f = File :: create_buffered ( & path) ?;
@@ -841,7 +841,7 @@ impl<'a> Linker for GccLinker<'a> {
841
841
}
842
842
}
843
843
844
- if self . sess . target . is_like_osx {
844
+ if self . sess . target . is_like_darwin {
845
845
self . link_arg ( "-exported_symbols_list" ) . link_arg ( path) ;
846
846
} else if self . sess . target . is_like_solaris {
847
847
self . link_arg ( "-M" ) . link_arg ( path) ;
0 commit comments