1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 10:42:39 +01:00
llvm-mirror/lib/Support
Tom Stellard 28bf7f3536 [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
2019-11-21 10:48:08 -08:00
..
Unix [Signal] Allow llvm clients to opt into one-shot SIGPIPE handling 2019-11-18 10:27:27 -08:00
Windows [Signal] Allow llvm clients to opt into one-shot SIGPIPE handling 2019-11-18 10:27:27 -08:00
AArch64TargetParser.cpp Implement target(branch-protection) attribute for AArch64 2019-11-15 15:40:46 +00:00
ABIBreak.cpp Move LLVM_ENABLE_ABI_BREAKING_CHECKS variables to their own file 2019-09-10 22:05:01 +00:00
Allocator.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AMDGPUMetadata.cpp [AMDGPU] add support for hostcall buffer pointer as hidden kernel argument 2019-11-20 15:53:55 +05:30
APFloat.cpp [clang] Add storage for APValue in ConstantExpr 2019-06-15 10:24:47 +00:00
APInt.cpp [APInt] Add saturating truncation methods 2019-11-08 17:52:43 +03:00
APSInt.cpp Fix parameter name comments using clang-tidy. NFC. 2019-07-16 04:46:31 +00:00
ARMAttributeParser.cpp ARMAttributeParser - fix shadow variable name warnings from decodeULEB128 calls. NFCI. 2019-11-02 20:12:59 +00:00
ARMBuildAttrs.cpp [ARM] add target arch definitions for 8.1-M and MVE 2019-05-30 12:57:04 +00:00
ARMTargetParser.cpp [ARM] VFPv2 only supports 16 D registers. 2019-09-17 21:42:38 +00:00
ARMWinEH.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Atomic.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
BinaryStreamError.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
BinaryStreamReader.cpp BinaryStream - fix static analyzer warnings. NFCI. 2019-11-08 13:20:24 +00:00
BinaryStreamRef.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
BinaryStreamWriter.cpp [Support] Add LEB128 support to BinaryStreamReader/Writer. 2019-04-17 15:38:27 +00:00
BlockFrequency.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
BranchProbability.cpp [BranchProbability] Delete a redundant overflow check 2019-06-15 10:09:59 +00:00
BuryPointer.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
CachePruning.cpp Rename F_{None,Text,Append} to OF_{None,Text,Append}. NFC 2019-08-05 05:43:48 +00:00
Chrono.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
circular_raw_ostream.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
CMakeLists.txt [cmake] Explicitly mark libraries defined in lib/ as "Component Libraries" 2019-11-21 10:48:08 -08:00
CodeGenCoverage.cpp [llvm] Migrate llvm::make_unique to std::make_unique 2019-08-15 15:54:37 +00:00
COM.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
CommandLine.cpp [CommandLine] Add inline ArgName printing 2019-11-06 08:17:33 -08:00
Compression.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ConvertUTF.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ConvertUTFWrapper.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
COPYRIGHT.regex
CrashRecoveryContext.cpp Revert "Forward declare Optional<T> in STLExtras.h" 2019-11-13 16:36:21 -08:00
CRC.cpp Unify the two CRC implementations 2019-10-09 09:06:30 +00:00
DAGDeltaAlgorithm.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
DataExtractor.cpp Add error handling to the DataExtractor class 2019-08-27 11:24:08 +00:00
Debug.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
DebugCounter.cpp Remove Support/Options.h, it is unused 2019-11-15 13:32:52 -08:00
DeltaAlgorithm.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
DJB.cpp Revert "Forward declare Optional<T> in STLExtras.h" 2019-11-13 16:36:21 -08:00
DynamicLibrary.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Errno.cpp Remove some autoconf references from docs and comments 2019-07-03 09:57:59 +00:00
Error.cpp [Error] Remove a broken code fragment accidentally included in 76bcbaafab2. 2019-11-20 17:50:22 -08:00
ErrorHandling.cpp [Support] Move the static initializer install_out_memory_new_handler to InitLLVM 2019-07-12 16:23:25 +00:00
FileCheck.cpp [FileCheck] Implement --ignore-case option. 2019-10-11 11:59:14 +00:00
FileCheckImpl.h FileCheckPattern::FindRegexVarEnd - make helper function static. NFC 2019-11-12 11:14:19 +00:00
FileCollector.cpp Rename F_{None,Text,Append} to OF_{None,Text,Append}. NFC 2019-08-05 05:43:48 +00:00
FileOutputBuffer.cpp [LLD][ELF] Support --[no-]mmap-output-file with F_no_mmap 2019-10-29 15:49:08 -07:00
FileUtilities.cpp Revert "r372201: [Support] Replace function with function_ref in writeFileAtomically. NFC" 2019-09-18 08:47:09 +00:00
FoldingSet.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FormattedStream.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FormatVariadic.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
GlobPattern.cpp Reapply r375051: [support] GlobPattern: add support for \ and [!...], and allow ] in more places 2019-10-17 18:09:05 +00:00
GraphWriter.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Hashing.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Host.cpp [Support] Don't check XCR0 when detecting avx512 on Darwin. 2019-11-21 09:18:00 +00:00
InitLLVM.cpp [Signal] Allow llvm clients to opt into one-shot SIGPIPE handling 2019-11-18 10:27:27 -08:00
IntEqClasses.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
IntervalMap.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ItaniumManglingCanonicalizer.cpp [demangle] NFC: get rid of NodeOrString 2019-11-04 12:17:12 -08:00
JSON.cpp [llvm] Migrate llvm::make_unique to std::make_unique 2019-08-15 15:54:37 +00:00
KnownBits.cpp [KnownBits] Add computeForAddCarry() 2019-04-12 18:18:08 +00:00
LEB128.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
LineIterator.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
LLVMBuild.txt Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Locale.cpp
LockFileManager.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
LowLevelType.cpp Fix parameter name comments using clang-tidy. NFC. 2019-07-16 04:46:31 +00:00
ManagedStatic.cpp [Support] Replace sys::Mutex with their standard equivalents. 2019-08-19 19:49:57 +00:00
MathExtras.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MD5.cpp
Memory.cpp [Support] Renamed member 'Size' to 'AllocatedSize' in MemoryBlock and OwningMemoryBlock. 2019-05-20 20:53:05 +00:00
MemoryBuffer.cpp [Support] Improve readNativeFile(Slice) interface 2019-08-22 08:13:30 +00:00
NativeFormatting.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Optional.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Parallel.cpp win: Move Parallel.h off concrt to cross-platform code 2019-10-10 18:57:23 +00:00
Path.cpp [Path] Fix bug in make_absolute logic 2019-08-06 15:46:45 +00:00
PluginLoader.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PrettyStackTrace.cpp Make GCC happy about attribute location 2019-07-25 16:58:15 +00:00
Process.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Program.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
RandomNumberGenerator.cpp [CommandLine] Provide parser<unsigned long> instantiation to allow cl::opt<uint64_t> on LP64 platforms 2019-04-24 02:40:20 +00:00
raw_os_ostream.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
raw_ostream.cpp raw_ostream - fix static analyzer warnings. NFCI. 2019-11-08 15:09:55 +00:00
regcomp.c Allow Compiler.h to be included in C files and fix fallthrough warnings 2019-08-23 17:25:21 +00:00
regengine.inc
regerror.c
regex2.h
regex_impl.h
Regex.cpp Regex: Make "match" and "sub" const member functions 2019-09-24 14:42:36 +00:00
regexec.c
regfree.c
regstrlcpy.c
regutils.h
RWMutex.cpp [RWMutex] Simplify availability check 2019-08-16 21:25:40 +00:00
ScaledNumber.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ScopedPrinter.cpp
SHA1.cpp [Support] Optimize SHA1 implementation 2019-11-11 22:14:28 -08:00
Signals.cpp Remove Support/Options.h, it is unused 2019-11-15 13:32:52 -08:00
Signposts.cpp [Support] Fix Wundef warning 2019-08-15 10:05:22 +00:00
SmallPtrSet.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SmallVector.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SourceMgr.cpp Simplify std::lower_bound with llvm::{bsearch,lower_bound}. NFC 2019-06-21 05:40:31 +00:00
SpecialCaseList.cpp Reland 9f3fdb0d7fab: [Driver] Use VFS to check if sanitizer blacklists exist 2019-11-21 11:56:09 +01:00
Statistic.cpp Statistic - Fix MSVC shadow warning against global PrintOnExit static variable. NFC. 2019-11-21 12:08:01 +00:00
StringExtras.cpp Print quoted backslashes in LLVM IR as \\ instead of \5C 2019-10-10 18:31:57 +00:00
StringMap.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
StringPool.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
StringRef.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
StringSaver.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SymbolRemappingReader.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SystemUtils.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
TargetParser.cpp [AMDGPU] gfx908 target 2019-07-09 18:10:06 +00:00
TargetRegistry.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
TarWriter.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Threading.cpp Reland "[Support] Add a way to run a function on a detached thread"" 2019-10-23 15:51:44 +02:00
ThreadLocal.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ThreadPool.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
TimeProfiler.cpp TimeTraceProfiler - fix uninitialized variable warning. NFCI. 2019-11-08 16:26:21 +00:00
Timer.cpp Timer - fix shadow variable warnings for Name/Description members. NFC. 2019-11-11 17:19:14 +00:00
ToolOutputFile.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
TrigramIndex.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Triple.cpp [triple] Use 'macabi' environment name for the Mac Catalyst triples 2019-07-03 01:02:43 +00:00
Twine.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Unicode.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
UnicodeCaseFold.cpp
Valgrind.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
VersionTuple.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
VirtualFileSystem.cpp Improve VFS compatibility on Windows 2019-11-14 08:48:47 -08:00
Watchdog.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
WithColor.cpp Revert r367649: Improve raw_ostream so that you can "write" colors using operator<< 2019-08-02 07:22:34 +00:00
xxhash.cpp
YAMLParser.cpp Fix null dereference in yaml::Document::skip 2019-11-11 20:48:28 -08:00
YAMLTraits.cpp YAML parser robustness improvements 2019-11-05 21:51:04 -08:00
Z3Solver.cpp [llvm] Migrate llvm::make_unique to std::make_unique 2019-08-15 15:54:37 +00:00