[llvm] 50a6d3a - [CMake] Use PUBLIC link mode for static libraries
Petr Hosek via llvm-commits
llvm-commits at lists.llvm.org
Sat Feb 29 11:06:12 PST 2020
Author: Petr Hosek
Date: 2020-02-29T11:05:59-08:00
New Revision: 50a6d3a6486d81d21a2c31ce8522321e19bed35e
URL: https://github.com/llvm/llvm-project/commit/50a6d3a6486d81d21a2c31ce8522321e19bed35e
DIFF: https://github.com/llvm/llvm-project/commit/50a6d3a6486d81d21a2c31ce8522321e19bed35e.diff
LOG: [CMake] Use PUBLIC link mode for static libraries
Using INTERFACE prevents the use of imported libraries as we've done
in 00b3d49 because these aren't linked against the target, they're
only made part of the interface. This doesn't affect the output since
static libraries aren't being linked into, but it enables the use of
imported libraries.
Differential Revision: https://reviews.llvm.org/D74106
Added:
Modified:
llvm/cmake/modules/AddLLVM.cmake
Removed:
################################################################################
diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake
index db07fad7c6f3..7b95d8be1b60 100644
--- a/llvm/cmake/modules/AddLLVM.cmake
+++ b/llvm/cmake/modules/AddLLVM.cmake
@@ -607,7 +607,7 @@ function(llvm_add_library name)
endif()
if(ARG_STATIC)
- set(libtype INTERFACE)
+ set(libtype PUBLIC)
else()
# We can use PRIVATE since SO knows its dependent libs.
set(libtype PRIVATE)
More information about the llvm-commits
mailing list