LLVM_DISTRIBUTION_COMPONENTS now influences the llvm binary in the
normal cmake output directory when it is set. This allows for
distribution targets to only include tools they want in the llvm
binary. It must be done this way because only one target can be
associated with a specific output name.
Details
Details
- Reviewers
phosek - Commits
- rG3b0df701b0d9: [llvm-driver] Support single distributions
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Since distributions are used for selecting components that are distributed in the toolchain, and most vendors only have a single distribution, I'd prefer using the name llvm (rather than llvm-distribution) for the default distribution since that binary is going to be shipped in the toolchain (and "distribution" is an internal concept that users shouldn't be concerned with).
I wonder if we could use the following approach:
- If LLVM_DISTRIBUTION_COMPONENTS isn't set, then combine all supported tools into llvm driver.
- If LLVM_DISTRIBUTION_COMPONENTS is set, then combine all supported tools listed in LLVM_DISTRIBUTION_COMPONENTS into llvm driver and leave all other tools standalone.
- (In the future) If LLVM_DISTRIBUTIONS is set, then combine all supported tools listed in LLVM_<name>_DISTRIBUTION_COMPONENTS into llvm-<name> driver and leave all other tools standalone.
What do you think?
llvm/cmake/modules/AddLLVM.cmake | ||
---|---|---|
2068 | Should this apply to ${dest} as well? | |
llvm/tools/llvm-driver/CMakeLists.txt | ||
31 ↗ | (On Diff #450465) | Nit: you can omit, variables in CMake don't need to be initialized. |
Should this apply to ${dest} as well?