This cuts another 5 seconds off the top it takes lld to link our large
project. I assume because the parsing of the larger tablegen file
happened many times, when we actually only wanted to handle these 2
options. This is a bit more work to maintain these arguments in 2 places
but they shouldn't change too much to be a big problem.
Details
- Reviewers
gkm - Group Reviewers
Restricted Project
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
lld/MachO/DriverUtils.cpp | ||
---|---|---|
54 | I assume there is another, better, way for me to define 2 OptTables in the same file, I would appreciate pointers! |
lld/MachO/DriverUtils.cpp | ||
---|---|---|
54 | idk if there are more elegant ways of working with OptTables, but I was wondering if it would be simpler to not use an OptTable altogether. Given that there are only two unique prefixes that we need to check for, we could do it by hand -- something like if (s.startswith("-l")) { ... }. |
lld/MachO/DriverUtils.cpp | ||
---|---|---|
54 | Yea I was considering that too. I do think that would be much simpler. It looks like we're only missing 2 so it shouldn't grow much https://github.com/keith/ld64/blob/2ff40b093f1b20dad35d48480da016bc380707dd/src/ld/Resolver.cpp#L324-L363 |
lld/MachO/DriverUtils.cpp | ||
---|---|---|
54 | Submitted https://reviews.llvm.org/D113235 for discussion |
Oh, interesting. Any opinion on how this compares to the alternate approach taken for this in D78845 for the COFF linker?
I assume there is another, better, way for me to define 2 OptTables in the same file, I would appreciate pointers!