[all-commits] [llvm/llvm-project] 695c7d: [llvm] Added support for stand-alone cmake object ...
Mircea Trofin via All-commits
all-commits at lists.llvm.org
Mon Jun 15 12:02:05 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 695c7d6313d74dc02222f6497d4c4985d67f433f
https://github.com/llvm/llvm-project/commit/695c7d6313d74dc02222f6497d4c4985d67f433f
Author: Mircea Trofin <mtrofin at google.com>
Date: 2020-06-15 (Mon, 15 Jun 2020)
Changed paths:
M llvm/cmake/modules/AddLLVM.cmake
M llvm/lib/Analysis/CMakeLists.txt
M llvm/lib/Analysis/LLVMBuild.txt
M llvm/lib/Analysis/ML/CMakeLists.txt
R llvm/lib/Analysis/ML/LLVMBuild.txt
M llvm/lib/Passes/LLVMBuild.txt
M llvm/unittests/Analysis/ML/CMakeLists.txt
Log Message:
-----------
[llvm] Added support for stand-alone cmake object libraries.
Summary:
Currently, add_llvm_library would create an OBJECT library alongside
of a STATIC / SHARED library, but losing the link interface (its
elements would become dependencies instead). To support scenarios
where linking an object library also brings in its usage
requirements, this patch adds support for 'stand-alone' OBJECT
libraries - i.e. without an accompanying SHARED/STATIC library, and
maintaining the link interface defined by the user.
The support is via a new option, OBJECT_ONLY, to avoid breaking changes
- since just specifying "OBJECT" would currently imply also STATIC or
SHARED, depending on BUILD_SHARED_LIBS.
This is useful for cases where, for example, we want to build a part
of a component separately. Using a STATIC target would incur the risk
that symbols not referenced in the consumer would be dropped (which may
be undesirable).
The current application is the ML part of Analysis. It should be part
of the Analysis component, so it may reference other analyses; and (in
upcoming changes) it has dependencies on optional libraries.
Reviewers: karies, davidxl
Subscribers: mgorny, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D81447
More information about the All-commits
mailing list