[PATCH] D117061: [BOLT][CMAKE] Accept BOLT_CLANG_EXE and BOLT_LLD_EXE
Shoaib Meenai via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 13 16:59:18 PST 2022
smeenai added a comment.
Herald added a reviewer: rafauler.
Looks mostly good, just had one question.
================
Comment at: bolt/CMakeLists.txt:19
if (LLVM_INCLUDE_TESTS)
string(FIND "${LLVM_ENABLE_PROJECTS}" "clang" POSITION)
+ if (NOT ${POSITION} EQUAL -1 OR BOLT_CLANG_EXE)
----------------
Not your diff, but CMake has `if(IN_LIST)` now, which you can use instead of the `string(FIND)`, e.g.
```
if("clang" IN_LIST LLVM_ENABLE_PROJECTS)
```
================
Comment at: bolt/test/CMakeLists.txt:17
+if (BOLT_CLANG_EXE)
+ add_executable(clang IMPORTED GLOBAL)
+ set_property(TARGET clang PROPERTY IMPORTED_LOCATION "${BOLT_CLANG_EXE}")
----------------
Hmm, will these targets not clash with the `clang` and `lld` targets from those LLVM subprojects, if you have those enabled? Is the assumption that you would only use `BOLT_CLANG_EXE` and `BOLT_LLD_EXE` if you're not enabling those subprojects?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D117061/new/
https://reviews.llvm.org/D117061
More information about the llvm-commits
mailing list