We currently use target_link_libraries without an explicit scope
specifier (INTERFACE, PRIVATE or PUBLIC) when linking executables.
Dependencies added in this way apply to both the target and its
dependencies, i.e. they become part of the executable's link interface
and are transitive.
Transitive dependencies generally don't make sense for executables,
since you wouldn't normally be linking against an executable. This also
causes issues for generating install export files when using
LLVM_DISTRIBUTION_COMPONENTS. For example, clang has a lot of LLVM
library dependencies, which are currently added as interface
dependencies. If clang is in the distribution components but the LLVM
libraries it depends on aren't (which is a perfectly legitimate use case
if the LLVM libraries are being built static and there are therefore no
run-time dependencies on them), CMake will complain about the LLVM
libraries not being in export set when attempting to generate the
install export file for clang. This is reasonable behavior on CMake's
part, and the right thing is for LLVM's build system to explicitly use
PRIVATE dependencies for executables.
Unfortunately, CMake doesn't allow you to mix and match the keyword and
non-keyword target_link_libraries signatures for a single target; i.e.,
if a single call to target_link_libraries for a particular target uses
one of the INTERFACE, PRIVATE, or PUBLIC keywords, all other calls must
also be updated to use those keywords. This means we must do this change
in a single shot. I also fully expect to have missed some instances; I
tested by enabling all the projects in the monorepo (except dragonegg),
and configuring both with and without shared libraries, on both Darwin
and Linux, but I'm planning to rely on the buildbots for other
configurations (since it should be pretty easy to fix those).
Even after this change, we still have a lot of target_link_libraries
calls that don't specify a scope keyword, mostly for shared libraries.
I'm thinking about addressing those in a follow-up, but that's a
separate change IMO.
Differential Revision: https://reviews.llvm.org/D40823
llvm-svn: 319840
D31709 [NFC] Refactor DiagnosticRenderer to use FullSourceLoc was committed
in r305684 and reverted in 305688 as clang-tidy and clang-query failed to
build. This change updates the extra tools to use the new interface.
Reviewers: christof, rnk, rsmith, rovka, alexfh
Reviewed By: alexfh
Differential Revision: https://reviews.llvm.org/D34513
llvm-svn: 306385
Summary:
This patch is provided in preparation for removing autoconf on 1/26. The proposal to remove autoconf on 1/26 was discussed on the llvm-dev thread here: http://lists.llvm.org/pipermail/llvm-dev/2016-January/093875.html
"Now I am become Death, the destroyer of worlds."
-J. Robert Oppenheimer
Reviewers: chandlerc, grosbach, bob.wilson, echristo
Subscribers: cfe-commits, klimek
Differential Revision: http://reviews.llvm.org/D16475
llvm-svn: 258864
Summary: This finishes the support for autocomplete for user defined values..
Reviewers: pcc
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D4851
llvm-svn: 215474
compilation database and makes it behave consistently with other clang tools.
Reviewers: klimek, pcc
Reviewed By: pcc
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D4763
llvm-svn: 214607
Summary:
Add new 'let' command to bind arbitrary values into constants.
These constants can then be used in the matcher expressions.
Reviewers: pcc
CC: cfe-commits
Differential Revision: http://reviews.llvm.org/D3383
llvm-svn: 206984
This removes all references to OwningPtr, which should be fairly
undisruptive to out-of-tree projects since they are unlikely to use
clang-tools-extra as a library instead of a set of tools.
llvm-svn: 203382
always produce as pretty of results as it does in LLVM and Clang, but
I don't mind and the value of having a single canonical ordering is very
high IMO.
Let me know if you spot really serious problems here.
llvm-svn: 198703
This tool is for interactive exploration of the Clang AST using AST matchers.
It currently allows the user to enter a matcher at an interactive prompt
and view the resulting bindings as diagnostics, AST pretty prints or AST
dumps. Example session:
$ cat foo.c
void foo(void) {}
$ clang-query foo.c --
clang-query> match functionDecl()
Match #1:
foo.c:1:1: note: "root" binds here
void foo(void) {}
^~~~~~~~~~~~~~~~~
1 match.
Differential Revision: http://llvm-reviews.chandlerc.com/D2098
llvm-svn: 194227