Darwin targets were generating CMake install rules but not the
corresponding install targets. Centralize the existing install target
creation to a function and use that function for both Darwin and
non-Darwin builds.
Details
- Reviewers
beanz phosek - Commits
- rZORG9b26b6980ff9: [compiler-rt] Create install targets for Darwin libraries
rZORGd40cb7709bb9: [compiler-rt] Create install targets for Darwin libraries
rG9b26b6980ff9: [compiler-rt] Create install targets for Darwin libraries
rGd40cb7709bb9: [compiler-rt] Create install targets for Darwin libraries
rG45ab7d7dc64a: [compiler-rt] Create install targets for Darwin libraries
rCRT360181: [compiler-rt] Create install targets for Darwin libraries
rL360181: [compiler-rt] Create install targets for Darwin libraries
Diff Detail
- Repository
- rL LLVM
Event Timeline
LGTM
compiler-rt/cmake/Modules/CompilerRTUtils.cmake | ||
---|---|---|
423 ↗ | (On Diff #198103) | IIUC, only the first invocation of this function will create the parent target and all the following ones will reuse it (for all systems/architectures with the same parent target that is). One possible alternative would be to split this into its function to avoid all those extra checks on subsequent invocations of this function. |
compiler-rt/cmake/Modules/CompilerRTUtils.cmake | ||
---|---|---|
423 ↗ | (On Diff #198103) | Hmm, so the split function would just create the install-$parent targets? How would we ensure the split function gets called for each $parent without doing some sort of existence check? Note that I've copied this logic from similar logic in AddCompilerRT.cmake: https://github.com/llvm/llvm-project/blob/491746a584723c147f8910c1ad5051c507afd735/compiler-rt/cmake/Modules/AddCompilerRT.cmake#L237 |
compiler-rt/cmake/Modules/CompilerRTUtils.cmake | ||
---|---|---|
423 ↗ | (On Diff #198103) | Ah, I guess you meant having a second function that's called outside the loop in AddCompilerRT? I'm not sure if target checks are expensive enough to make that worth it ... I couldn't measure any non-noise CMake configure time difference before and after this patch. |