[llvm] ab41180 - [cmake] Explicitly mark libraries defined in lib/ as "Component Libraries"
Tom Stellard via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 21 10:48:50 PST 2019
Author: Tom Stellard
Date: 2019-11-21T10:48:08-08:00
New Revision: ab411801b82783eb7f652701ccfce81b16cf1811
URL: https://github.com/llvm/llvm-project/commit/ab411801b82783eb7f652701ccfce81b16cf1811
DIFF: https://github.com/llvm/llvm-project/commit/ab411801b82783eb7f652701ccfce81b16cf1811.diff
LOG: [cmake] Explicitly mark libraries defined in lib/ as "Component Libraries"
Summary:
Most libraries are defined in the lib/ directory but there are also a
few libraries defined in tools/ e.g. libLLVM, libLTO. I'm defining
"Component Libraries" as libraries defined in lib/ that may be included in
libLLVM.so. Explicitly marking the libraries in lib/ as component
libraries allows us to remove some fragile checks that attempt to
differentiate between lib/ libraries and tools/ libraires:
1. In tools/llvm-shlib, because
llvm_map_components_to_libnames(LIB_NAMES "all") returned a list of
all libraries defined in the whole project, there was custom code
needed to filter out libraries defined in tools/, none of which should
be included in libLLVM.so. This code assumed that any library
defined as static was from lib/ and everything else should be
excluded.
With this change, llvm_map_components_to_libnames(LIB_NAMES, "all")
only returns libraries that have been added to the LLVM_COMPONENT_LIBS
global cmake property, so this custom filtering logic can be removed.
Doing this also fixes the build with BUILD_SHARED_LIBS=ON
and LLVM_BUILD_LLVM_DYLIB=ON.
2. There was some code in llvm_add_library that assumed that
libraries defined in lib/ would not have LLVM_LINK_COMPONENTS or
ARG_LINK_COMPONENTS set. This is only true because libraries
defined lib lib/ use LLVMBuild.txt and don't set these values.
This code has been fixed now to check if the library has been
explicitly marked as a component library, which should now make it
easier to remove LLVMBuild at some point in the future.
I have tested this patch on Windows, MacOS and Linux with release builds
and the following combinations of CMake options:
- "" (No options)
- -DLLVM_BUILD_LLVM_DYLIB=ON
- -DLLVM_LINK_LLVM_DYLIB=ON
- -DBUILD_SHARED_LIBS=ON
- -DBUILD_SHARED_LIBS=ON -DLLVM_BUILD_LLVM_DYLIB=ON
- -DBUILD_SHARED_LIBS=ON -DLLVM_LINK_LLVM_DYLIB=ON
Reviewers: beanz, smeenai, compnerd, phosek
Reviewed By: beanz
Subscribers: wuzish, jholewinski, arsenm, dschuff, jyknight, dylanmckay, sdardis, nemanjai, jvesely, nhaehnle, mgorny, mehdi_amini, sbc100, jgravelle-google, hiraditya, aheejin, fedor.sergeev, asb, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, jrtc27, MaskRay, zzheng, edward-jones, atanasyan, steven_wu, rogfer01, MartinMosbeck, brucehoult, the_o, dexonsmith, PkmX, jocewei, jsji, dang, Jim, lenary, s.egerton, pzheng, sameer.abuasal, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70179
Added:
Modified:
llvm/cmake/modules/AddLLVM.cmake
llvm/cmake/modules/LLVM-Config.cmake
llvm/lib/Analysis/CMakeLists.txt
llvm/lib/AsmParser/CMakeLists.txt
llvm/lib/BinaryFormat/CMakeLists.txt
llvm/lib/Bitcode/Reader/CMakeLists.txt
llvm/lib/Bitcode/Writer/CMakeLists.txt
llvm/lib/Bitstream/Reader/CMakeLists.txt
llvm/lib/CodeGen/AsmPrinter/CMakeLists.txt
llvm/lib/CodeGen/CMakeLists.txt
llvm/lib/CodeGen/GlobalISel/CMakeLists.txt
llvm/lib/CodeGen/MIRParser/CMakeLists.txt
llvm/lib/CodeGen/SelectionDAG/CMakeLists.txt
llvm/lib/DebugInfo/CodeView/CMakeLists.txt
llvm/lib/DebugInfo/DWARF/CMakeLists.txt
llvm/lib/DebugInfo/GSYM/CMakeLists.txt
llvm/lib/DebugInfo/MSF/CMakeLists.txt
llvm/lib/DebugInfo/PDB/CMakeLists.txt
llvm/lib/DebugInfo/Symbolize/CMakeLists.txt
llvm/lib/Demangle/CMakeLists.txt
llvm/lib/ExecutionEngine/CMakeLists.txt
llvm/lib/ExecutionEngine/IntelJITEvents/CMakeLists.txt
llvm/lib/ExecutionEngine/Interpreter/CMakeLists.txt
llvm/lib/ExecutionEngine/JITLink/CMakeLists.txt
llvm/lib/ExecutionEngine/MCJIT/CMakeLists.txt
llvm/lib/ExecutionEngine/OProfileJIT/CMakeLists.txt
llvm/lib/ExecutionEngine/Orc/CMakeLists.txt
llvm/lib/ExecutionEngine/OrcError/CMakeLists.txt
llvm/lib/ExecutionEngine/PerfJITEvents/CMakeLists.txt
llvm/lib/ExecutionEngine/RuntimeDyld/CMakeLists.txt
llvm/lib/FuzzMutate/CMakeLists.txt
llvm/lib/IR/CMakeLists.txt
llvm/lib/IRReader/CMakeLists.txt
llvm/lib/LTO/CMakeLists.txt
llvm/lib/LineEditor/CMakeLists.txt
llvm/lib/Linker/CMakeLists.txt
llvm/lib/MC/CMakeLists.txt
llvm/lib/MC/MCDisassembler/CMakeLists.txt
llvm/lib/MC/MCParser/CMakeLists.txt
llvm/lib/MCA/CMakeLists.txt
llvm/lib/Object/CMakeLists.txt
llvm/lib/ObjectYAML/CMakeLists.txt
llvm/lib/Option/CMakeLists.txt
llvm/lib/Passes/CMakeLists.txt
llvm/lib/ProfileData/CMakeLists.txt
llvm/lib/ProfileData/Coverage/CMakeLists.txt
llvm/lib/Remarks/CMakeLists.txt
llvm/lib/Support/CMakeLists.txt
llvm/lib/TableGen/CMakeLists.txt
llvm/lib/Target/AArch64/AsmParser/CMakeLists.txt
llvm/lib/Target/AArch64/Disassembler/CMakeLists.txt
llvm/lib/Target/AArch64/MCTargetDesc/CMakeLists.txt
llvm/lib/Target/AArch64/TargetInfo/CMakeLists.txt
llvm/lib/Target/AArch64/Utils/CMakeLists.txt
llvm/lib/Target/AMDGPU/AsmParser/CMakeLists.txt
llvm/lib/Target/AMDGPU/Disassembler/CMakeLists.txt
llvm/lib/Target/AMDGPU/MCTargetDesc/CMakeLists.txt
llvm/lib/Target/AMDGPU/TargetInfo/CMakeLists.txt
llvm/lib/Target/AMDGPU/Utils/CMakeLists.txt
llvm/lib/Target/ARC/Disassembler/CMakeLists.txt
llvm/lib/Target/ARC/MCTargetDesc/CMakeLists.txt
llvm/lib/Target/ARC/TargetInfo/CMakeLists.txt
llvm/lib/Target/ARM/AsmParser/CMakeLists.txt
llvm/lib/Target/ARM/Disassembler/CMakeLists.txt
llvm/lib/Target/ARM/MCTargetDesc/CMakeLists.txt
llvm/lib/Target/ARM/TargetInfo/CMakeLists.txt
llvm/lib/Target/ARM/Utils/CMakeLists.txt
llvm/lib/Target/AVR/AsmParser/CMakeLists.txt
llvm/lib/Target/AVR/Disassembler/CMakeLists.txt
llvm/lib/Target/AVR/MCTargetDesc/CMakeLists.txt
llvm/lib/Target/AVR/TargetInfo/CMakeLists.txt
llvm/lib/Target/BPF/AsmParser/CMakeLists.txt
llvm/lib/Target/BPF/Disassembler/CMakeLists.txt
llvm/lib/Target/BPF/MCTargetDesc/CMakeLists.txt
llvm/lib/Target/BPF/TargetInfo/CMakeLists.txt
llvm/lib/Target/CMakeLists.txt
llvm/lib/Target/Hexagon/AsmParser/CMakeLists.txt
llvm/lib/Target/Hexagon/Disassembler/CMakeLists.txt
llvm/lib/Target/Hexagon/MCTargetDesc/CMakeLists.txt
llvm/lib/Target/Hexagon/TargetInfo/CMakeLists.txt
llvm/lib/Target/Lanai/AsmParser/CMakeLists.txt
llvm/lib/Target/Lanai/Disassembler/CMakeLists.txt
llvm/lib/Target/Lanai/MCTargetDesc/CMakeLists.txt
llvm/lib/Target/Lanai/TargetInfo/CMakeLists.txt
llvm/lib/Target/MSP430/AsmParser/CMakeLists.txt
llvm/lib/Target/MSP430/Disassembler/CMakeLists.txt
llvm/lib/Target/MSP430/MCTargetDesc/CMakeLists.txt
llvm/lib/Target/MSP430/TargetInfo/CMakeLists.txt
llvm/lib/Target/Mips/AsmParser/CMakeLists.txt
llvm/lib/Target/Mips/Disassembler/CMakeLists.txt
llvm/lib/Target/Mips/MCTargetDesc/CMakeLists.txt
llvm/lib/Target/Mips/TargetInfo/CMakeLists.txt
llvm/lib/Target/NVPTX/MCTargetDesc/CMakeLists.txt
llvm/lib/Target/NVPTX/TargetInfo/CMakeLists.txt
llvm/lib/Target/PowerPC/AsmParser/CMakeLists.txt
llvm/lib/Target/PowerPC/Disassembler/CMakeLists.txt
llvm/lib/Target/PowerPC/MCTargetDesc/CMakeLists.txt
llvm/lib/Target/PowerPC/TargetInfo/CMakeLists.txt
llvm/lib/Target/RISCV/AsmParser/CMakeLists.txt
llvm/lib/Target/RISCV/Disassembler/CMakeLists.txt
llvm/lib/Target/RISCV/MCTargetDesc/CMakeLists.txt
llvm/lib/Target/RISCV/TargetInfo/CMakeLists.txt
llvm/lib/Target/RISCV/Utils/CMakeLists.txt
llvm/lib/Target/Sparc/AsmParser/CMakeLists.txt
llvm/lib/Target/Sparc/Disassembler/CMakeLists.txt
llvm/lib/Target/Sparc/MCTargetDesc/CMakeLists.txt
llvm/lib/Target/Sparc/TargetInfo/CMakeLists.txt
llvm/lib/Target/SystemZ/AsmParser/CMakeLists.txt
llvm/lib/Target/SystemZ/Disassembler/CMakeLists.txt
llvm/lib/Target/SystemZ/MCTargetDesc/CMakeLists.txt
llvm/lib/Target/SystemZ/TargetInfo/CMakeLists.txt
llvm/lib/Target/WebAssembly/AsmParser/CMakeLists.txt
llvm/lib/Target/WebAssembly/Disassembler/CMakeLists.txt
llvm/lib/Target/WebAssembly/MCTargetDesc/CMakeLists.txt
llvm/lib/Target/WebAssembly/TargetInfo/CMakeLists.txt
llvm/lib/Target/X86/AsmParser/CMakeLists.txt
llvm/lib/Target/X86/Disassembler/CMakeLists.txt
llvm/lib/Target/X86/MCTargetDesc/CMakeLists.txt
llvm/lib/Target/X86/TargetInfo/CMakeLists.txt
llvm/lib/Target/X86/Utils/CMakeLists.txt
llvm/lib/Target/XCore/Disassembler/CMakeLists.txt
llvm/lib/Target/XCore/MCTargetDesc/CMakeLists.txt
llvm/lib/Target/XCore/TargetInfo/CMakeLists.txt
llvm/lib/TextAPI/CMakeLists.txt
llvm/lib/ToolDrivers/llvm-dlltool/CMakeLists.txt
llvm/lib/ToolDrivers/llvm-lib/CMakeLists.txt
llvm/lib/Transforms/AggressiveInstCombine/CMakeLists.txt
llvm/lib/Transforms/CFGuard/CMakeLists.txt
llvm/lib/Transforms/Coroutines/CMakeLists.txt
llvm/lib/Transforms/IPO/CMakeLists.txt
llvm/lib/Transforms/InstCombine/CMakeLists.txt
llvm/lib/Transforms/Instrumentation/CMakeLists.txt
llvm/lib/Transforms/ObjCARC/CMakeLists.txt
llvm/lib/Transforms/Scalar/CMakeLists.txt
llvm/lib/Transforms/Utils/CMakeLists.txt
llvm/lib/Transforms/Vectorize/CMakeLists.txt
llvm/lib/WindowsManifest/CMakeLists.txt
llvm/lib/XRay/CMakeLists.txt
llvm/tools/llvm-shlib/CMakeLists.txt
Removed:
################################################################################
diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake
index 9ab041360260..518ea608d232 100644
--- a/llvm/cmake/modules/AddLLVM.cmake
+++ b/llvm/cmake/modules/AddLLVM.cmake
@@ -397,10 +397,14 @@ endfunction(set_windows_version_resource_properties)
# Suppress default RPATH settings in shared libraries.
# PLUGIN_TOOL
# The tool (i.e. cmake target) that this plugin will link against
+# COMPONENT_LIB
+# This is used to specify that this is a component library of
+# LLVM which means that the source resides in llvm/lib/ and it is a
+# candidate for inclusion into libLLVM.so.
# )
function(llvm_add_library name)
cmake_parse_arguments(ARG
- "MODULE;SHARED;STATIC;OBJECT;DISABLE_LLVM_LINK_LLVM_DYLIB;SONAME;NO_INSTALL_RPATH"
+ "MODULE;SHARED;STATIC;OBJECT;DISABLE_LLVM_LINK_LLVM_DYLIB;SONAME;NO_INSTALL_RPATH;COMPONENT_LIB"
"OUTPUT_NAME;PLUGIN_TOOL;ENTITLEMENTS;BUNDLE_PATH"
"ADDITIONAL_HEADERS;DEPENDS;LINK_COMPONENTS;LINK_LIBS;OBJLIBS"
${ARGN})
@@ -486,6 +490,11 @@ function(llvm_add_library name)
add_library(${name} STATIC ${ALL_FILES})
endif()
+ if(ARG_COMPONENT_LIB)
+ set_target_properties(${name} PROPERTIES LLVM_COMPONENT TRUE)
+ set_property(GLOBAL APPEND PROPERTY LLVM_COMPONENT_LIBS ${name})
+ endif()
+
if(NOT ARG_NO_INSTALL_RPATH)
if(ARG_MODULE OR ARG_SHARED)
llvm_setup_rpath(${name})
@@ -570,7 +579,7 @@ function(llvm_add_library name)
if(ARG_MODULE AND LLVM_EXPORT_SYMBOLS_FOR_PLUGINS AND ARG_PLUGIN_TOOL AND (WIN32 OR CYGWIN))
# On DLL platforms symbols are imported from the tool by linking against it.
set(llvm_libs ${ARG_PLUGIN_TOOL})
- elseif (DEFINED LLVM_LINK_COMPONENTS OR DEFINED ARG_LINK_COMPONENTS)
+ elseif (NOT ARG_COMPONENT_LIB)
if (LLVM_LINK_LLVM_DYLIB AND NOT ARG_DISABLE_LLVM_LINK_LLVM_DYLIB)
set(llvm_libs LLVM)
else()
@@ -669,6 +678,10 @@ function(add_llvm_install_targets target)
endif()
endfunction()
+function(add_llvm_component_library name)
+ add_llvm_library(${name} COMPONENT_LIB ${ARGN})
+endfunction()
+
macro(add_llvm_library name)
cmake_parse_arguments(ARG
"SHARED;BUILDTREE_ONLY;MODULE;INSTALL_WITH_TOOLCHAIN"
@@ -1027,7 +1040,7 @@ macro(add_llvm_target target_name)
include_directories(BEFORE
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR})
- add_llvm_library(LLVM${target_name} ${ARGN})
+ add_llvm_component_library(LLVM${target_name} ${ARGN})
set( CURRENT_LLVM_TARGET LLVM${target_name} )
endmacro(add_llvm_target)
diff --git a/llvm/cmake/modules/LLVM-Config.cmake b/llvm/cmake/modules/LLVM-Config.cmake
index fd50ca6aae1a..c3fa59e83358 100644
--- a/llvm/cmake/modules/LLVM-Config.cmake
+++ b/llvm/cmake/modules/LLVM-Config.cmake
@@ -267,7 +267,8 @@ function(llvm_map_components_to_libnames out_libs)
elseif( c STREQUAL "engine" )
# already processed
elseif( c STREQUAL "all" )
- list(APPEND expanded_components ${LLVM_AVAILABLE_LIBS})
+ get_property(all_components GLOBAL PROPERTY LLVM_COMPONENT_LIBS)
+ list(APPEND expanded_components ${all_components})
else()
# Canonize the component name:
string(TOUPPER "${c}" capitalized)
diff --git a/llvm/lib/Analysis/CMakeLists.txt b/llvm/lib/Analysis/CMakeLists.txt
index 5ecc8fe6f735..cc9ff0bc1f57 100644
--- a/llvm/lib/Analysis/CMakeLists.txt
+++ b/llvm/lib/Analysis/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_llvm_library(LLVMAnalysis
+add_llvm_component_library(LLVMAnalysis
AliasAnalysis.cpp
AliasAnalysisEvaluator.cpp
AliasAnalysisSummary.cpp
diff --git a/llvm/lib/AsmParser/CMakeLists.txt b/llvm/lib/AsmParser/CMakeLists.txt
index 0d7272321059..a501956f4eba 100644
--- a/llvm/lib/AsmParser/CMakeLists.txt
+++ b/llvm/lib/AsmParser/CMakeLists.txt
@@ -1,5 +1,5 @@
# AsmParser
-add_llvm_library(LLVMAsmParser
+add_llvm_component_library(LLVMAsmParser
LLLexer.cpp
LLParser.cpp
Parser.cpp
diff --git a/llvm/lib/BinaryFormat/CMakeLists.txt b/llvm/lib/BinaryFormat/CMakeLists.txt
index f8042efd1e70..f0c1b8377c9c 100644
--- a/llvm/lib/BinaryFormat/CMakeLists.txt
+++ b/llvm/lib/BinaryFormat/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_llvm_library(LLVMBinaryFormat
+add_llvm_component_library(LLVMBinaryFormat
AMDGPUMetadataVerifier.cpp
Dwarf.cpp
Magic.cpp
diff --git a/llvm/lib/Bitcode/Reader/CMakeLists.txt b/llvm/lib/Bitcode/Reader/CMakeLists.txt
index 99190f225d51..0e328fe37f20 100644
--- a/llvm/lib/Bitcode/Reader/CMakeLists.txt
+++ b/llvm/lib/Bitcode/Reader/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_llvm_library(LLVMBitReader
+add_llvm_component_library(LLVMBitReader
BitcodeAnalyzer.cpp
BitReader.cpp
BitcodeReader.cpp
diff --git a/llvm/lib/Bitcode/Writer/CMakeLists.txt b/llvm/lib/Bitcode/Writer/CMakeLists.txt
index 82dc6b24137d..6d1530e34cbe 100644
--- a/llvm/lib/Bitcode/Writer/CMakeLists.txt
+++ b/llvm/lib/Bitcode/Writer/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_llvm_library(LLVMBitWriter
+add_llvm_component_library(LLVMBitWriter
BitWriter.cpp
BitcodeWriter.cpp
BitcodeWriterPass.cpp
diff --git a/llvm/lib/Bitstream/Reader/CMakeLists.txt b/llvm/lib/Bitstream/Reader/CMakeLists.txt
index f91e450d888b..3d831ecbcdac 100644
--- a/llvm/lib/Bitstream/Reader/CMakeLists.txt
+++ b/llvm/lib/Bitstream/Reader/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_llvm_library(LLVMBitstreamReader
+add_llvm_component_library(LLVMBitstreamReader
BitstreamReader.cpp
ADDITIONAL_HEADER_DIRS
diff --git a/llvm/lib/CodeGen/AsmPrinter/CMakeLists.txt b/llvm/lib/CodeGen/AsmPrinter/CMakeLists.txt
index 3fb088ab6f0d..1445bf4fbf20 100644
--- a/llvm/lib/CodeGen/AsmPrinter/CMakeLists.txt
+++ b/llvm/lib/CodeGen/AsmPrinter/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_llvm_library(LLVMAsmPrinter
+add_llvm_component_library(LLVMAsmPrinter
AccelTable.cpp
AddressPool.cpp
ARMException.cpp
diff --git a/llvm/lib/CodeGen/CMakeLists.txt b/llvm/lib/CodeGen/CMakeLists.txt
index b2e76e285b8f..8875568c5938 100644
--- a/llvm/lib/CodeGen/CMakeLists.txt
+++ b/llvm/lib/CodeGen/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_llvm_library(LLVMCodeGen
+add_llvm_component_library(LLVMCodeGen
AggressiveAntiDepBreaker.cpp
AllocationOrder.cpp
Analysis.cpp
diff --git a/llvm/lib/CodeGen/GlobalISel/CMakeLists.txt b/llvm/lib/CodeGen/GlobalISel/CMakeLists.txt
index 6e04fb1aa709..5774991a43b9 100644
--- a/llvm/lib/CodeGen/GlobalISel/CMakeLists.txt
+++ b/llvm/lib/CodeGen/GlobalISel/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_llvm_library(LLVMGlobalISel
+add_llvm_component_library(LLVMGlobalISel
CSEInfo.cpp
GISelKnownBits.cpp
CSEMIRBuilder.cpp
diff --git a/llvm/lib/CodeGen/MIRParser/CMakeLists.txt b/llvm/lib/CodeGen/MIRParser/CMakeLists.txt
index 2eb5b844d0e1..f44adee7fee4 100644
--- a/llvm/lib/CodeGen/MIRParser/CMakeLists.txt
+++ b/llvm/lib/CodeGen/MIRParser/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_llvm_library(LLVMMIRParser
+add_llvm_component_library(LLVMMIRParser
MILexer.cpp
MIParser.cpp
MIRParser.cpp
diff --git a/llvm/lib/CodeGen/SelectionDAG/CMakeLists.txt b/llvm/lib/CodeGen/SelectionDAG/CMakeLists.txt
index fd1e5e2cfc56..56caffe9f8ee 100644
--- a/llvm/lib/CodeGen/SelectionDAG/CMakeLists.txt
+++ b/llvm/lib/CodeGen/SelectionDAG/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_llvm_library(LLVMSelectionDAG
+add_llvm_component_library(LLVMSelectionDAG
DAGCombiner.cpp
FastISel.cpp
FunctionLoweringInfo.cpp
diff --git a/llvm/lib/DebugInfo/CodeView/CMakeLists.txt b/llvm/lib/DebugInfo/CodeView/CMakeLists.txt
index 1610ca469575..84d1cf94e755 100644
--- a/llvm/lib/DebugInfo/CodeView/CMakeLists.txt
+++ b/llvm/lib/DebugInfo/CodeView/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_llvm_library(LLVMDebugInfoCodeView
+add_llvm_component_library(LLVMDebugInfoCodeView
AppendingTypeTableBuilder.cpp
CodeViewError.cpp
CodeViewRecordIO.cpp
diff --git a/llvm/lib/DebugInfo/DWARF/CMakeLists.txt b/llvm/lib/DebugInfo/DWARF/CMakeLists.txt
index fcfb00e8e5f3..3fe9904f221b 100644
--- a/llvm/lib/DebugInfo/DWARF/CMakeLists.txt
+++ b/llvm/lib/DebugInfo/DWARF/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_llvm_library(LLVMDebugInfoDWARF
+add_llvm_component_library(LLVMDebugInfoDWARF
DWARFAbbreviationDeclaration.cpp
DWARFAddressRange.cpp
DWARFAcceleratorTable.cpp
diff --git a/llvm/lib/DebugInfo/GSYM/CMakeLists.txt b/llvm/lib/DebugInfo/GSYM/CMakeLists.txt
index 2369f05197a2..632ccff5d790 100644
--- a/llvm/lib/DebugInfo/GSYM/CMakeLists.txt
+++ b/llvm/lib/DebugInfo/GSYM/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_llvm_library(LLVMDebugInfoGSYM
+add_llvm_component_library(LLVMDebugInfoGSYM
Header.cpp
FileWriter.cpp
FunctionInfo.cpp
diff --git a/llvm/lib/DebugInfo/MSF/CMakeLists.txt b/llvm/lib/DebugInfo/MSF/CMakeLists.txt
index 6f38de336ee0..828e2617f658 100644
--- a/llvm/lib/DebugInfo/MSF/CMakeLists.txt
+++ b/llvm/lib/DebugInfo/MSF/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_llvm_library(LLVMDebugInfoMSF
+add_llvm_component_library(LLVMDebugInfoMSF
MappedBlockStream.cpp
MSFBuilder.cpp
MSFCommon.cpp
diff --git a/llvm/lib/DebugInfo/PDB/CMakeLists.txt b/llvm/lib/DebugInfo/PDB/CMakeLists.txt
index 0e842af9f18f..320ca78b5255 100644
--- a/llvm/lib/DebugInfo/PDB/CMakeLists.txt
+++ b/llvm/lib/DebugInfo/PDB/CMakeLists.txt
@@ -84,7 +84,7 @@ add_pdb_impl_folder(Native
list(APPEND LIBPDB_ADDITIONAL_HEADER_DIRS "${LLVM_MAIN_INCLUDE_DIR}/llvm/DebugInfo/PDB/Native")
list(APPEND LIBPDB_ADDITIONAL_HEADER_DIRS "${LLVM_MAIN_INCLUDE_DIR}/llvm/DebugInfo/PDB")
-add_llvm_library(LLVMDebugInfoPDB
+add_llvm_component_library(LLVMDebugInfoPDB
GenericError.cpp
IPDBSourceFile.cpp
PDB.cpp
diff --git a/llvm/lib/DebugInfo/Symbolize/CMakeLists.txt b/llvm/lib/DebugInfo/Symbolize/CMakeLists.txt
index fe5c4bfc4321..79fbb14ed74d 100644
--- a/llvm/lib/DebugInfo/Symbolize/CMakeLists.txt
+++ b/llvm/lib/DebugInfo/Symbolize/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_llvm_library(LLVMSymbolize
+add_llvm_component_library(LLVMSymbolize
DIPrinter.cpp
SymbolizableObjectFile.cpp
Symbolize.cpp
diff --git a/llvm/lib/Demangle/CMakeLists.txt b/llvm/lib/Demangle/CMakeLists.txt
index cde1a4c5c28f..de208cd5d002 100644
--- a/llvm/lib/Demangle/CMakeLists.txt
+++ b/llvm/lib/Demangle/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_llvm_library(LLVMDemangle
+add_llvm_component_library(LLVMDemangle
Demangle.cpp
ItaniumDemangle.cpp
MicrosoftDemangle.cpp
diff --git a/llvm/lib/ExecutionEngine/CMakeLists.txt b/llvm/lib/ExecutionEngine/CMakeLists.txt
index c5445fbc16d7..9b5dd44e079e 100644
--- a/llvm/lib/ExecutionEngine/CMakeLists.txt
+++ b/llvm/lib/ExecutionEngine/CMakeLists.txt
@@ -1,6 +1,6 @@
-add_llvm_library(LLVMExecutionEngine
+add_llvm_component_library(LLVMExecutionEngine
ExecutionEngine.cpp
ExecutionEngineBindings.cpp
GDBRegistrationListener.cpp
diff --git a/llvm/lib/ExecutionEngine/IntelJITEvents/CMakeLists.txt b/llvm/lib/ExecutionEngine/IntelJITEvents/CMakeLists.txt
index e6c33b2ecc2a..70446e32a6d5 100644
--- a/llvm/lib/ExecutionEngine/IntelJITEvents/CMakeLists.txt
+++ b/llvm/lib/ExecutionEngine/IntelJITEvents/CMakeLists.txt
@@ -7,7 +7,7 @@ endif()
set(LLVM_INTEL_JIT_LIBS ${LLVM_PTHREAD_LIB} ${LLVM_INTEL_JIT_LIBS})
-add_llvm_library(LLVMIntelJITEvents
+add_llvm_component_library(LLVMIntelJITEvents
IntelJITEventListener.cpp
jitprofiling.c
diff --git a/llvm/lib/ExecutionEngine/Interpreter/CMakeLists.txt b/llvm/lib/ExecutionEngine/Interpreter/CMakeLists.txt
index 7456b3dbe905..b8adea5b7a90 100644
--- a/llvm/lib/ExecutionEngine/Interpreter/CMakeLists.txt
+++ b/llvm/lib/ExecutionEngine/Interpreter/CMakeLists.txt
@@ -6,7 +6,7 @@ if( FFI_INCLUDE_PATH )
include_directories( ${FFI_INCLUDE_PATH} )
endif()
-add_llvm_library(LLVMInterpreter
+add_llvm_component_library(LLVMInterpreter
Execution.cpp
ExternalFunctions.cpp
Interpreter.cpp
diff --git a/llvm/lib/ExecutionEngine/JITLink/CMakeLists.txt b/llvm/lib/ExecutionEngine/JITLink/CMakeLists.txt
index af4efadd6ba2..d5a886b2f5a5 100644
--- a/llvm/lib/ExecutionEngine/JITLink/CMakeLists.txt
+++ b/llvm/lib/ExecutionEngine/JITLink/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_llvm_library(LLVMJITLink
+add_llvm_component_library(LLVMJITLink
JITLink.cpp
JITLinkGeneric.cpp
JITLinkMemoryManager.cpp
diff --git a/llvm/lib/ExecutionEngine/MCJIT/CMakeLists.txt b/llvm/lib/ExecutionEngine/MCJIT/CMakeLists.txt
index b1e2bc3d635c..77066cac4d85 100644
--- a/llvm/lib/ExecutionEngine/MCJIT/CMakeLists.txt
+++ b/llvm/lib/ExecutionEngine/MCJIT/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_llvm_library(LLVMMCJIT
+add_llvm_component_library(LLVMMCJIT
MCJIT.cpp
DEPENDS
diff --git a/llvm/lib/ExecutionEngine/OProfileJIT/CMakeLists.txt b/llvm/lib/ExecutionEngine/OProfileJIT/CMakeLists.txt
index d585136eb0ac..9bbf2d61b1c8 100644
--- a/llvm/lib/ExecutionEngine/OProfileJIT/CMakeLists.txt
+++ b/llvm/lib/ExecutionEngine/OProfileJIT/CMakeLists.txt
@@ -1,7 +1,7 @@
include_directories( ${LLVM_OPROFILE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/.. )
-add_llvm_library(LLVMOProfileJIT
+add_llvm_component_library(LLVMOProfileJIT
OProfileJITEventListener.cpp
OProfileWrapper.cpp
)
diff --git a/llvm/lib/ExecutionEngine/Orc/CMakeLists.txt b/llvm/lib/ExecutionEngine/Orc/CMakeLists.txt
index 4a18f8847444..e3a7a67c8a0e 100644
--- a/llvm/lib/ExecutionEngine/Orc/CMakeLists.txt
+++ b/llvm/lib/ExecutionEngine/Orc/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_llvm_library(LLVMOrcJIT
+add_llvm_component_library(LLVMOrcJIT
CompileOnDemandLayer.cpp
CompileUtils.cpp
Core.cpp
diff --git a/llvm/lib/ExecutionEngine/OrcError/CMakeLists.txt b/llvm/lib/ExecutionEngine/OrcError/CMakeLists.txt
index 7273a33030ef..bd968d55e670 100644
--- a/llvm/lib/ExecutionEngine/OrcError/CMakeLists.txt
+++ b/llvm/lib/ExecutionEngine/OrcError/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_llvm_library(LLVMOrcError
+add_llvm_component_library(LLVMOrcError
OrcError.cpp
RPCError.cpp
ADDITIONAL_HEADER_DIRS
diff --git a/llvm/lib/ExecutionEngine/PerfJITEvents/CMakeLists.txt b/llvm/lib/ExecutionEngine/PerfJITEvents/CMakeLists.txt
index 136cc429d029..e0b8200f1197 100644
--- a/llvm/lib/ExecutionEngine/PerfJITEvents/CMakeLists.txt
+++ b/llvm/lib/ExecutionEngine/PerfJITEvents/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_llvm_library(LLVMPerfJITEvents
+add_llvm_component_library(LLVMPerfJITEvents
PerfJITEventListener.cpp
)
diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/CMakeLists.txt b/llvm/lib/ExecutionEngine/RuntimeDyld/CMakeLists.txt
index 3fa7ee6bb710..86a6dba12e2d 100644
--- a/llvm/lib/ExecutionEngine/RuntimeDyld/CMakeLists.txt
+++ b/llvm/lib/ExecutionEngine/RuntimeDyld/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_llvm_library(LLVMRuntimeDyld
+add_llvm_component_library(LLVMRuntimeDyld
JITSymbol.cpp
RTDyldMemoryManager.cpp
RuntimeDyld.cpp
diff --git a/llvm/lib/FuzzMutate/CMakeLists.txt b/llvm/lib/FuzzMutate/CMakeLists.txt
index 1a1a9abb1c28..356d5cef1957 100644
--- a/llvm/lib/FuzzMutate/CMakeLists.txt
+++ b/llvm/lib/FuzzMutate/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_llvm_library(LLVMFuzzMutate
+add_llvm_component_library(LLVMFuzzMutate
FuzzerCLI.cpp
IRMutator.cpp
OpDescriptor.cpp
diff --git a/llvm/lib/IR/CMakeLists.txt b/llvm/lib/IR/CMakeLists.txt
index f53d536ca8e1..b1fe5e1bbe6b 100644
--- a/llvm/lib/IR/CMakeLists.txt
+++ b/llvm/lib/IR/CMakeLists.txt
@@ -2,7 +2,7 @@ set(LLVM_TARGET_DEFINITIONS AttributesCompatFunc.td)
tablegen(LLVM AttributesCompatFunc.inc -gen-attrs)
add_public_tablegen_target(AttributeCompatFuncTableGen)
-add_llvm_library(LLVMCore
+add_llvm_component_library(LLVMCore
AbstractCallSite.cpp
AsmWriter.cpp
Attributes.cpp
diff --git a/llvm/lib/IRReader/CMakeLists.txt b/llvm/lib/IRReader/CMakeLists.txt
index 87ea88039ef3..b4ef18785c8b 100644
--- a/llvm/lib/IRReader/CMakeLists.txt
+++ b/llvm/lib/IRReader/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_llvm_library(LLVMIRReader
+add_llvm_component_library(LLVMIRReader
IRReader.cpp
ADDITIONAL_HEADER_DIRS
diff --git a/llvm/lib/LTO/CMakeLists.txt b/llvm/lib/LTO/CMakeLists.txt
index 1730df665d83..ecafb96856f4 100644
--- a/llvm/lib/LTO/CMakeLists.txt
+++ b/llvm/lib/LTO/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_llvm_library(LLVMLTO
+add_llvm_component_library(LLVMLTO
Caching.cpp
LTO.cpp
LTOBackend.cpp
diff --git a/llvm/lib/LineEditor/CMakeLists.txt b/llvm/lib/LineEditor/CMakeLists.txt
index 4935c1767651..591903794063 100644
--- a/llvm/lib/LineEditor/CMakeLists.txt
+++ b/llvm/lib/LineEditor/CMakeLists.txt
@@ -2,7 +2,7 @@ if(HAVE_LIBEDIT)
set(link_libs edit)
endif()
-add_llvm_library(LLVMLineEditor
+add_llvm_component_library(LLVMLineEditor
LineEditor.cpp
ADDITIONAL_HEADER_DIRS
diff --git a/llvm/lib/Linker/CMakeLists.txt b/llvm/lib/Linker/CMakeLists.txt
index 8916fb3f7251..be9d4b9774db 100644
--- a/llvm/lib/Linker/CMakeLists.txt
+++ b/llvm/lib/Linker/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_llvm_library(LLVMLinker
+add_llvm_component_library(LLVMLinker
IRMover.cpp
LinkModules.cpp
diff --git a/llvm/lib/MC/CMakeLists.txt b/llvm/lib/MC/CMakeLists.txt
index 14e965b55fdd..28423a3a99a4 100644
--- a/llvm/lib/MC/CMakeLists.txt
+++ b/llvm/lib/MC/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_llvm_library(LLVMMC
+add_llvm_component_library(LLVMMC
ConstantPools.cpp
ELFObjectWriter.cpp
MCAsmBackend.cpp
diff --git a/llvm/lib/MC/MCDisassembler/CMakeLists.txt b/llvm/lib/MC/MCDisassembler/CMakeLists.txt
index e940afc56f5b..b6fd86015deb 100644
--- a/llvm/lib/MC/MCDisassembler/CMakeLists.txt
+++ b/llvm/lib/MC/MCDisassembler/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_llvm_library(LLVMMCDisassembler
+add_llvm_component_library(LLVMMCDisassembler
Disassembler.cpp
MCDisassembler.cpp
MCExternalSymbolizer.cpp
diff --git a/llvm/lib/MC/MCParser/CMakeLists.txt b/llvm/lib/MC/MCParser/CMakeLists.txt
index 0c54e8e90193..429670d39126 100644
--- a/llvm/lib/MC/MCParser/CMakeLists.txt
+++ b/llvm/lib/MC/MCParser/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_llvm_library(LLVMMCParser
+add_llvm_component_library(LLVMMCParser
AsmLexer.cpp
AsmParser.cpp
COFFAsmParser.cpp
diff --git a/llvm/lib/MCA/CMakeLists.txt b/llvm/lib/MCA/CMakeLists.txt
index e2eb06eb97c7..ed431cde6afc 100644
--- a/llvm/lib/MCA/CMakeLists.txt
+++ b/llvm/lib/MCA/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_llvm_library(LLVMMCA
+add_llvm_component_library(LLVMMCA
CodeEmitter.cpp
Context.cpp
HWEventListener.cpp
diff --git a/llvm/lib/Object/CMakeLists.txt b/llvm/lib/Object/CMakeLists.txt
index 59f21e9ef4cd..61888cbe46f7 100644
--- a/llvm/lib/Object/CMakeLists.txt
+++ b/llvm/lib/Object/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_llvm_library(LLVMObject
+add_llvm_component_library(LLVMObject
Archive.cpp
ArchiveWriter.cpp
Binary.cpp
diff --git a/llvm/lib/ObjectYAML/CMakeLists.txt b/llvm/lib/ObjectYAML/CMakeLists.txt
index 434da714c70a..bc014c1caca3 100644
--- a/llvm/lib/ObjectYAML/CMakeLists.txt
+++ b/llvm/lib/ObjectYAML/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_llvm_library(LLVMObjectYAML
+add_llvm_component_library(LLVMObjectYAML
CodeViewYAMLDebugSections.cpp
CodeViewYAMLSymbols.cpp
CodeViewYAMLTypeHashing.cpp
diff --git a/llvm/lib/Option/CMakeLists.txt b/llvm/lib/Option/CMakeLists.txt
index 8eb086028da4..258dd9a5d6fe 100644
--- a/llvm/lib/Option/CMakeLists.txt
+++ b/llvm/lib/Option/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_llvm_library(LLVMOption
+add_llvm_component_library(LLVMOption
Arg.cpp
ArgList.cpp
Option.cpp
diff --git a/llvm/lib/Passes/CMakeLists.txt b/llvm/lib/Passes/CMakeLists.txt
index d1b873c3fd7a..8752159f427f 100644
--- a/llvm/lib/Passes/CMakeLists.txt
+++ b/llvm/lib/Passes/CMakeLists.txt
@@ -2,7 +2,7 @@ if (MSVC)
set_source_files_properties(PassBuilder.cpp PROPERTIES COMPILE_FLAGS /bigobj)
endif()
-add_llvm_library(LLVMPasses
+add_llvm_component_library(LLVMPasses
PassBuilder.cpp
PassPlugin.cpp
StandardInstrumentations.cpp
diff --git a/llvm/lib/ProfileData/CMakeLists.txt b/llvm/lib/ProfileData/CMakeLists.txt
index 3a981d8acf42..93eff295f337 100644
--- a/llvm/lib/ProfileData/CMakeLists.txt
+++ b/llvm/lib/ProfileData/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_llvm_library(LLVMProfileData
+add_llvm_component_library(LLVMProfileData
GCOV.cpp
InstrProf.cpp
InstrProfReader.cpp
diff --git a/llvm/lib/ProfileData/Coverage/CMakeLists.txt b/llvm/lib/ProfileData/Coverage/CMakeLists.txt
index 035b8fdb8b3d..db2f87c886b5 100644
--- a/llvm/lib/ProfileData/Coverage/CMakeLists.txt
+++ b/llvm/lib/ProfileData/Coverage/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_llvm_library(LLVMCoverage
+add_llvm_component_library(LLVMCoverage
CoverageMapping.cpp
CoverageMappingWriter.cpp
CoverageMappingReader.cpp
diff --git a/llvm/lib/Remarks/CMakeLists.txt b/llvm/lib/Remarks/CMakeLists.txt
index db84d631c2ca..c0e67f6ab951 100644
--- a/llvm/lib/Remarks/CMakeLists.txt
+++ b/llvm/lib/Remarks/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_llvm_library(LLVMRemarks
+add_llvm_component_library(LLVMRemarks
BitstreamRemarkParser.cpp
BitstreamRemarkSerializer.cpp
Remark.cpp
diff --git a/llvm/lib/Support/CMakeLists.txt b/llvm/lib/Support/CMakeLists.txt
index 824ceec6a212..ddc4d2324a05 100644
--- a/llvm/lib/Support/CMakeLists.txt
+++ b/llvm/lib/Support/CMakeLists.txt
@@ -51,7 +51,7 @@ else()
set(Z3_LINK_FILES "")
endif()
-add_llvm_library(LLVMSupport
+add_llvm_component_library(LLVMSupport
AArch64TargetParser.cpp
ABIBreak.cpp
ARMTargetParser.cpp
diff --git a/llvm/lib/TableGen/CMakeLists.txt b/llvm/lib/TableGen/CMakeLists.txt
index e7bb0ada5fb1..1ece81459520 100644
--- a/llvm/lib/TableGen/CMakeLists.txt
+++ b/llvm/lib/TableGen/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_llvm_library(LLVMTableGen
+add_llvm_component_library(LLVMTableGen
Error.cpp
JSONBackend.cpp
Main.cpp
diff --git a/llvm/lib/Target/AArch64/AsmParser/CMakeLists.txt b/llvm/lib/Target/AArch64/AsmParser/CMakeLists.txt
index cc0a9d86a14e..d4e9d89449f6 100644
--- a/llvm/lib/Target/AArch64/AsmParser/CMakeLists.txt
+++ b/llvm/lib/Target/AArch64/AsmParser/CMakeLists.txt
@@ -1,6 +1,6 @@
include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. )
-add_llvm_library(LLVMAArch64AsmParser
+add_llvm_component_library(LLVMAArch64AsmParser
AArch64AsmParser.cpp
)
diff --git a/llvm/lib/Target/AArch64/Disassembler/CMakeLists.txt b/llvm/lib/Target/AArch64/Disassembler/CMakeLists.txt
index d64c05b0adbc..3a307f989ddc 100644
--- a/llvm/lib/Target/AArch64/Disassembler/CMakeLists.txt
+++ b/llvm/lib/Target/AArch64/Disassembler/CMakeLists.txt
@@ -1,6 +1,6 @@
include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. )
-add_llvm_library(LLVMAArch64Disassembler
+add_llvm_component_library(LLVMAArch64Disassembler
AArch64Disassembler.cpp
AArch64ExternalSymbolizer.cpp
)
diff --git a/llvm/lib/Target/AArch64/MCTargetDesc/CMakeLists.txt b/llvm/lib/Target/AArch64/MCTargetDesc/CMakeLists.txt
index 05d7e8d58301..099e69469c5c 100644
--- a/llvm/lib/Target/AArch64/MCTargetDesc/CMakeLists.txt
+++ b/llvm/lib/Target/AArch64/MCTargetDesc/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_llvm_library(LLVMAArch64Desc
+add_llvm_component_library(LLVMAArch64Desc
AArch64AsmBackend.cpp
AArch64ELFObjectWriter.cpp
AArch64ELFStreamer.cpp
diff --git a/llvm/lib/Target/AArch64/TargetInfo/CMakeLists.txt b/llvm/lib/Target/AArch64/TargetInfo/CMakeLists.txt
index e236eed00be1..e1c23987f7f2 100644
--- a/llvm/lib/Target/AArch64/TargetInfo/CMakeLists.txt
+++ b/llvm/lib/Target/AArch64/TargetInfo/CMakeLists.txt
@@ -1,6 +1,6 @@
include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. )
-add_llvm_library(LLVMAArch64Info
+add_llvm_component_library(LLVMAArch64Info
AArch64TargetInfo.cpp
)
diff --git a/llvm/lib/Target/AArch64/Utils/CMakeLists.txt b/llvm/lib/Target/AArch64/Utils/CMakeLists.txt
index 8ee03a7571b4..5897f9da367d 100644
--- a/llvm/lib/Target/AArch64/Utils/CMakeLists.txt
+++ b/llvm/lib/Target/AArch64/Utils/CMakeLists.txt
@@ -1,3 +1,3 @@
-add_llvm_library(LLVMAArch64Utils
+add_llvm_component_library(LLVMAArch64Utils
AArch64BaseInfo.cpp
)
diff --git a/llvm/lib/Target/AMDGPU/AsmParser/CMakeLists.txt b/llvm/lib/Target/AMDGPU/AsmParser/CMakeLists.txt
index 70be7bb6eb36..e33b4b1b9043 100644
--- a/llvm/lib/Target/AMDGPU/AsmParser/CMakeLists.txt
+++ b/llvm/lib/Target/AMDGPU/AsmParser/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_llvm_library(LLVMAMDGPUAsmParser
+add_llvm_component_library(LLVMAMDGPUAsmParser
AMDGPUAsmParser.cpp
)
diff --git a/llvm/lib/Target/AMDGPU/Disassembler/CMakeLists.txt b/llvm/lib/Target/AMDGPU/Disassembler/CMakeLists.txt
index fb9231576919..21e2dd67c928 100644
--- a/llvm/lib/Target/AMDGPU/Disassembler/CMakeLists.txt
+++ b/llvm/lib/Target/AMDGPU/Disassembler/CMakeLists.txt
@@ -1,6 +1,6 @@
include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. )
-add_llvm_library(LLVMAMDGPUDisassembler
+add_llvm_component_library(LLVMAMDGPUDisassembler
AMDGPUDisassembler.cpp
)
diff --git a/llvm/lib/Target/AMDGPU/MCTargetDesc/CMakeLists.txt b/llvm/lib/Target/AMDGPU/MCTargetDesc/CMakeLists.txt
index c4d370b52669..6e01150ee6f3 100644
--- a/llvm/lib/Target/AMDGPU/MCTargetDesc/CMakeLists.txt
+++ b/llvm/lib/Target/AMDGPU/MCTargetDesc/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_llvm_library(LLVMAMDGPUDesc
+add_llvm_component_library(LLVMAMDGPUDesc
AMDGPUAsmBackend.cpp
AMDGPUELFObjectWriter.cpp
AMDGPUELFStreamer.cpp
diff --git a/llvm/lib/Target/AMDGPU/TargetInfo/CMakeLists.txt b/llvm/lib/Target/AMDGPU/TargetInfo/CMakeLists.txt
index 961dc5509000..6003acccc015 100644
--- a/llvm/lib/Target/AMDGPU/TargetInfo/CMakeLists.txt
+++ b/llvm/lib/Target/AMDGPU/TargetInfo/CMakeLists.txt
@@ -1,3 +1,3 @@
-add_llvm_library(LLVMAMDGPUInfo
+add_llvm_component_library(LLVMAMDGPUInfo
AMDGPUTargetInfo.cpp
)
diff --git a/llvm/lib/Target/AMDGPU/Utils/CMakeLists.txt b/llvm/lib/Target/AMDGPU/Utils/CMakeLists.txt
index 893e1fb72239..9a5bbd89938a 100644
--- a/llvm/lib/Target/AMDGPU/Utils/CMakeLists.txt
+++ b/llvm/lib/Target/AMDGPU/Utils/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_llvm_library(LLVMAMDGPUUtils
+add_llvm_component_library(LLVMAMDGPUUtils
AMDGPUBaseInfo.cpp
AMDKernelCodeTUtils.cpp
AMDGPUAsmUtils.cpp
diff --git a/llvm/lib/Target/ARC/Disassembler/CMakeLists.txt b/llvm/lib/Target/ARC/Disassembler/CMakeLists.txt
index b692c4baf584..970ccc7d4b68 100644
--- a/llvm/lib/Target/ARC/Disassembler/CMakeLists.txt
+++ b/llvm/lib/Target/ARC/Disassembler/CMakeLists.txt
@@ -1,3 +1,3 @@
-add_llvm_library(LLVMARCDisassembler
+add_llvm_component_library(LLVMARCDisassembler
ARCDisassembler.cpp
)
diff --git a/llvm/lib/Target/ARC/MCTargetDesc/CMakeLists.txt b/llvm/lib/Target/ARC/MCTargetDesc/CMakeLists.txt
index 108fb93cafa5..c356da9533f0 100644
--- a/llvm/lib/Target/ARC/MCTargetDesc/CMakeLists.txt
+++ b/llvm/lib/Target/ARC/MCTargetDesc/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_llvm_library(LLVMARCDesc
+add_llvm_component_library(LLVMARCDesc
ARCInstPrinter.cpp
ARCMCTargetDesc.cpp
ARCMCAsmInfo.cpp
diff --git a/llvm/lib/Target/ARC/TargetInfo/CMakeLists.txt b/llvm/lib/Target/ARC/TargetInfo/CMakeLists.txt
index 5f9b405481ff..59018be7f194 100644
--- a/llvm/lib/Target/ARC/TargetInfo/CMakeLists.txt
+++ b/llvm/lib/Target/ARC/TargetInfo/CMakeLists.txt
@@ -1,3 +1,3 @@
-add_llvm_library(LLVMARCInfo
+add_llvm_component_library(LLVMARCInfo
ARCTargetInfo.cpp
)
diff --git a/llvm/lib/Target/ARM/AsmParser/CMakeLists.txt b/llvm/lib/Target/ARM/AsmParser/CMakeLists.txt
index 66ed1df61a21..3777bccee369 100644
--- a/llvm/lib/Target/ARM/AsmParser/CMakeLists.txt
+++ b/llvm/lib/Target/ARM/AsmParser/CMakeLists.txt
@@ -1,3 +1,3 @@
-add_llvm_library(LLVMARMAsmParser
+add_llvm_component_library(LLVMARMAsmParser
ARMAsmParser.cpp
)
diff --git a/llvm/lib/Target/ARM/Disassembler/CMakeLists.txt b/llvm/lib/Target/ARM/Disassembler/CMakeLists.txt
index 2d9d534d6e52..dc2b130aa0ab 100644
--- a/llvm/lib/Target/ARM/Disassembler/CMakeLists.txt
+++ b/llvm/lib/Target/ARM/Disassembler/CMakeLists.txt
@@ -1,3 +1,3 @@
-add_llvm_library(LLVMARMDisassembler
+add_llvm_component_library(LLVMARMDisassembler
ARMDisassembler.cpp
)
diff --git a/llvm/lib/Target/ARM/MCTargetDesc/CMakeLists.txt b/llvm/lib/Target/ARM/MCTargetDesc/CMakeLists.txt
index 14a6395854a7..ca482173a12c 100644
--- a/llvm/lib/Target/ARM/MCTargetDesc/CMakeLists.txt
+++ b/llvm/lib/Target/ARM/MCTargetDesc/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_llvm_library(LLVMARMDesc
+add_llvm_component_library(LLVMARMDesc
ARMAsmBackend.cpp
ARMELFObjectWriter.cpp
ARMELFStreamer.cpp
diff --git a/llvm/lib/Target/ARM/TargetInfo/CMakeLists.txt b/llvm/lib/Target/ARM/TargetInfo/CMakeLists.txt
index 03393a0102c1..8492e60f03c0 100644
--- a/llvm/lib/Target/ARM/TargetInfo/CMakeLists.txt
+++ b/llvm/lib/Target/ARM/TargetInfo/CMakeLists.txt
@@ -1,3 +1,3 @@
-add_llvm_library(LLVMARMInfo
+add_llvm_component_library(LLVMARMInfo
ARMTargetInfo.cpp
)
diff --git a/llvm/lib/Target/ARM/Utils/CMakeLists.txt b/llvm/lib/Target/ARM/Utils/CMakeLists.txt
index 61bfe0ad73d0..d5b71dc6989c 100644
--- a/llvm/lib/Target/ARM/Utils/CMakeLists.txt
+++ b/llvm/lib/Target/ARM/Utils/CMakeLists.txt
@@ -1,3 +1,3 @@
-add_llvm_library(LLVMARMUtils
+add_llvm_component_library(LLVMARMUtils
ARMBaseInfo.cpp
)
diff --git a/llvm/lib/Target/AVR/AsmParser/CMakeLists.txt b/llvm/lib/Target/AVR/AsmParser/CMakeLists.txt
index 4ec01a60b219..9ffba49073dd 100644
--- a/llvm/lib/Target/AVR/AsmParser/CMakeLists.txt
+++ b/llvm/lib/Target/AVR/AsmParser/CMakeLists.txt
@@ -1,3 +1,3 @@
-add_llvm_library(LLVMAVRAsmParser
+add_llvm_component_library(LLVMAVRAsmParser
AVRAsmParser.cpp
)
diff --git a/llvm/lib/Target/AVR/Disassembler/CMakeLists.txt b/llvm/lib/Target/AVR/Disassembler/CMakeLists.txt
index cfce8b7f0809..cbf4537ca33d 100644
--- a/llvm/lib/Target/AVR/Disassembler/CMakeLists.txt
+++ b/llvm/lib/Target/AVR/Disassembler/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_llvm_library(LLVMAVRDisassembler
+add_llvm_component_library(LLVMAVRDisassembler
AVRDisassembler.cpp
)
diff --git a/llvm/lib/Target/AVR/MCTargetDesc/CMakeLists.txt b/llvm/lib/Target/AVR/MCTargetDesc/CMakeLists.txt
index 04a5bbc6c4e1..417ff67c6aec 100644
--- a/llvm/lib/Target/AVR/MCTargetDesc/CMakeLists.txt
+++ b/llvm/lib/Target/AVR/MCTargetDesc/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_llvm_library(LLVMAVRDesc
+add_llvm_component_library(LLVMAVRDesc
AVRAsmBackend.cpp
AVRELFObjectWriter.cpp
AVRELFStreamer.cpp
diff --git a/llvm/lib/Target/AVR/TargetInfo/CMakeLists.txt b/llvm/lib/Target/AVR/TargetInfo/CMakeLists.txt
index 557c55ae2f72..75fb77cf341a 100644
--- a/llvm/lib/Target/AVR/TargetInfo/CMakeLists.txt
+++ b/llvm/lib/Target/AVR/TargetInfo/CMakeLists.txt
@@ -1,7 +1,7 @@
include_directories( ${CMAKE_CURRENT_BINARY_DIR}/..
${CMAKE_CURRENT_SOURCE_DIR}/.. )
-add_llvm_library(LLVMAVRInfo
+add_llvm_component_library(LLVMAVRInfo
AVRTargetInfo.cpp
)
diff --git a/llvm/lib/Target/BPF/AsmParser/CMakeLists.txt b/llvm/lib/Target/BPF/AsmParser/CMakeLists.txt
index 22fb4f048292..e34fe084c6aa 100644
--- a/llvm/lib/Target/BPF/AsmParser/CMakeLists.txt
+++ b/llvm/lib/Target/BPF/AsmParser/CMakeLists.txt
@@ -1,3 +1,3 @@
-add_llvm_library(LLVMBPFAsmParser
+add_llvm_component_library(LLVMBPFAsmParser
BPFAsmParser.cpp
)
diff --git a/llvm/lib/Target/BPF/Disassembler/CMakeLists.txt b/llvm/lib/Target/BPF/Disassembler/CMakeLists.txt
index c6dd1b34ad1d..e8f8f0dd2a98 100644
--- a/llvm/lib/Target/BPF/Disassembler/CMakeLists.txt
+++ b/llvm/lib/Target/BPF/Disassembler/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_llvm_library(LLVMBPFDisassembler
+add_llvm_component_library(LLVMBPFDisassembler
BPFDisassembler.cpp
)
diff --git a/llvm/lib/Target/BPF/MCTargetDesc/CMakeLists.txt b/llvm/lib/Target/BPF/MCTargetDesc/CMakeLists.txt
index 44f3dbf1ce64..a306247569e4 100644
--- a/llvm/lib/Target/BPF/MCTargetDesc/CMakeLists.txt
+++ b/llvm/lib/Target/BPF/MCTargetDesc/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_llvm_library(LLVMBPFDesc
+add_llvm_component_library(LLVMBPFDesc
BPFMCTargetDesc.cpp
BPFAsmBackend.cpp
BPFInstPrinter.cpp
diff --git a/llvm/lib/Target/BPF/TargetInfo/CMakeLists.txt b/llvm/lib/Target/BPF/TargetInfo/CMakeLists.txt
index ca0884614deb..d955f31a00bc 100644
--- a/llvm/lib/Target/BPF/TargetInfo/CMakeLists.txt
+++ b/llvm/lib/Target/BPF/TargetInfo/CMakeLists.txt
@@ -1,3 +1,3 @@
-add_llvm_library(LLVMBPFInfo
+add_llvm_component_library(LLVMBPFInfo
BPFTargetInfo.cpp
)
diff --git a/llvm/lib/Target/CMakeLists.txt b/llvm/lib/Target/CMakeLists.txt
index 1e6abfacb792..a17bb1e40c4d 100644
--- a/llvm/lib/Target/CMakeLists.txt
+++ b/llvm/lib/Target/CMakeLists.txt
@@ -2,7 +2,7 @@ list(APPEND LLVM_COMMON_DEPENDS intrinsics_gen)
list(APPEND LLVM_TABLEGEN_FLAGS -I ${LLVM_MAIN_SRC_DIR}/lib/Target)
-add_llvm_library(LLVMTarget
+add_llvm_component_library(LLVMTarget
Target.cpp
TargetIntrinsicInfo.cpp
TargetLoweringObjectFile.cpp
diff --git a/llvm/lib/Target/Hexagon/AsmParser/CMakeLists.txt b/llvm/lib/Target/Hexagon/AsmParser/CMakeLists.txt
index bbfa92d59628..fa3cb2dd1ad9 100644
--- a/llvm/lib/Target/Hexagon/AsmParser/CMakeLists.txt
+++ b/llvm/lib/Target/Hexagon/AsmParser/CMakeLists.txt
@@ -1,6 +1,6 @@
include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. )
-add_llvm_library(LLVMHexagonAsmParser
+add_llvm_component_library(LLVMHexagonAsmParser
HexagonAsmParser.cpp
)
diff --git a/llvm/lib/Target/Hexagon/Disassembler/CMakeLists.txt b/llvm/lib/Target/Hexagon/Disassembler/CMakeLists.txt
index 755a45e2df8b..0f2e0bccdbe6 100644
--- a/llvm/lib/Target/Hexagon/Disassembler/CMakeLists.txt
+++ b/llvm/lib/Target/Hexagon/Disassembler/CMakeLists.txt
@@ -1,3 +1,3 @@
-add_llvm_library(LLVMHexagonDisassembler
+add_llvm_component_library(LLVMHexagonDisassembler
HexagonDisassembler.cpp
)
diff --git a/llvm/lib/Target/Hexagon/MCTargetDesc/CMakeLists.txt b/llvm/lib/Target/Hexagon/MCTargetDesc/CMakeLists.txt
index 2c5d0dab2848..a6a12edd5ca5 100644
--- a/llvm/lib/Target/Hexagon/MCTargetDesc/CMakeLists.txt
+++ b/llvm/lib/Target/Hexagon/MCTargetDesc/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_llvm_library(LLVMHexagonDesc
+add_llvm_component_library(LLVMHexagonDesc
HexagonAsmBackend.cpp
HexagonELFObjectWriter.cpp
HexagonInstPrinter.cpp
diff --git a/llvm/lib/Target/Hexagon/TargetInfo/CMakeLists.txt b/llvm/lib/Target/Hexagon/TargetInfo/CMakeLists.txt
index b9411f6925d2..14d5eb495a3c 100644
--- a/llvm/lib/Target/Hexagon/TargetInfo/CMakeLists.txt
+++ b/llvm/lib/Target/Hexagon/TargetInfo/CMakeLists.txt
@@ -1,3 +1,3 @@
-add_llvm_library(LLVMHexagonInfo
+add_llvm_component_library(LLVMHexagonInfo
HexagonTargetInfo.cpp
)
diff --git a/llvm/lib/Target/Lanai/AsmParser/CMakeLists.txt b/llvm/lib/Target/Lanai/AsmParser/CMakeLists.txt
index 3c88192ea6f0..9c3b17d427ab 100644
--- a/llvm/lib/Target/Lanai/AsmParser/CMakeLists.txt
+++ b/llvm/lib/Target/Lanai/AsmParser/CMakeLists.txt
@@ -1,6 +1,6 @@
include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. )
-add_llvm_library(LLVMLanaiAsmParser
+add_llvm_component_library(LLVMLanaiAsmParser
LanaiAsmParser.cpp
)
diff --git a/llvm/lib/Target/Lanai/Disassembler/CMakeLists.txt b/llvm/lib/Target/Lanai/Disassembler/CMakeLists.txt
index 785c98d8dff1..3be5d4df7f80 100644
--- a/llvm/lib/Target/Lanai/Disassembler/CMakeLists.txt
+++ b/llvm/lib/Target/Lanai/Disassembler/CMakeLists.txt
@@ -1,3 +1,3 @@
-add_llvm_library(LLVMLanaiDisassembler
+add_llvm_component_library(LLVMLanaiDisassembler
LanaiDisassembler.cpp
)
diff --git a/llvm/lib/Target/Lanai/MCTargetDesc/CMakeLists.txt b/llvm/lib/Target/Lanai/MCTargetDesc/CMakeLists.txt
index 2f1a60bcba26..64a362348a31 100644
--- a/llvm/lib/Target/Lanai/MCTargetDesc/CMakeLists.txt
+++ b/llvm/lib/Target/Lanai/MCTargetDesc/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_llvm_library(LLVMLanaiDesc
+add_llvm_component_library(LLVMLanaiDesc
LanaiAsmBackend.cpp
LanaiELFObjectWriter.cpp
LanaiInstPrinter.cpp
diff --git a/llvm/lib/Target/Lanai/TargetInfo/CMakeLists.txt b/llvm/lib/Target/Lanai/TargetInfo/CMakeLists.txt
index 01611b54b2d8..26bd58514c3f 100644
--- a/llvm/lib/Target/Lanai/TargetInfo/CMakeLists.txt
+++ b/llvm/lib/Target/Lanai/TargetInfo/CMakeLists.txt
@@ -1,3 +1,3 @@
-add_llvm_library(LLVMLanaiInfo
+add_llvm_component_library(LLVMLanaiInfo
LanaiTargetInfo.cpp
)
diff --git a/llvm/lib/Target/MSP430/AsmParser/CMakeLists.txt b/llvm/lib/Target/MSP430/AsmParser/CMakeLists.txt
index bb484898afa0..f87e76cee995 100644
--- a/llvm/lib/Target/MSP430/AsmParser/CMakeLists.txt
+++ b/llvm/lib/Target/MSP430/AsmParser/CMakeLists.txt
@@ -1,3 +1,3 @@
-add_llvm_library(LLVMMSP430AsmParser
+add_llvm_component_library(LLVMMSP430AsmParser
MSP430AsmParser.cpp
)
diff --git a/llvm/lib/Target/MSP430/Disassembler/CMakeLists.txt b/llvm/lib/Target/MSP430/Disassembler/CMakeLists.txt
index bc33b9067726..42dea5ddeba4 100644
--- a/llvm/lib/Target/MSP430/Disassembler/CMakeLists.txt
+++ b/llvm/lib/Target/MSP430/Disassembler/CMakeLists.txt
@@ -1,3 +1,3 @@
-add_llvm_library(LLVMMSP430Disassembler
+add_llvm_component_library(LLVMMSP430Disassembler
MSP430Disassembler.cpp
)
diff --git a/llvm/lib/Target/MSP430/MCTargetDesc/CMakeLists.txt b/llvm/lib/Target/MSP430/MCTargetDesc/CMakeLists.txt
index b3edd496409e..22b6ec6d8a9f 100644
--- a/llvm/lib/Target/MSP430/MCTargetDesc/CMakeLists.txt
+++ b/llvm/lib/Target/MSP430/MCTargetDesc/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_llvm_library(LLVMMSP430Desc
+add_llvm_component_library(LLVMMSP430Desc
MSP430AsmBackend.cpp
MSP430ELFObjectWriter.cpp
MSP430ELFStreamer.cpp
diff --git a/llvm/lib/Target/MSP430/TargetInfo/CMakeLists.txt b/llvm/lib/Target/MSP430/TargetInfo/CMakeLists.txt
index fee5f434e79b..369ca8dbf3d2 100644
--- a/llvm/lib/Target/MSP430/TargetInfo/CMakeLists.txt
+++ b/llvm/lib/Target/MSP430/TargetInfo/CMakeLists.txt
@@ -1,3 +1,3 @@
-add_llvm_library(LLVMMSP430Info
+add_llvm_component_library(LLVMMSP430Info
MSP430TargetInfo.cpp
)
diff --git a/llvm/lib/Target/Mips/AsmParser/CMakeLists.txt b/llvm/lib/Target/Mips/AsmParser/CMakeLists.txt
index f1675560853a..e21bd7bfbbb5 100644
--- a/llvm/lib/Target/Mips/AsmParser/CMakeLists.txt
+++ b/llvm/lib/Target/Mips/AsmParser/CMakeLists.txt
@@ -1,3 +1,3 @@
-add_llvm_library(LLVMMipsAsmParser
+add_llvm_component_library(LLVMMipsAsmParser
MipsAsmParser.cpp
)
diff --git a/llvm/lib/Target/Mips/Disassembler/CMakeLists.txt b/llvm/lib/Target/Mips/Disassembler/CMakeLists.txt
index a64d02c47406..7de3f263a371 100644
--- a/llvm/lib/Target/Mips/Disassembler/CMakeLists.txt
+++ b/llvm/lib/Target/Mips/Disassembler/CMakeLists.txt
@@ -1,3 +1,3 @@
-add_llvm_library(LLVMMipsDisassembler
+add_llvm_component_library(LLVMMipsDisassembler
MipsDisassembler.cpp
)
diff --git a/llvm/lib/Target/Mips/MCTargetDesc/CMakeLists.txt b/llvm/lib/Target/Mips/MCTargetDesc/CMakeLists.txt
index 043d41e0905b..10e2e93af6fd 100644
--- a/llvm/lib/Target/Mips/MCTargetDesc/CMakeLists.txt
+++ b/llvm/lib/Target/Mips/MCTargetDesc/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_llvm_library(LLVMMipsDesc
+add_llvm_component_library(LLVMMipsDesc
MipsABIInfo.cpp
MipsABIFlagsSection.cpp
MipsAsmBackend.cpp
diff --git a/llvm/lib/Target/Mips/TargetInfo/CMakeLists.txt b/llvm/lib/Target/Mips/TargetInfo/CMakeLists.txt
index 3347a99a4321..93565ea186c8 100644
--- a/llvm/lib/Target/Mips/TargetInfo/CMakeLists.txt
+++ b/llvm/lib/Target/Mips/TargetInfo/CMakeLists.txt
@@ -1,3 +1,3 @@
-add_llvm_library(LLVMMipsInfo
+add_llvm_component_library(LLVMMipsInfo
MipsTargetInfo.cpp
)
diff --git a/llvm/lib/Target/NVPTX/MCTargetDesc/CMakeLists.txt b/llvm/lib/Target/NVPTX/MCTargetDesc/CMakeLists.txt
index 293436492fa9..c80e7acbf9f9 100644
--- a/llvm/lib/Target/NVPTX/MCTargetDesc/CMakeLists.txt
+++ b/llvm/lib/Target/NVPTX/MCTargetDesc/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_llvm_library(LLVMNVPTXDesc
+add_llvm_component_library(LLVMNVPTXDesc
NVPTXInstPrinter.cpp
NVPTXMCAsmInfo.cpp
NVPTXMCTargetDesc.cpp
diff --git a/llvm/lib/Target/NVPTX/TargetInfo/CMakeLists.txt b/llvm/lib/Target/NVPTX/TargetInfo/CMakeLists.txt
index 1beb40ea58e4..f9bfd970076b 100644
--- a/llvm/lib/Target/NVPTX/TargetInfo/CMakeLists.txt
+++ b/llvm/lib/Target/NVPTX/TargetInfo/CMakeLists.txt
@@ -1,3 +1,3 @@
-add_llvm_library(LLVMNVPTXInfo
+add_llvm_component_library(LLVMNVPTXInfo
NVPTXTargetInfo.cpp
)
diff --git a/llvm/lib/Target/PowerPC/AsmParser/CMakeLists.txt b/llvm/lib/Target/PowerPC/AsmParser/CMakeLists.txt
index 408858e424d5..6328c4cc3e76 100644
--- a/llvm/lib/Target/PowerPC/AsmParser/CMakeLists.txt
+++ b/llvm/lib/Target/PowerPC/AsmParser/CMakeLists.txt
@@ -1,3 +1,3 @@
-add_llvm_library(LLVMPowerPCAsmParser
+add_llvm_component_library(LLVMPowerPCAsmParser
PPCAsmParser.cpp
)
diff --git a/llvm/lib/Target/PowerPC/Disassembler/CMakeLists.txt b/llvm/lib/Target/PowerPC/Disassembler/CMakeLists.txt
index ca457df88d3e..37e5a5516295 100644
--- a/llvm/lib/Target/PowerPC/Disassembler/CMakeLists.txt
+++ b/llvm/lib/Target/PowerPC/Disassembler/CMakeLists.txt
@@ -1,3 +1,3 @@
-add_llvm_library(LLVMPowerPCDisassembler
+add_llvm_component_library(LLVMPowerPCDisassembler
PPCDisassembler.cpp
)
diff --git a/llvm/lib/Target/PowerPC/MCTargetDesc/CMakeLists.txt b/llvm/lib/Target/PowerPC/MCTargetDesc/CMakeLists.txt
index 5a2f60587ea6..4bc9f2a41fde 100644
--- a/llvm/lib/Target/PowerPC/MCTargetDesc/CMakeLists.txt
+++ b/llvm/lib/Target/PowerPC/MCTargetDesc/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_llvm_library(LLVMPowerPCDesc
+add_llvm_component_library(LLVMPowerPCDesc
PPCAsmBackend.cpp
PPCInstPrinter.cpp
PPCMCTargetDesc.cpp
diff --git a/llvm/lib/Target/PowerPC/TargetInfo/CMakeLists.txt b/llvm/lib/Target/PowerPC/TargetInfo/CMakeLists.txt
index c9548c7fe0cd..3200a75b32a8 100644
--- a/llvm/lib/Target/PowerPC/TargetInfo/CMakeLists.txt
+++ b/llvm/lib/Target/PowerPC/TargetInfo/CMakeLists.txt
@@ -1,3 +1,3 @@
-add_llvm_library(LLVMPowerPCInfo
+add_llvm_component_library(LLVMPowerPCInfo
PowerPCTargetInfo.cpp
)
diff --git a/llvm/lib/Target/RISCV/AsmParser/CMakeLists.txt b/llvm/lib/Target/RISCV/AsmParser/CMakeLists.txt
index 10d0c89537ce..a0f54d10fd1c 100644
--- a/llvm/lib/Target/RISCV/AsmParser/CMakeLists.txt
+++ b/llvm/lib/Target/RISCV/AsmParser/CMakeLists.txt
@@ -1,3 +1,3 @@
-add_llvm_library(LLVMRISCVAsmParser
+add_llvm_component_library(LLVMRISCVAsmParser
RISCVAsmParser.cpp
)
diff --git a/llvm/lib/Target/RISCV/Disassembler/CMakeLists.txt b/llvm/lib/Target/RISCV/Disassembler/CMakeLists.txt
index 39bd2b7669f5..df2fce65b839 100644
--- a/llvm/lib/Target/RISCV/Disassembler/CMakeLists.txt
+++ b/llvm/lib/Target/RISCV/Disassembler/CMakeLists.txt
@@ -1,3 +1,3 @@
-add_llvm_library(LLVMRISCVDisassembler
+add_llvm_component_library(LLVMRISCVDisassembler
RISCVDisassembler.cpp
)
diff --git a/llvm/lib/Target/RISCV/MCTargetDesc/CMakeLists.txt b/llvm/lib/Target/RISCV/MCTargetDesc/CMakeLists.txt
index a55d273b4600..df2d15dc7983 100644
--- a/llvm/lib/Target/RISCV/MCTargetDesc/CMakeLists.txt
+++ b/llvm/lib/Target/RISCV/MCTargetDesc/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_llvm_library(LLVMRISCVDesc
+add_llvm_component_library(LLVMRISCVDesc
RISCVAsmBackend.cpp
RISCVELFObjectWriter.cpp
RISCVInstPrinter.cpp
diff --git a/llvm/lib/Target/RISCV/TargetInfo/CMakeLists.txt b/llvm/lib/Target/RISCV/TargetInfo/CMakeLists.txt
index f440fe2cb82a..7768678c9484 100644
--- a/llvm/lib/Target/RISCV/TargetInfo/CMakeLists.txt
+++ b/llvm/lib/Target/RISCV/TargetInfo/CMakeLists.txt
@@ -1,3 +1,3 @@
-add_llvm_library(LLVMRISCVInfo
+add_llvm_component_library(LLVMRISCVInfo
RISCVTargetInfo.cpp
)
diff --git a/llvm/lib/Target/RISCV/Utils/CMakeLists.txt b/llvm/lib/Target/RISCV/Utils/CMakeLists.txt
index 727ab4a9fd77..b1f73ab30342 100644
--- a/llvm/lib/Target/RISCV/Utils/CMakeLists.txt
+++ b/llvm/lib/Target/RISCV/Utils/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_llvm_library(LLVMRISCVUtils
+add_llvm_component_library(LLVMRISCVUtils
RISCVBaseInfo.cpp
RISCVMatInt.cpp
)
diff --git a/llvm/lib/Target/Sparc/AsmParser/CMakeLists.txt b/llvm/lib/Target/Sparc/AsmParser/CMakeLists.txt
index 7579bfed75a2..cf8f96bcbb0d 100644
--- a/llvm/lib/Target/Sparc/AsmParser/CMakeLists.txt
+++ b/llvm/lib/Target/Sparc/AsmParser/CMakeLists.txt
@@ -1,3 +1,3 @@
-add_llvm_library(LLVMSparcAsmParser
+add_llvm_component_library(LLVMSparcAsmParser
SparcAsmParser.cpp
)
diff --git a/llvm/lib/Target/Sparc/Disassembler/CMakeLists.txt b/llvm/lib/Target/Sparc/Disassembler/CMakeLists.txt
index 7359c6a0bcb2..b891334d6799 100644
--- a/llvm/lib/Target/Sparc/Disassembler/CMakeLists.txt
+++ b/llvm/lib/Target/Sparc/Disassembler/CMakeLists.txt
@@ -1,3 +1,3 @@
-add_llvm_library(LLVMSparcDisassembler
+add_llvm_component_library(LLVMSparcDisassembler
SparcDisassembler.cpp
)
diff --git a/llvm/lib/Target/Sparc/MCTargetDesc/CMakeLists.txt b/llvm/lib/Target/Sparc/MCTargetDesc/CMakeLists.txt
index 037099d41b8f..311f374a1c11 100644
--- a/llvm/lib/Target/Sparc/MCTargetDesc/CMakeLists.txt
+++ b/llvm/lib/Target/Sparc/MCTargetDesc/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_llvm_library(LLVMSparcDesc
+add_llvm_component_library(LLVMSparcDesc
SparcAsmBackend.cpp
SparcELFObjectWriter.cpp
SparcInstPrinter.cpp
diff --git a/llvm/lib/Target/Sparc/TargetInfo/CMakeLists.txt b/llvm/lib/Target/Sparc/TargetInfo/CMakeLists.txt
index 9633e03a3847..42cbe008018f 100644
--- a/llvm/lib/Target/Sparc/TargetInfo/CMakeLists.txt
+++ b/llvm/lib/Target/Sparc/TargetInfo/CMakeLists.txt
@@ -1,3 +1,3 @@
-add_llvm_library(LLVMSparcInfo
+add_llvm_component_library(LLVMSparcInfo
SparcTargetInfo.cpp
)
diff --git a/llvm/lib/Target/SystemZ/AsmParser/CMakeLists.txt b/llvm/lib/Target/SystemZ/AsmParser/CMakeLists.txt
index ad19a565030b..39e3d7291575 100644
--- a/llvm/lib/Target/SystemZ/AsmParser/CMakeLists.txt
+++ b/llvm/lib/Target/SystemZ/AsmParser/CMakeLists.txt
@@ -1,3 +1,3 @@
-add_llvm_library(LLVMSystemZAsmParser
+add_llvm_component_library(LLVMSystemZAsmParser
SystemZAsmParser.cpp
)
diff --git a/llvm/lib/Target/SystemZ/Disassembler/CMakeLists.txt b/llvm/lib/Target/SystemZ/Disassembler/CMakeLists.txt
index 4b94bcd1f5f1..102b53dc041f 100644
--- a/llvm/lib/Target/SystemZ/Disassembler/CMakeLists.txt
+++ b/llvm/lib/Target/SystemZ/Disassembler/CMakeLists.txt
@@ -1,3 +1,3 @@
-add_llvm_library(LLVMSystemZDisassembler
+add_llvm_component_library(LLVMSystemZDisassembler
SystemZDisassembler.cpp
)
diff --git a/llvm/lib/Target/SystemZ/MCTargetDesc/CMakeLists.txt b/llvm/lib/Target/SystemZ/MCTargetDesc/CMakeLists.txt
index cb38b0dd3ad1..74ede98de4e3 100644
--- a/llvm/lib/Target/SystemZ/MCTargetDesc/CMakeLists.txt
+++ b/llvm/lib/Target/SystemZ/MCTargetDesc/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_llvm_library(LLVMSystemZDesc
+add_llvm_component_library(LLVMSystemZDesc
SystemZInstPrinter.cpp
SystemZMCAsmBackend.cpp
SystemZMCAsmInfo.cpp
diff --git a/llvm/lib/Target/SystemZ/TargetInfo/CMakeLists.txt b/llvm/lib/Target/SystemZ/TargetInfo/CMakeLists.txt
index 1ebc669e59af..a3e4042fca08 100644
--- a/llvm/lib/Target/SystemZ/TargetInfo/CMakeLists.txt
+++ b/llvm/lib/Target/SystemZ/TargetInfo/CMakeLists.txt
@@ -1,3 +1,3 @@
-add_llvm_library(LLVMSystemZInfo
+add_llvm_component_library(LLVMSystemZInfo
SystemZTargetInfo.cpp
)
diff --git a/llvm/lib/Target/WebAssembly/AsmParser/CMakeLists.txt b/llvm/lib/Target/WebAssembly/AsmParser/CMakeLists.txt
index bd4741d13984..53cdfebba152 100644
--- a/llvm/lib/Target/WebAssembly/AsmParser/CMakeLists.txt
+++ b/llvm/lib/Target/WebAssembly/AsmParser/CMakeLists.txt
@@ -1,3 +1,3 @@
-add_llvm_library(LLVMWebAssemblyAsmParser
+add_llvm_component_library(LLVMWebAssemblyAsmParser
WebAssemblyAsmParser.cpp
)
diff --git a/llvm/lib/Target/WebAssembly/Disassembler/CMakeLists.txt b/llvm/lib/Target/WebAssembly/Disassembler/CMakeLists.txt
index 5e55e2958aeb..9b71c103de2b 100644
--- a/llvm/lib/Target/WebAssembly/Disassembler/CMakeLists.txt
+++ b/llvm/lib/Target/WebAssembly/Disassembler/CMakeLists.txt
@@ -1,3 +1,3 @@
-add_llvm_library(LLVMWebAssemblyDisassembler
+add_llvm_component_library(LLVMWebAssemblyDisassembler
WebAssemblyDisassembler.cpp
)
diff --git a/llvm/lib/Target/WebAssembly/MCTargetDesc/CMakeLists.txt b/llvm/lib/Target/WebAssembly/MCTargetDesc/CMakeLists.txt
index 58a8ee6eb521..2e39e473fb8f 100644
--- a/llvm/lib/Target/WebAssembly/MCTargetDesc/CMakeLists.txt
+++ b/llvm/lib/Target/WebAssembly/MCTargetDesc/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_llvm_library(LLVMWebAssemblyDesc
+add_llvm_component_library(LLVMWebAssemblyDesc
WebAssemblyAsmBackend.cpp
WebAssemblyInstPrinter.cpp
WebAssemblyMCAsmInfo.cpp
diff --git a/llvm/lib/Target/WebAssembly/TargetInfo/CMakeLists.txt b/llvm/lib/Target/WebAssembly/TargetInfo/CMakeLists.txt
index ef6e4d2b617a..1a13e2ed0d7e 100644
--- a/llvm/lib/Target/WebAssembly/TargetInfo/CMakeLists.txt
+++ b/llvm/lib/Target/WebAssembly/TargetInfo/CMakeLists.txt
@@ -1,6 +1,6 @@
include_directories( ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. )
-add_llvm_library(LLVMWebAssemblyInfo
+add_llvm_component_library(LLVMWebAssemblyInfo
WebAssemblyTargetInfo.cpp
)
diff --git a/llvm/lib/Target/X86/AsmParser/CMakeLists.txt b/llvm/lib/Target/X86/AsmParser/CMakeLists.txt
index 14544267bf5f..e5cd6ac4497c 100644
--- a/llvm/lib/Target/X86/AsmParser/CMakeLists.txt
+++ b/llvm/lib/Target/X86/AsmParser/CMakeLists.txt
@@ -1,3 +1,3 @@
-add_llvm_library(LLVMX86AsmParser
+add_llvm_component_library(LLVMX86AsmParser
X86AsmParser.cpp
)
diff --git a/llvm/lib/Target/X86/Disassembler/CMakeLists.txt b/llvm/lib/Target/X86/Disassembler/CMakeLists.txt
index 43702826c9bc..6582ff0eb9ea 100644
--- a/llvm/lib/Target/X86/Disassembler/CMakeLists.txt
+++ b/llvm/lib/Target/X86/Disassembler/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_llvm_library(LLVMX86Disassembler
+add_llvm_component_library(LLVMX86Disassembler
X86Disassembler.cpp
X86DisassemblerDecoder.cpp
)
diff --git a/llvm/lib/Target/X86/MCTargetDesc/CMakeLists.txt b/llvm/lib/Target/X86/MCTargetDesc/CMakeLists.txt
index 18b6d0030ad6..e9f675e457b1 100644
--- a/llvm/lib/Target/X86/MCTargetDesc/CMakeLists.txt
+++ b/llvm/lib/Target/X86/MCTargetDesc/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_llvm_library(LLVMX86Desc
+add_llvm_component_library(LLVMX86Desc
X86ATTInstPrinter.cpp
X86IntelInstPrinter.cpp
X86InstComments.cpp
diff --git a/llvm/lib/Target/X86/TargetInfo/CMakeLists.txt b/llvm/lib/Target/X86/TargetInfo/CMakeLists.txt
index 1d8a8c1c118e..e51facd0f62e 100644
--- a/llvm/lib/Target/X86/TargetInfo/CMakeLists.txt
+++ b/llvm/lib/Target/X86/TargetInfo/CMakeLists.txt
@@ -1,3 +1,3 @@
-add_llvm_library(LLVMX86Info
+add_llvm_component_library(LLVMX86Info
X86TargetInfo.cpp
)
diff --git a/llvm/lib/Target/X86/Utils/CMakeLists.txt b/llvm/lib/Target/X86/Utils/CMakeLists.txt
index b2697467f26a..f32ead3c90d7 100644
--- a/llvm/lib/Target/X86/Utils/CMakeLists.txt
+++ b/llvm/lib/Target/X86/Utils/CMakeLists.txt
@@ -1,3 +1,3 @@
-add_llvm_library(LLVMX86Utils
+add_llvm_component_library(LLVMX86Utils
X86ShuffleDecode.cpp
)
diff --git a/llvm/lib/Target/XCore/Disassembler/CMakeLists.txt b/llvm/lib/Target/XCore/Disassembler/CMakeLists.txt
index 1ed10c02c356..1cded7b8158b 100644
--- a/llvm/lib/Target/XCore/Disassembler/CMakeLists.txt
+++ b/llvm/lib/Target/XCore/Disassembler/CMakeLists.txt
@@ -1,3 +1,3 @@
-add_llvm_library(LLVMXCoreDisassembler
+add_llvm_component_library(LLVMXCoreDisassembler
XCoreDisassembler.cpp
)
diff --git a/llvm/lib/Target/XCore/MCTargetDesc/CMakeLists.txt b/llvm/lib/Target/XCore/MCTargetDesc/CMakeLists.txt
index b2ff32158ae4..94dc178fbb1a 100644
--- a/llvm/lib/Target/XCore/MCTargetDesc/CMakeLists.txt
+++ b/llvm/lib/Target/XCore/MCTargetDesc/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_llvm_library(LLVMXCoreDesc
+add_llvm_component_library(LLVMXCoreDesc
XCoreInstPrinter.cpp
XCoreMCTargetDesc.cpp
XCoreMCAsmInfo.cpp
diff --git a/llvm/lib/Target/XCore/TargetInfo/CMakeLists.txt b/llvm/lib/Target/XCore/TargetInfo/CMakeLists.txt
index 462f2d405304..a041def3caa7 100644
--- a/llvm/lib/Target/XCore/TargetInfo/CMakeLists.txt
+++ b/llvm/lib/Target/XCore/TargetInfo/CMakeLists.txt
@@ -1,3 +1,3 @@
-add_llvm_library(LLVMXCoreInfo
+add_llvm_component_library(LLVMXCoreInfo
XCoreTargetInfo.cpp
)
diff --git a/llvm/lib/TextAPI/CMakeLists.txt b/llvm/lib/TextAPI/CMakeLists.txt
index d959fb972a80..6093e1531216 100644
--- a/llvm/lib/TextAPI/CMakeLists.txt
+++ b/llvm/lib/TextAPI/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_llvm_library(LLVMTextAPI
+add_llvm_component_library(LLVMTextAPI
ELF/ELFStub.cpp
ELF/TBEHandler.cpp
MachO/Architecture.cpp
diff --git a/llvm/lib/ToolDrivers/llvm-dlltool/CMakeLists.txt b/llvm/lib/ToolDrivers/llvm-dlltool/CMakeLists.txt
index 52bd5cba86f4..fb3ac8a41a6f 100644
--- a/llvm/lib/ToolDrivers/llvm-dlltool/CMakeLists.txt
+++ b/llvm/lib/ToolDrivers/llvm-dlltool/CMakeLists.txt
@@ -2,7 +2,7 @@ set(LLVM_TARGET_DEFINITIONS Options.td)
tablegen(LLVM Options.inc -gen-opt-parser-defs)
add_public_tablegen_target(DllOptionsTableGen)
-add_llvm_library(LLVMDlltoolDriver
+add_llvm_component_library(LLVMDlltoolDriver
DlltoolDriver.cpp
)
diff --git a/llvm/lib/ToolDrivers/llvm-lib/CMakeLists.txt b/llvm/lib/ToolDrivers/llvm-lib/CMakeLists.txt
index 3d948aab8e31..a6ba436927bc 100644
--- a/llvm/lib/ToolDrivers/llvm-lib/CMakeLists.txt
+++ b/llvm/lib/ToolDrivers/llvm-lib/CMakeLists.txt
@@ -10,7 +10,7 @@ set(LLVM_TARGET_DEFINITIONS Options.td)
tablegen(LLVM Options.inc -gen-opt-parser-defs)
add_public_tablegen_target(LibOptionsTableGen)
-add_llvm_library(LLVMLibDriver
+add_llvm_component_library(LLVMLibDriver
LibDriver.cpp
DEPENDS
diff --git a/llvm/lib/Transforms/AggressiveInstCombine/CMakeLists.txt b/llvm/lib/Transforms/AggressiveInstCombine/CMakeLists.txt
index 386314801e38..10686d420780 100644
--- a/llvm/lib/Transforms/AggressiveInstCombine/CMakeLists.txt
+++ b/llvm/lib/Transforms/AggressiveInstCombine/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_llvm_library(LLVMAggressiveInstCombine
+add_llvm_component_library(LLVMAggressiveInstCombine
AggressiveInstCombine.cpp
TruncInstCombine.cpp
diff --git a/llvm/lib/Transforms/CFGuard/CMakeLists.txt b/llvm/lib/Transforms/CFGuard/CMakeLists.txt
index b7518019b1ad..d1c020317799 100644
--- a/llvm/lib/Transforms/CFGuard/CMakeLists.txt
+++ b/llvm/lib/Transforms/CFGuard/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_llvm_library(LLVMCFGuard
+add_llvm_component_library(LLVMCFGuard
CFGuard.cpp
ADDITIONAL_HEADER_DIRS
diff --git a/llvm/lib/Transforms/Coroutines/CMakeLists.txt b/llvm/lib/Transforms/Coroutines/CMakeLists.txt
index 80a052a2d45d..c1f6d6c8d8d8 100644
--- a/llvm/lib/Transforms/Coroutines/CMakeLists.txt
+++ b/llvm/lib/Transforms/Coroutines/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_llvm_library(LLVMCoroutines
+add_llvm_component_library(LLVMCoroutines
Coroutines.cpp
CoroCleanup.cpp
CoroEarly.cpp
diff --git a/llvm/lib/Transforms/IPO/CMakeLists.txt b/llvm/lib/Transforms/IPO/CMakeLists.txt
index f1e40b8162f7..375d2fb3063b 100644
--- a/llvm/lib/Transforms/IPO/CMakeLists.txt
+++ b/llvm/lib/Transforms/IPO/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_llvm_library(LLVMipo
+add_llvm_component_library(LLVMipo
AlwaysInliner.cpp
ArgumentPromotion.cpp
Attributor.cpp
diff --git a/llvm/lib/Transforms/InstCombine/CMakeLists.txt b/llvm/lib/Transforms/InstCombine/CMakeLists.txt
index bba399bba35a..2f19882c3316 100644
--- a/llvm/lib/Transforms/InstCombine/CMakeLists.txt
+++ b/llvm/lib/Transforms/InstCombine/CMakeLists.txt
@@ -2,7 +2,7 @@ set(LLVM_TARGET_DEFINITIONS InstCombineTables.td)
tablegen(LLVM InstCombineTables.inc -gen-searchable-tables)
add_public_tablegen_target(InstCombineTableGen)
-add_llvm_library(LLVMInstCombine
+add_llvm_component_library(LLVMInstCombine
InstructionCombining.cpp
InstCombineAddSub.cpp
InstCombineAtomicRMW.cpp
diff --git a/llvm/lib/Transforms/Instrumentation/CMakeLists.txt b/llvm/lib/Transforms/Instrumentation/CMakeLists.txt
index 22190ad7a0ae..9316de4eb32c 100644
--- a/llvm/lib/Transforms/Instrumentation/CMakeLists.txt
+++ b/llvm/lib/Transforms/Instrumentation/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_llvm_library(LLVMInstrumentation
+add_llvm_component_library(LLVMInstrumentation
AddressSanitizer.cpp
BoundsChecking.cpp
CGProfile.cpp
diff --git a/llvm/lib/Transforms/ObjCARC/CMakeLists.txt b/llvm/lib/Transforms/ObjCARC/CMakeLists.txt
index 114471eb6f6e..774f150c5791 100644
--- a/llvm/lib/Transforms/ObjCARC/CMakeLists.txt
+++ b/llvm/lib/Transforms/ObjCARC/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_llvm_library(LLVMObjCARCOpts
+add_llvm_component_library(LLVMObjCARCOpts
ObjCARC.cpp
ObjCARCOpts.cpp
ObjCARCExpand.cpp
diff --git a/llvm/lib/Transforms/Scalar/CMakeLists.txt b/llvm/lib/Transforms/Scalar/CMakeLists.txt
index 89c2faebfbc0..7e51e85169b3 100644
--- a/llvm/lib/Transforms/Scalar/CMakeLists.txt
+++ b/llvm/lib/Transforms/Scalar/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_llvm_library(LLVMScalarOpts
+add_llvm_component_library(LLVMScalarOpts
ADCE.cpp
AlignmentFromAssumptions.cpp
BDCE.cpp
diff --git a/llvm/lib/Transforms/Utils/CMakeLists.txt b/llvm/lib/Transforms/Utils/CMakeLists.txt
index dd2661aa23ff..254662afdcf9 100644
--- a/llvm/lib/Transforms/Utils/CMakeLists.txt
+++ b/llvm/lib/Transforms/Utils/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_llvm_library(LLVMTransformUtils
+add_llvm_component_library(LLVMTransformUtils
ASanStackFrameLayout.cpp
AddDiscriminators.cpp
BasicBlockUtils.cpp
diff --git a/llvm/lib/Transforms/Vectorize/CMakeLists.txt b/llvm/lib/Transforms/Vectorize/CMakeLists.txt
index f6bd97ceb645..801b23cf1ace 100644
--- a/llvm/lib/Transforms/Vectorize/CMakeLists.txt
+++ b/llvm/lib/Transforms/Vectorize/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_llvm_library(LLVMVectorize
+add_llvm_component_library(LLVMVectorize
LoadStoreVectorizer.cpp
LoopVectorizationLegality.cpp
LoopVectorize.cpp
diff --git a/llvm/lib/WindowsManifest/CMakeLists.txt b/llvm/lib/WindowsManifest/CMakeLists.txt
index 183017999f3b..4f2d011d5434 100644
--- a/llvm/lib/WindowsManifest/CMakeLists.txt
+++ b/llvm/lib/WindowsManifest/CMakeLists.txt
@@ -5,7 +5,7 @@ if( CMAKE_HOST_UNIX )
endif()
endif()
-add_llvm_library(LLVMWindowsManifest
+add_llvm_component_library(LLVMWindowsManifest
WindowsManifestMerger.cpp
ADDITIONAL_HEADER_DIRS
diff --git a/llvm/lib/XRay/CMakeLists.txt b/llvm/lib/XRay/CMakeLists.txt
index 84d2914e0c0e..e56cf4a1d83e 100644
--- a/llvm/lib/XRay/CMakeLists.txt
+++ b/llvm/lib/XRay/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_llvm_library(LLVMXRay
+add_llvm_component_library(LLVMXRay
BlockIndexer.cpp
BlockPrinter.cpp
BlockVerifier.cpp
diff --git a/llvm/tools/llvm-shlib/CMakeLists.txt b/llvm/tools/llvm-shlib/CMakeLists.txt
index 901f55c99d59..3eb6db33a435 100644
--- a/llvm/tools/llvm-shlib/CMakeLists.txt
+++ b/llvm/tools/llvm-shlib/CMakeLists.txt
@@ -17,22 +17,10 @@ if(LLVM_BUILD_LLVM_DYLIB)
llvm_map_components_to_libnames(LIB_NAMES ${LLVM_DYLIB_COMPONENTS})
- # libLLVM.so should not have any dependencies on any other LLVM
- # shared libraries. When using the "all" pseudo-component,
- # LLVM_AVAILABLE_LIBS is added to the dependencies, which may
- # contain shared libraries (e.g. libLTO).
- #
- # Also exclude libLLVMTableGen for the following reasons:
+ # Exclude libLLVMTableGen for the following reasons:
# - it is only used by internal *-tblgen utilities;
# - it pollutes the global options space.
- foreach(lib ${LIB_NAMES})
- get_target_property(t ${lib} TYPE)
- if("${lib}" STREQUAL "LLVMTableGen")
- elseif("x${t}" STREQUAL "xSTATIC_LIBRARY")
- list(APPEND FILTERED_LIB_NAMES ${lib})
- endif()
- endforeach()
- set(LIB_NAMES ${FILTERED_LIB_NAMES})
+ list(REMOVE_ITEM LIB_NAMES "LLVMTableGen")
if(LLVM_DYLIB_EXPORTED_SYMBOL_FILE)
set(LLVM_EXPORTED_SYMBOL_FILE ${LLVM_DYLIB_EXPORTED_SYMBOL_FILE})
More information about the llvm-commits
mailing list