I followed similar logic in TapiFile.cpp.
Details
- Reviewers
smeenai - Group Reviewers
Restricted Project - Commits
- rGa499898e86ec: [lld-macho] Generate ObjC symbols from .tbd files
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
lld/MachO/InputFiles.cpp | ||
---|---|---|
394 | Does this really need the full context? | |
421 | Same as last time - would be nice to actually compose with the user label prefix. Remember that x86_64-apple-coff is a real target - and the user label prefix is empty there. This breaks because you are assuming that the user label prefix is _. | |
lld/test/MachO/Inputs/MacOSX.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation.tbd | ||
13 | Id really rather see a second library added (Foundation.tbd) rather than put this into CoreFoundation. This makes it confusing for others IMO. | |
lld/test/MachO/stub-link.s | ||
6 | I think that we should go through and actually improve all the tests to use -syslibroot. This really looks far better (and matches the real world usage). |
lld/MachO/InputFiles.cpp | ||
---|---|---|
394 | I don't think explicit captures add much to readability, especially for such a small lambda body... (I don't think avoiding auto does either, that was @ruiu's preference) | |
421 |
oh what... is this actually used? | |
lld/test/MachO/Inputs/MacOSX.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation.tbd | ||
13 | these members are from CoreFoundation in the actual SDK, though... | |
lld/test/MachO/stub-link.s | ||
6 | agreed, will do it in a separate commit |
lld/MachO/InputFiles.cpp | ||
---|---|---|
410 | Huh, interesting. I thought -ObjC only influenced the behavior for static libraries. | |
421 | I believe it's used for UEFI. Presumably that's something for LLD for COFF to worry about and not LLD for Mach-O though, right? Also, I'd be surprised if Objective-C is being used for UEFI :) |
lld/MachO/InputFiles.cpp | ||
---|---|---|
421 | Sorry, that was a partial thought. What I was getting at is that the user label prefix is important and in that case, you have MachO conversions that occur. We should be more careful about the user label prefix rather than assume that it is guaranteed to be _. That is a convention that is target dependent and not MachO dependent. |
lld/MachO/InputFiles.cpp | ||
---|---|---|
421 | I agree with you in theory, but in practice, are there any targets we'll be linking with LLD for Mach-O where you wouldn't expect the underscore? I think we're pretty much assuming that Mach-O == an Apple Mach-O target; we're certainly not testing with anything else. Out of curiosity, what does ld64 do? |
lld/MachO/InputFiles.cpp | ||
---|---|---|
421 | ld64 includes the underscore prefixes in their string literals |
Does this really need the full context?