[PATCH] D124197: [CMake] Ensure correct extension for llvm-lit is used on Windows when LLVM_INSTALL_UTILS is enabled.
Douglas Gliner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 21 12:25:26 PDT 2022
dgg5503 created this revision.
dgg5503 added reviewers: stephenneuendorffer, vvereschaka.
Herald added a subscriber: mgorny.
Herald added a project: All.
dgg5503 requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
D77110 <https://reviews.llvm.org/D77110> initially added support for setting `LLVM_CONFIG_DEFAULT_EXTERNAL_LIT`
to `llvm-lit` in the install directory if `LLVM_INSTALL_UTILS` is on.
D79144 <https://reviews.llvm.org/D79144> ensured that, on Windows, `llvm-lit.py` is correctly set for
`LLVM_CONFIG_DEFAULT_EXTERNAL_LIT` within the context of the build area,
however, it did not account for the install area which is the latter `set`
directive for this same variable.
This patch ensures that `LLVM_CONFIG_DEFAULT_EXTERNAL_LIT` under the install
area uses `llvm-lit.py` under Windows since `llvm-lit` without the extension
is not created.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D124197
Files:
llvm/cmake/modules/CMakeLists.txt
Index: llvm/cmake/modules/CMakeLists.txt
===================================================================
--- llvm/cmake/modules/CMakeLists.txt
+++ llvm/cmake/modules/CMakeLists.txt
@@ -135,7 +135,11 @@
# Generate a default location for lit
if (LLVM_INSTALL_UTILS AND LLVM_BUILD_UTILS)
- set(LLVM_CONFIG_DEFAULT_EXTERNAL_LIT "${LLVM_CONFIG_TOOLS_BINARY_DIR}/llvm-lit")
+ if (CMAKE_HOST_WIN32 AND NOT CYGWIN)
+ set(LLVM_CONFIG_DEFAULT_EXTERNAL_LIT "${LLVM_CONFIG_TOOLS_BINARY_DIR}/llvm-lit.py")
+ else()
+ set(LLVM_CONFIG_DEFAULT_EXTERNAL_LIT "${LLVM_CONFIG_TOOLS_BINARY_DIR}/llvm-lit")
+ endif()
endif()
get_config_exports_includes(LLVM LLVM_CONFIG_INCLUDE_EXPORTS)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D124197.424251.patch
Type: text/x-patch
Size: 687 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220421/bf04b156/attachment.bin>
More information about the llvm-commits
mailing list