This undocumented ld64 flag, based on the most recent ld64 source dump
from Xcode 12, only applies to i386. It seems like on all newer
architectures this behavior is the default.
Details
- Reviewers
gkm int3 - Group Reviewers
Restricted Project - Commits
- rGe7fdff403e84: [lld-macho] Silently ignore the -objc_abi_version
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
This one is a bit of a stretch, I'm not sure if you want to start dropping options like this, especially since Apple reserves the right to change the behavior over time. The only benefit in ignoring this is without dropping it, if you want to maintain compatibility and users are passing this, they cannot eliminate the warning produced (or the failure if they're using -fatal_warnings)
lld/MachO/Options.td | ||
---|---|---|
1331 | Why do we need this? Doesn't removing the Flags<HelpHidden> effectively ignore it silently? (should also add a test to silent-ignore.test) |
lld/MachO/Options.td | ||
---|---|---|
1331 | This is primarily for the C++ change that stops this category from printing a warning. That's what silently means in this case. |
I like this, but let's see if anyone else chimes in over the next few days. I agree that we should add it to silent-ignore.test though.
I just took a list at this test, it seems like it's a bit invalid today. It looks like --version short circuits too early and the invalid flags aren't a problem in that case. -objc_abi_version is actually already in there. Am I reading the recommendation right there? I can update it to actually try to link a file so it gets far enough to error if that's the intent?
Oh, I remember what that test was checking for now... it was just there to make sure that any unimplemented flags were still being parsed correctly, regardless of whether we were emitting diagnostic warnings/errors for them. (Our Options.td initially had a bunch of flags expecting wrong numbers of arguments, which messed up the parsing of all the other flags even when they were ignored. That's the error condition that the --not-an-ignored-argument run command is checking for.)
I think for this diff, we can add another RUN command to the silent-ignore.test, but this time specifically checking that we don't emit any diagnostics for -objc_abi_version.
clang-format not found in user’s local PATH; not linting file.