[clang] [clang][Darwin] Disable ObjC class selector stubs when using LLD (PR #203388)

Nico Weber via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 12 04:30:40 PDT 2026


================
@@ -3517,13 +3517,17 @@ void Darwin::addClangTargetOptions(
       (getLinkerVersion(DriverArgs) >= VersionTuple(811, 2)))
     CC1Args.push_back("-fobjc-msgsend-selector-stubs");
 
+  bool LinkerIsLLD = false;
+  GetLinkerPath(&LinkerIsLLD);
+
   // Enable objc_msgSend class selector stubs by default if the linker supports
   // it. ld64-1250+ does, for arm64, arm64e, and arm64_32.
+  // FIXME(#203385): LLD doesn't support ObjC class selector stubs yet.
----------------
nico wrote:

Very nit: These parametrized FIXMEs are very rare:

```
% rg -w 'FIXME' clang/lib | wc -l   
    3978
% rg 'FIXME:' clang/lib | wc -l
    3728
% rg 'FIXME\(' clang/lib | wc -l
      62
```

Looking through `rg 'FIXME:.*\d{4}' clang/lib` and `rg 'FIXME:.*\d{4}' llvm/lib`, I'd say the most common way to do this is

```
// FIXME: LLD doesn't support ObjC class selector stubs yet, PR203385.
```

But we're apparently fairly inconsistent about this, so it doesn't matter all that much. Just saying it for next time :)

https://github.com/llvm/llvm-project/pull/203388


More information about the cfe-commits mailing list