[PATCH] D44420: [cmake] fix a typo in llvm_config macro
Pavel Labath via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 13 04:55:34 PDT 2018
labath created this revision.
labath added reviewers: mgorny, beanz.
The macro parses out the USE_SHARED option out of the argument list, but
then ignores it and accesses the variable with the same name instead. It
seems the intention here was to check the argument value.
Technically, this is NFC, because the only in-tree usage
(add_llvm_executable) of USE_SHARED sets both the variable and the
argument when calling llvm_config, but it makes the usage of this macro
for out-of-tree users more sensible.
Repository:
rL LLVM
https://reviews.llvm.org/D44420
Files:
cmake/modules/LLVM-Config.cmake
Index: cmake/modules/LLVM-Config.cmake
===================================================================
--- cmake/modules/LLVM-Config.cmake
+++ cmake/modules/LLVM-Config.cmake
@@ -68,7 +68,7 @@
cmake_parse_arguments(ARG "USE_SHARED" "" "" ${ARGN})
set(link_components ${ARG_UNPARSED_ARGUMENTS})
- if(USE_SHARED)
+ if(ARG_USE_SHARED)
# If USE_SHARED is specified, then we link against libLLVM,
# but also against the component libraries below. This is
# done in case libLLVM does not contain all of the components
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44420.138155.patch
Type: text/x-patch
Size: 541 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180313/29651563/attachment.bin>
More information about the llvm-commits
mailing list