@@ -373,7 +373,7 @@ impl<'a> GccLinker<'a> {
373373 // * On OSX they have their own linker, not binutils'
374374 // * For WebAssembly the only functional linker is LLD, which doesn't
375375 // 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
377377 }
378378
379379 // Some platforms take hints about whether a library is static or dynamic.
@@ -425,7 +425,7 @@ impl<'a> GccLinker<'a> {
425425
426426 fn build_dylib ( & mut self , crate_type : CrateType , out_filename : & Path ) {
427427 // 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 {
429429 if self . is_cc ( ) {
430430 // `-dynamiclib` makes `cc` pass `-dylib` to the linker.
431431 self . cc_arg ( "-dynamiclib" ) ;
@@ -470,7 +470,7 @@ impl<'a> GccLinker<'a> {
470470
471471 fn with_as_needed ( & mut self , as_needed : bool , f : impl FnOnce ( & mut Self ) ) {
472472 if !as_needed {
473- if self . sess . target . is_like_osx {
473+ if self . sess . target . is_like_darwin {
474474 // FIXME(81490): ld64 doesn't support these flags but macOS 11
475475 // has -needed-l{} / -needed_library {}
476476 // but we have no way to detect that here.
@@ -485,7 +485,7 @@ impl<'a> GccLinker<'a> {
485485 f ( self ) ;
486486
487487 if !as_needed {
488- if self . sess . target . is_like_osx {
488+ if self . sess . target . is_like_darwin {
489489 // See above FIXME comment
490490 } else if self . is_gnu && !self . sess . target . is_like_windows {
491491 self . link_arg ( "--as-needed" ) ;
@@ -618,7 +618,7 @@ impl<'a> Linker for GccLinker<'a> {
618618 let colon = if verbatim && self . is_gnu { ":" } else { "" } ;
619619 if !whole_archive {
620620 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 {
622622 // -force_load is the macOS equivalent of --whole-archive, but it
623623 // involves passing the full path to the library to link.
624624 self . link_arg ( "-force_load" ) ;
@@ -634,7 +634,7 @@ impl<'a> Linker for GccLinker<'a> {
634634 self . hint_static ( ) ;
635635 if !whole_archive {
636636 self . link_or_cc_arg ( path) ;
637- } else if self . sess . target . is_like_osx {
637+ } else if self . sess . target . is_like_darwin {
638638 self . link_arg ( "-force_load" ) . link_arg ( path) ;
639639 } else {
640640 self . link_arg ( "--whole-archive" ) . link_arg ( path) . link_arg ( "--no-whole-archive" ) ;
@@ -669,7 +669,7 @@ impl<'a> Linker for GccLinker<'a> {
669669 // -dead_strip can't be part of the pre_link_args because it's also used
670670 // for partial linking when using multiple codegen units (-r). So we
671671 // insert it here.
672- if self . sess . target . is_like_osx {
672+ if self . sess . target . is_like_darwin {
673673 self . link_arg ( "-dead_strip" ) ;
674674
675675 // If we're building a dylib, we don't use --gc-sections because LLVM
@@ -727,7 +727,7 @@ impl<'a> Linker for GccLinker<'a> {
727727
728728 fn debuginfo ( & mut self , strip : Strip , _: & [ PathBuf ] ) {
729729 // 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 {
731731 return ;
732732 }
733733
@@ -794,7 +794,7 @@ impl<'a> Linker for GccLinker<'a> {
794794
795795 debug ! ( "EXPORTED SYMBOLS:" ) ;
796796
797- if self . sess . target . is_like_osx {
797+ if self . sess . target . is_like_darwin {
798798 // Write a plain, newline-separated list of symbols
799799 let res: io:: Result < ( ) > = try {
800800 let mut f = File :: create_buffered ( & path) ?;
@@ -840,7 +840,7 @@ impl<'a> Linker for GccLinker<'a> {
840840 }
841841 }
842842
843- if self . sess . target . is_like_osx {
843+ if self . sess . target . is_like_darwin {
844844 self . link_arg ( "-exported_symbols_list" ) . link_arg ( path) ;
845845 } else if self . sess . target . is_like_solaris {
846846 self . link_arg ( "-M" ) . link_arg ( path) ;
0 commit comments