Skip to content

Commit

Permalink
[cmake] fix a typo in llvm_config macro
Browse files Browse the repository at this point in the history
Summary:
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.

Reviewers: mgorny, beanz

Reviewed By: mgorny

Subscribers: foutrelis, llvm-commits

Differential Revision: https://reviews.llvm.org/D44420

llvm-svn: 334082
  • Loading branch information
labath committed Jun 6, 2018
1 parent 6dde836 commit 1b8bfd7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion llvm/cmake/modules/LLVM-Config.cmake
Expand Up @@ -68,7 +68,7 @@ macro(llvm_config executable)
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
Expand Down

0 comments on commit 1b8bfd7

Please sign in to comment.