diff options
author | Tom Stellard <tstellar@redhat.com> | 2019-07-03 22:45:55 +0000 |
---|---|---|
committer | Tom Stellard <tstellar@redhat.com> | 2019-07-03 22:45:55 +0000 |
commit | 2e97d2aa1bd313350e76be64299f19172a346bf9 (patch) | |
tree | f486cd121af50d7f4b2810314361c1a8e4fd247f /clang/cmake/modules | |
parent | e0308279cbdd18391c533d6501922429ff4ef839 (diff) | |
download | bcm5719-llvm-2e97d2aa1bd313350e76be64299f19172a346bf9.tar.gz bcm5719-llvm-2e97d2aa1bd313350e76be64299f19172a346bf9.zip |
cmake: Add CLANG_LINK_CLANG_DYLIB option
Summary:
Setting CLANG_LINK_CLANG_DYLIB=ON causes clang tools to link against
libclang_shared.so instead of the individual component libraries.
Reviewers: mgorny, beanz, smeenai, phosek, sylvestre.ledru
Subscribers: arphaman, cfe-commits, llvm-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D63503
llvm-svn: 365092
Diffstat (limited to 'clang/cmake/modules')
-rw-r--r-- | clang/cmake/modules/AddClang.cmake | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/cmake/modules/AddClang.cmake b/clang/cmake/modules/AddClang.cmake index 0c9cd667603..33f14246545 100644 --- a/clang/cmake/modules/AddClang.cmake +++ b/clang/cmake/modules/AddClang.cmake @@ -172,3 +172,12 @@ macro(add_clang_symlink name dest) # Always generate install targets llvm_install_symlink(${name} ${dest} ALWAYS_GENERATE) endmacro() + +function(clang_target_link_libraries target type) + if (CLANG_LINK_CLANG_DYLIB) + target_link_libraries(${target} ${type} clang_shared) + else() + target_link_libraries(${target} ${type} ${ARGN}) + endif() + +endfunction() |