[lit] Improve lit.Run class
[llvm-complete.git] / utils / gn / secondary / llvm / lib / Support / BUILD.gn
blob88e23a48d499d925a84d717366cc3413f950fcad
1 static_library("Support") {
2   output_name = "LLVMSupport"
3   deps = [
4     "//llvm/include/llvm/Config:config",
5     "//llvm/lib/Demangle",
6     "//llvm/utils/gn/build/libs/pthread",
7     "//llvm/utils/gn/build/libs/terminfo",
8     "//llvm/utils/gn/build/libs/zlib",
9   ]
11   # public_deps are used for depending on targets that generate headers
12   # which are included in public headers of this target. public_deps means
13   # that targets depending on Support will implicitly be built only after
14   # abi-breaking and llvm-config have been built.
15   public_deps = [
16     # abi-breaking.h is also include by public headers in ADT, but ADT has
17     # no target in the gn build.  Since everything depends on Support, this
18     # public_dep does double duty of abi-breaking.h uses in public headers of
19     # both Support and ADT.
20     "//llvm/include/llvm/Config:abi-breaking",
21     "//llvm/include/llvm/Config:llvm-config",
23     # public_dep because public header TargetSelect.h includes these .def files.
24     "//llvm/include/llvm/Config:write_target_def_files",
25   ]
26   include_dirs = [
27     "Unix",
28     "Windows",
29   ]
30   sources = [
31     "AArch64TargetParser.cpp",
32     "ABIBreak.cpp",
33     "AMDGPUMetadata.cpp",
34     "APFloat.cpp",
35     "APInt.cpp",
36     "APSInt.cpp",
37     "ARMAttributeParser.cpp",
38     "ARMBuildAttrs.cpp",
39     "ARMTargetParser.cpp",
40     "ARMWinEH.cpp",
41     "Allocator.cpp",
42     "BinaryStreamError.cpp",
43     "BinaryStreamReader.cpp",
44     "BinaryStreamRef.cpp",
45     "BinaryStreamWriter.cpp",
46     "BlockFrequency.cpp",
47     "BranchProbability.cpp",
48     "BuryPointer.cpp",
49     "COM.cpp",
50     "CRC.cpp",
51     "CachePruning.cpp",
52     "Chrono.cpp",
53     "CodeGenCoverage.cpp",
54     "CommandLine.cpp",
55     "Compression.cpp",
56     "ConvertUTF.cpp",
57     "ConvertUTFWrapper.cpp",
58     "CrashRecoveryContext.cpp",
59     "DAGDeltaAlgorithm.cpp",
60     "DJB.cpp",
61     "DataExtractor.cpp",
62     "Debug.cpp",
63     "DebugCounter.cpp",
64     "DeltaAlgorithm.cpp",
65     "Error.cpp",
66     "ErrorHandling.cpp",
67     "FileCheck.cpp",
68     "FileCollector.cpp",
69     "FileOutputBuffer.cpp",
70     "FileUtilities.cpp",
71     "FoldingSet.cpp",
72     "FormatVariadic.cpp",
73     "FormattedStream.cpp",
74     "GlobPattern.cpp",
75     "GraphWriter.cpp",
76     "Hashing.cpp",
77     "InitLLVM.cpp",
78     "IntEqClasses.cpp",
79     "IntervalMap.cpp",
80     "ItaniumManglingCanonicalizer.cpp",
81     "JSON.cpp",
82     "KnownBits.cpp",
83     "LEB128.cpp",
84     "LineIterator.cpp",
85     "Locale.cpp",
86     "LockFileManager.cpp",
87     "LowLevelType.cpp",
88     "MD5.cpp",
89     "ManagedStatic.cpp",
90     "MathExtras.cpp",
91     "MemoryBuffer.cpp",
92     "NativeFormatting.cpp",
93     "Optional.cpp",
94     "Options.cpp",
95     "Parallel.cpp",
96     "PluginLoader.cpp",
97     "PrettyStackTrace.cpp",
98     "RWMutex.cpp",
99     "RandomNumberGenerator.cpp",
100     "Regex.cpp",
101     "SHA1.cpp",
102     "ScaledNumber.cpp",
103     "ScopedPrinter.cpp",
104     "Signposts.cpp",
105     "SmallPtrSet.cpp",
106     "SmallVector.cpp",
107     "SourceMgr.cpp",
108     "SpecialCaseList.cpp",
109     "Statistic.cpp",
110     "StringExtras.cpp",
111     "StringMap.cpp",
112     "StringPool.cpp",
113     "StringRef.cpp",
114     "StringSaver.cpp",
115     "SymbolRemappingReader.cpp",
116     "SystemUtils.cpp",
117     "TarWriter.cpp",
118     "TargetParser.cpp",
119     "ThreadPool.cpp",
120     "TimeProfiler.cpp",
121     "Timer.cpp",
122     "ToolOutputFile.cpp",
123     "TrigramIndex.cpp",
124     "Triple.cpp",
125     "Twine.cpp",
126     "Unicode.cpp",
127     "UnicodeCaseFold.cpp",
128     "VersionTuple.cpp",
129     "WithColor.cpp",
130     "YAMLParser.cpp",
131     "YAMLTraits.cpp",
132     "Z3Solver.cpp",
133     "circular_raw_ostream.cpp",
134     "raw_os_ostream.cpp",
135     "raw_ostream.cpp",
136     "regcomp.c",
137     "regerror.c",
138     "regexec.c",
139     "regfree.c",
140     "regstrlcpy.c",
141     "xxhash.cpp",
143     # System
144     "Atomic.cpp",
145     "DynamicLibrary.cpp",
146     "Errno.cpp",
147     "Host.cpp",
148     "Memory.cpp",
149     "Path.cpp",
150     "Process.cpp",
151     "Program.cpp",
152     "Signals.cpp",
153     "TargetRegistry.cpp",
154     "ThreadLocal.cpp",
155     "Threading.cpp",
156     "Valgrind.cpp",
157     "VirtualFileSystem.cpp",
158     "Watchdog.cpp",
159   ]
161   libs = []
163   # FIXME: llvm/Config/BUILD.gn currently always sets LLVM_WITH_Z3
164   # to false. If that changes we need to link to Z3 libs here.
166   if (current_os == "linux" || current_os == "android") {
167     libs += [ "dl" ]
168   } else if (current_os == "win") {
169     # Delay load shell32.dll if possible to speed up process startup.
170     libs += [ "delayimp.lib" ]
171     ldflags = [
172       "-delayload:ole32.dll",
173       "-delayload:shell32.dll",
174     ]
175   }