The monorepo build will still use the include from libunwind/ so nothing
has changed for that configuration. There is also now a check to ensure
that the file in lld/ and the file in libunwind/ are in sync.
Details
- Reviewers
smeenai - Group Reviewers
Restricted Project
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
To be clear, this is to support a build scenario where you only have the source tree under lld available?
lld/MachO/CMakeLists.txt | ||
---|---|---|
17 | Is this a debugging leftover? |
Ah, I'd missed that part of the definition in https://discourse.llvm.org/t/rfc-stand-alone-build-support/61291. Thanks for confirming.
The duplication here is really unfortunate, especially cos the burden of keeping the copied header up-to-date will fall on non-standalone build users. On the other hand, this header hasn't seen actual (non-license) update since 2016, so I imagine it'll remain pretty stable going forward.
An alternative would have been to move the header into LLVM (I think BinaryFormat would be a reasonable place for it), and then have libunwind and LLD both use it from there. It's still unclear if libunwind can use LLVM headers though; I don't see any existing usage, and the demangler is still duplicated between libc++abi and LLVM, for example.
All things considered, I'm fine with this; I'll give others some time to chime in as well though.
Yes, I tried to ease this burden a little bit by failing the build if the bundled file was different than the version in libunwind, so at least buildbots would catch it and notify whoever modified the file in libunwind.
Q: when will we have a situation where the contents of the monorepo aren't fully available? I get that standalone builds exist to avoid having to build the entire repo, but I was under the impression that they would still be done using a full checkout of llvm-project... is that not right?
If standalone builds are something we want to support (not clear to me), we need to find some way to do them that doesn't require changes like this. This imposes a huge cost on everyone for sometime we haven't needed for years.
For the record, we're using standalone builds on Gentoo and I don't think we need anything like this — we have to fetch the complete llvmorg tarball anyway, so we have no problem unpacking the header files from libunwind.
@int3 @MaskRay The kind of stand-alone builds we are trying to support are documented here: D123968
There is more discussion on the rationale for supporting stand-alone builds here:
https://discourse.llvm.org/t/rfc-stand-alone-build-support/61291
I see, so you're trying to support the sparse checkout case. How important is that? It doesn't seem like the LLVM repo is so big as to make sparse checkouts that much of a perf win...
While we're figuring this out ... @ldionne, @phosek, do the runtimes build changes (https://libcxx.llvm.org/BuildingLibcxx.html) also mean that we assume a full LLVM checkout is present? If so, we could move this header to LLVM and have both libunwind and LLD use it from there, which would sidestep the issue here.
I think for now what I'll do for now is just update D124405 to list libunwind as a required sub-directory for lld stand-alone builds. This will get me unblocked and make it possible to set up the CI.
Is this a debugging leftover?