@@ -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" ) ;
@@ -471,7 +471,7 @@ impl<'a> GccLinker<'a> {
471471
472472 fn with_as_needed ( & mut self , as_needed : bool , f : impl FnOnce ( & mut Self ) ) {
473473 if !as_needed {
474- if self . sess . target . is_like_osx {
474+ if self . sess . target . is_like_darwin {
475475 // FIXME(81490): ld64 doesn't support these flags but macOS 11
476476 // has -needed-l{} / -needed_library {}
477477 // but we have no way to detect that here.
@@ -486,7 +486,7 @@ impl<'a> GccLinker<'a> {
486486 f ( self ) ;
487487
488488 if !as_needed {
489- if self . sess . target . is_like_osx {
489+ if self . sess . target . is_like_darwin {
490490 // See above FIXME comment
491491 } else if self . is_gnu && !self . sess . target . is_like_windows {
492492 self . link_arg ( "--as-needed" ) ;
@@ -619,7 +619,7 @@ impl<'a> Linker for GccLinker<'a> {
619619 let colon = if verbatim && self . is_gnu { ":" } else { "" } ;
620620 if !whole_archive {
621621 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 {
623623 // -force_load is the macOS equivalent of --whole-archive, but it
624624 // involves passing the full path to the library to link.
625625 self . link_arg ( "-force_load" ) ;
@@ -635,7 +635,7 @@ impl<'a> Linker for GccLinker<'a> {
635635 self . hint_static ( ) ;
636636 if !whole_archive {
637637 self . link_or_cc_arg ( path) ;
638- } else if self . sess . target . is_like_osx {
638+ } else if self . sess . target . is_like_darwin {
639639 self . link_arg ( "-force_load" ) . link_arg ( path) ;
640640 } else {
641641 self . link_arg ( "--whole-archive" ) . link_arg ( path) . link_arg ( "--no-whole-archive" ) ;
@@ -670,7 +670,7 @@ impl<'a> Linker for GccLinker<'a> {
670670 // -dead_strip can't be part of the pre_link_args because it's also used
671671 // for partial linking when using multiple codegen units (-r). So we
672672 // insert it here.
673- if self . sess . target . is_like_osx {
673+ if self . sess . target . is_like_darwin {
674674 self . link_arg ( "-dead_strip" ) ;
675675
676676 // If we're building a dylib, we don't use --gc-sections because LLVM
@@ -728,7 +728,7 @@ impl<'a> Linker for GccLinker<'a> {
728728
729729 fn debuginfo ( & mut self , strip : Strip , _: & [ PathBuf ] ) {
730730 // 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 {
732732 return ;
733733 }
734734
@@ -795,7 +795,7 @@ impl<'a> Linker for GccLinker<'a> {
795795
796796 debug ! ( "EXPORTED SYMBOLS:" ) ;
797797
798- if self . sess . target . is_like_osx {
798+ if self . sess . target . is_like_darwin {
799799 // Write a plain, newline-separated list of symbols
800800 let res: io:: Result < ( ) > = try {
801801 let mut f = File :: create_buffered ( & path) ?;
@@ -841,7 +841,7 @@ impl<'a> Linker for GccLinker<'a> {
841841 }
842842 }
843843
844- if self . sess . target . is_like_osx {
844+ if self . sess . target . is_like_darwin {
845845 self . link_arg ( "-exported_symbols_list" ) . link_arg ( path) ;
846846 } else if self . sess . target . is_like_solaris {
847847 self . link_arg ( "-M" ) . link_arg ( path) ;
0 commit comments