clang puts -framework CoreFoundation in this load command for files
that use @available / __builtin_available. Without support for this,
binaries that don't explicitly link to CoreFoundation fail to link.
Details
- Reviewers
int3 - Group Reviewers
Restricted Project - Commits
- rG16b1f6e3858b: [mac/lld] Add support for the LC_LINKER_OPTION load command in o files
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Thanks!
lld/MachO/Driver.cpp | ||
---|---|---|
370–371 | I guess it's not strictly necessary. It matches the flow in parseDirectives() in lld/COFF. The reasoning is probably that this first stage gives you a list of generally valid args, and the 2nd pass below checks which of them are valid in directives / load commands. |
lgtm
lld/MachO/Driver.cpp | ||
---|---|---|
370–371 | I see. How about dropping the "ignoring" and just having "unknown argument:" then? "Ignoring" suggests that we are not erroring out... it looks like parseDirectives in the ELF port issues a warning, and {ELF,MachO}OptTable::parse just errors with "unknown argument". As an aside... it's a bit unfortunate that "unknown argument" refers to the CLI flag, while "missing argument" refers to the argument to a flag... but this overload of "argument" seems to happen in many places in the LLVM codebase already so ¯\_(ツ)_/¯ |
lld/MachO/Driver.cpp | ||
---|---|---|
370–371 | Sounds good :) |
would be good to have a short comment about what LC_LINKER_OPTION contains