Currently ELFv2 is mostly set, but some places still default to ELFv1.
While this mostly works, it breaks in particular when lld is used with LTO,
as reported in https://github.com/llvm/llvm-project/issues/46697.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Event Timeline
Nice catch!
I'm not a LLVM maintainer but from FreeBSD PowerPC side I agree with the changes, only added two suggestions that could improve code readability
clang/lib/Basic/Targets/PPC.h | ||
---|---|---|
428 | The comparison Triple.getOSMajorVersion() == 0 works, but I think Triple.getOSVersion().empty() would better describe the intent | |
llvm/lib/Target/PowerPC/PPCTargetMachine.cpp | ||
237 | Same here, it could be TT.getOSVersion().empty() instead of TT.getOSMajorVersion() == 0 |
Yeah I think that is probably the better option, hope @pkubaj and @adalava agree with that?
As Brad's version covers both FreeBSD and OpenBSD, and also updates a bunch of unit tests, which this review appears to break (see the Unit Tests https://reviews.llvm.org/harbormaster/unit/214420/).
clang-format not found in user’s local PATH; not linting file.