We collect target names in the global LLVM_RUNTIMES property and
then export them to a per-target export file.
Details
Diff Detail
- Repository
- rCXXA libc++abi
Event Timeline
libcxx/lib/CMakeLists.txt | ||
---|---|---|
101 ↗ | (On Diff #185694) | Seems like an unrelated change? I can see how it was exposed by adding the exported target support, but it still seems like it could go in separately. |
llvm/runtimes/CMakeLists.txt | ||
220 ↗ | (On Diff #185694) | Why do we need to collect targets manually instead of just using the export(EXPORT) signature? |
223 ↗ | (On Diff #185694) | Is this assuming the per-triple resource directory layout? |
libcxx/lib/CMakeLists.txt | ||
---|---|---|
101 ↗ | (On Diff #185694) | D57872 is the right way which is the dependency of this change, once it lands I'll rebase this. |
llvm/runtimes/CMakeLists.txt | ||
220 ↗ | (On Diff #185694) | I just followed what LLVM already does for LLVMExports but I'm fine using export(EXPORT) if that's preferred. |
223 ↗ | (On Diff #185694) | Yes, that's already used for the runtimes build: https://github.com/llvm/llvm-project/blob/master/llvm/runtimes/CMakeLists.txt#L345 |
llvm/runtimes/CMakeLists.txt | ||
---|---|---|
220 ↗ | (On Diff #185694) | Yeah, the export(EXPORT) form should be equivalent here I think, and it should eliminate redundancies/prevent future divergences, so I'd prefer that. |
Sorry, had missed this.
I realized later that LLVM's export setup is to support selectively exporting components using LLVM_DISTRIBUTION_COMPONENTS. Is there an equivalent to that in the runtimes world? If there is, the export installation should respect that; if not, this LGTM.
Sorry, I did not see previous revisions of this, but this looks unrelated to CMake at all now -- am I mistaken? The only CMake change is re-indenting unless I missed something.
It was the right diff but uploaded to a wrong change ;)
There's LLVM_RUNTIME_DISTRIBUTION_COMPONENTS which @beanz introduced a while back which is supposed to serve the same purpose. I wired it up but there were some other issues that were revealed while testing this change, hopefully those should be all addressed now.
libunwind/src/CMakeLists.txt | ||
---|---|---|
160 ↗ | (On Diff #198347) | Should be libunwind and not libcxxabi |
llvm/runtimes/CMakeLists.txt | ||
216 ↗ | (On Diff #198347) | I think the way LLVM's build is set up, targets are always exported to the export file in the build tree (which requires maintaining the separate list of targets), but only exported to the install tree if they're in LLVM_DISTRIBUTION_COMPONENTS. I don't know how much you care about maintaining that behavior here. |
Oh, and you are doing this, but in llvm/runtimes. Why don't we handle this per project? I don't think we should assume that the rest of LLVM is available in order to export those targets.