Importing rustc-1.45.2
Change-Id: Idd187dd729f3089d9529753a17db5fbb40bacdeb
diff --git a/src/llvm-project/llvm/utils/gn/secondary/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/BUILD.gn
index aa0c6b8..491fc89 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/BUILD.gn
@@ -7,12 +7,15 @@
"//clang-tools-extra/clangd/test",
"//clang-tools-extra/test",
"//clang/test",
+ "//compiler-rt/lib/scudo",
"//lld/test",
"//llvm/test",
]
+ if (current_os == "linux" || current_os == "mac") {
+ deps += [ "//compiler-rt" ]
+ }
if (current_os == "linux") {
deps += [
- "//compiler-rt",
"//libcxx",
"//libcxxabi",
"//libunwind",
diff --git a/src/llvm-project/llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/BUILD.gn
index 415e0fc..e37930f 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/BUILD.gn
@@ -34,5 +34,35 @@
"ClangTidyOptions.cpp",
"ClangTidyProfiling.cpp",
"ExpandModularHeadersPPCallbacks.cpp",
+ "GlobList.cpp",
]
}
+
+group("all-checks") {
+ # If you add a check, also add it to ClangTidyForceLinker.h.
+ deps = [
+ "//clang-tools-extra/clang-tidy/abseil",
+ "//clang-tools-extra/clang-tidy/android",
+ "//clang-tools-extra/clang-tidy/boost",
+ "//clang-tools-extra/clang-tidy/bugprone",
+ "//clang-tools-extra/clang-tidy/cert",
+ "//clang-tools-extra/clang-tidy/cppcoreguidelines",
+ "//clang-tools-extra/clang-tidy/darwin",
+ "//clang-tools-extra/clang-tidy/fuchsia",
+ "//clang-tools-extra/clang-tidy/google",
+ "//clang-tools-extra/clang-tidy/hicpp",
+ "//clang-tools-extra/clang-tidy/linuxkernel",
+ "//clang-tools-extra/clang-tidy/llvm",
+ "//clang-tools-extra/clang-tidy/misc",
+ "//clang-tools-extra/clang-tidy/modernize",
+ "//clang-tools-extra/clang-tidy/objc",
+ "//clang-tools-extra/clang-tidy/openmp",
+ "//clang-tools-extra/clang-tidy/performance",
+ "//clang-tools-extra/clang-tidy/portability",
+ "//clang-tools-extra/clang-tidy/readability",
+ "//clang-tools-extra/clang-tidy/zircon",
+ ]
+ if (clang_enable_static_analyzer) {
+ deps += [ "//clang-tools-extra/clang-tidy/mpi" ]
+ }
+}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/bugprone/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/bugprone/BUILD.gn
index a51645d..d60def6 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/bugprone/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/bugprone/BUILD.gn
@@ -16,17 +16,20 @@
sources = [
"ArgumentCommentCheck.cpp",
"AssertSideEffectCheck.cpp",
+ "BadSignalToKillThreadCheck.cpp",
"BoolPointerImplicitConversionCheck.cpp",
"BranchCloneCheck.cpp",
"BugproneTidyModule.cpp",
"CopyConstructorInitCheck.cpp",
"DanglingHandleCheck.cpp",
+ "DynamicStaticInitializersCheck.cpp",
"ExceptionEscapeCheck.cpp",
"FoldInitTypeCheck.cpp",
"ForwardDeclarationNamespaceCheck.cpp",
"ForwardingReferenceOverloadCheck.cpp",
"InaccurateEraseCheck.cpp",
"IncorrectRoundingsCheck.cpp",
+ "InfiniteLoopCheck.cpp",
"IntegerDivisionCheck.cpp",
"LambdaFunctionNameCheck.cpp",
"MacroParenthesesCheck.cpp",
@@ -35,8 +38,10 @@
"MisplacedWideningCastCheck.cpp",
"MoveForwardingReferenceCheck.cpp",
"MultipleStatementMacroCheck.cpp",
+ "NotNullTerminatedResultCheck.cpp",
"ParentVirtualCallCheck.cpp",
"PosixReturnCheck.cpp",
+ "SignedCharMisuseCheck.cpp",
"SizeofContainerCheck.cpp",
"SizeofExpressionCheck.cpp",
"StringConstructorCheck.cpp",
diff --git a/src/llvm-project/llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/cert/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/cert/BUILD.gn
index bd2ac48..90d52c0 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/cert/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/cert/BUILD.gn
@@ -17,9 +17,11 @@
sources = [
"CERTTidyModule.cpp",
"CommandProcessorCheck.cpp",
+ "DefaultOperatorNewAlignmentCheck.cpp",
"DontModifyStdNamespaceCheck.cpp",
"FloatLoopCounter.cpp",
"LimitedRandomnessCheck.cpp",
+ "MutatingCopyCheck.cpp",
"PostfixOperatorCheck.cpp",
"ProperlySeededRandomGeneratorCheck.cpp",
"SetLongJmpCheck.cpp",
diff --git a/src/llvm-project/llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/cppcoreguidelines/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/cppcoreguidelines/BUILD.gn
index a467d49..5d36602 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/cppcoreguidelines/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/cppcoreguidelines/BUILD.gn
@@ -18,6 +18,7 @@
sources = [
"AvoidGotoCheck.cpp",
"CppCoreGuidelinesTidyModule.cpp",
+ "InitVariablesCheck.cpp",
"InterfacesGlobalInitCheck.cpp",
"MacroUsageCheck.cpp",
"NarrowingConversionsCheck.cpp",
diff --git a/src/llvm-project/llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/darwin/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/darwin/BUILD.gn
new file mode 100644
index 0000000..e973919
--- /dev/null
+++ b/src/llvm-project/llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/darwin/BUILD.gn
@@ -0,0 +1,19 @@
+static_library("darwin") {
+ output_name = "clangTidyDarwinModule"
+ configs += [ "//llvm/utils/gn/build:clang_code" ]
+ deps = [
+ "//clang-tools-extra/clang-tidy",
+ "//clang-tools-extra/clang-tidy/utils",
+ "//clang/lib/AST",
+ "//clang/lib/ASTMatchers",
+ "//clang/lib/Analysis",
+ "//clang/lib/Basic",
+ "//clang/lib/Lex",
+ "//llvm/lib/Support",
+ ]
+ sources = [
+ "AvoidSpinlockCheck.cpp",
+ "DarwinTidyModule.cpp",
+ "DispatchOnceNonstaticCheck.cpp",
+ ]
+}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/google/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/google/BUILD.gn
index 2efa42a..204a25c 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/google/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/google/BUILD.gn
@@ -28,6 +28,7 @@
"OverloadedUnaryAndCheck.cpp",
"TodoCommentCheck.cpp",
"UnnamedNamespaceInHeaderCheck.cpp",
+ "UpgradeGoogletestCaseCheck.cpp",
"UsingNamespaceDirectiveCheck.cpp",
]
}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/linuxkernel/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/linuxkernel/BUILD.gn
new file mode 100644
index 0000000..109174d
--- /dev/null
+++ b/src/llvm-project/llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/linuxkernel/BUILD.gn
@@ -0,0 +1,17 @@
+static_library("linuxkernel") {
+ output_name = "clangTidyLinuxKernelModule"
+ configs += [ "//llvm/utils/gn/build:clang_code" ]
+ deps = [
+ "//clang-tools-extra/clang-tidy",
+ "//clang-tools-extra/clang-tidy/utils",
+ "//clang/lib/AST",
+ "//clang/lib/ASTMatchers",
+ "//clang/lib/Basic",
+ "//clang/lib/Lex",
+ "//llvm/lib/Support",
+ ]
+ sources = [
+ "LinuxKernelTidyModule.cpp",
+ "MustCheckErrsCheck.cpp",
+ ]
+}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/llvm/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/llvm/BUILD.gn
index d2d24a5..a956c16 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/llvm/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/llvm/BUILD.gn
@@ -17,6 +17,7 @@
"IncludeOrderCheck.cpp",
"LLVMTidyModule.cpp",
"PreferIsaOrDynCastInConditionalsCheck.cpp",
+ "PreferRegisterOverUnsignedCheck.cpp",
"TwineLocalCheck.cpp",
]
}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/objc/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/objc/BUILD.gn
index 714a4a1..bd6b2ad 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/objc/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/objc/BUILD.gn
@@ -12,8 +12,8 @@
]
sources = [
"AvoidNSErrorInitCheck.cpp",
- "AvoidSpinlockCheck.cpp",
"ForbiddenSubclassingCheck.cpp",
+ "MissingHashCheck.cpp",
"ObjCTidyModule.cpp",
"PropertyDeclarationCheck.cpp",
"SuperSelfCheck.cpp",
diff --git a/src/llvm-project/llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/performance/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/performance/BUILD.gn
index a8c7475..18539d7 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/performance/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/performance/BUILD.gn
@@ -20,8 +20,10 @@
"InefficientVectorOperationCheck.cpp",
"MoveConstArgCheck.cpp",
"MoveConstructorInitCheck.cpp",
+ "NoAutomaticMoveCheck.cpp",
"NoexceptMoveConstructorCheck.cpp",
"PerformanceTidyModule.cpp",
+ "TriviallyDestructibleCheck.cpp",
"TypePromotionInMathFnCheck.cpp",
"UnnecessaryCopyInitialization.cpp",
"UnnecessaryValueParamCheck.cpp",
diff --git a/src/llvm-project/llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/plugin/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/plugin/BUILD.gn
index ec6d4ce..4f635ad 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/plugin/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/plugin/BUILD.gn
@@ -1,28 +1,9 @@
-import("//clang/lib/StaticAnalyzer/Frontend/enable.gni")
-
static_library("plugin") {
output_name = "clangTidyPlugin"
configs += [ "//llvm/utils/gn/build:clang_code" ]
deps = [
"//clang-tools-extra/clang-tidy",
- "//clang-tools-extra/clang-tidy/abseil",
- "//clang-tools-extra/clang-tidy/android",
- "//clang-tools-extra/clang-tidy/boost",
- "//clang-tools-extra/clang-tidy/bugprone",
- "//clang-tools-extra/clang-tidy/cert",
- "//clang-tools-extra/clang-tidy/cppcoreguidelines",
- "//clang-tools-extra/clang-tidy/fuchsia",
- "//clang-tools-extra/clang-tidy/google",
- "//clang-tools-extra/clang-tidy/hicpp",
- "//clang-tools-extra/clang-tidy/llvm",
- "//clang-tools-extra/clang-tidy/misc",
- "//clang-tools-extra/clang-tidy/modernize",
- "//clang-tools-extra/clang-tidy/objc",
- "//clang-tools-extra/clang-tidy/openmp",
- "//clang-tools-extra/clang-tidy/performance",
- "//clang-tools-extra/clang-tidy/portability",
- "//clang-tools-extra/clang-tidy/readability",
- "//clang-tools-extra/clang-tidy/zircon",
+ "//clang-tools-extra/clang-tidy:all-checks",
"//clang/lib/AST",
"//clang/lib/ASTMatchers",
"//clang/lib/Basic",
@@ -31,10 +12,6 @@
"//clang/lib/Tooling",
]
- if (clang_enable_static_analyzer) {
- deps += [ "//clang-tools-extra/clang-tidy/mpi" ]
- }
-
sources = [
"ClangTidyPlugin.cpp",
]
diff --git a/src/llvm-project/llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/readability/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/readability/BUILD.gn
index b82db70..a1af0dd 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/readability/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/readability/BUILD.gn
@@ -26,12 +26,15 @@
"InconsistentDeclarationParameterNameCheck.cpp",
"IsolateDeclarationCheck.cpp",
"MagicNumbersCheck.cpp",
+ "MakeMemberFunctionConstCheck.cpp",
"MisleadingIndentationCheck.cpp",
"MisplacedArrayIndexCheck.cpp",
"NamedParameterCheck.cpp",
"NamespaceCommentCheck.cpp",
"NonConstParameterCheck.cpp",
+ "QualifiedAutoCheck.cpp",
"ReadabilityTidyModule.cpp",
+ "RedundantAccessSpecifiersCheck.cpp",
"RedundantControlFlowCheck.cpp",
"RedundantDeclarationCheck.cpp",
"RedundantFunctionPtrDereferenceCheck.cpp",
diff --git a/src/llvm-project/llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/tool/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/tool/BUILD.gn
index a5f7af4..43c7fbb 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/tool/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/tool/BUILD.gn
@@ -1,27 +1,8 @@
-import("//clang/lib/StaticAnalyzer/Frontend/enable.gni")
-
executable("clang-tidy") {
configs += [ "//llvm/utils/gn/build:clang_code" ]
deps = [
"//clang-tools-extra/clang-tidy",
- "//clang-tools-extra/clang-tidy/abseil",
- "//clang-tools-extra/clang-tidy/android",
- "//clang-tools-extra/clang-tidy/boost",
- "//clang-tools-extra/clang-tidy/bugprone",
- "//clang-tools-extra/clang-tidy/cert",
- "//clang-tools-extra/clang-tidy/cppcoreguidelines",
- "//clang-tools-extra/clang-tidy/fuchsia",
- "//clang-tools-extra/clang-tidy/google",
- "//clang-tools-extra/clang-tidy/hicpp",
- "//clang-tools-extra/clang-tidy/llvm",
- "//clang-tools-extra/clang-tidy/misc",
- "//clang-tools-extra/clang-tidy/modernize",
- "//clang-tools-extra/clang-tidy/objc",
- "//clang-tools-extra/clang-tidy/openmp",
- "//clang-tools-extra/clang-tidy/performance",
- "//clang-tools-extra/clang-tidy/portability",
- "//clang-tools-extra/clang-tidy/readability",
- "//clang-tools-extra/clang-tidy/zircon",
+ "//clang-tools-extra/clang-tidy:all-checks",
"//clang/lib/AST",
"//clang/lib/ASTMatchers",
"//clang/lib/Basic",
@@ -32,9 +13,6 @@
"//llvm/lib/Target:AllTargetsDescs",
"//llvm/lib/Target:AllTargetsInfos",
]
- if (clang_enable_static_analyzer) {
- deps += [ "//clang-tools-extra/clang-tidy/mpi" ]
- }
sources = [
"ClangTidyMain.cpp",
]
diff --git a/src/llvm-project/llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/utils/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/utils/BUILD.gn
index 2deb475..f3affc2 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/utils/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/utils/BUILD.gn
@@ -7,7 +7,7 @@
"//clang/lib/ASTMatchers",
"//clang/lib/Basic",
"//clang/lib/Lex",
- "//clang/lib/Tooling/Refactoring",
+ "//clang/lib/Tooling/Transformer",
"//llvm/lib/Support",
]
sources = [
diff --git a/src/llvm-project/llvm/utils/gn/secondary/clang-tools-extra/clangd/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/clang-tools-extra/clangd/BUILD.gn
index 44ebf40..ec2db1a 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/clang-tools-extra/clangd/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/clang-tools-extra/clangd/BUILD.gn
@@ -24,23 +24,8 @@
configs += [ "//llvm/utils/gn/build:clang_code" ]
deps = [
":features",
- "//clang-tools-extra/clang-tidy/abseil",
- "//clang-tools-extra/clang-tidy/android",
- "//clang-tools-extra/clang-tidy/boost",
- "//clang-tools-extra/clang-tidy/bugprone",
- "//clang-tools-extra/clang-tidy/cert",
- "//clang-tools-extra/clang-tidy/cppcoreguidelines",
- "//clang-tools-extra/clang-tidy/fuchsia",
- "//clang-tools-extra/clang-tidy/google",
- "//clang-tools-extra/clang-tidy/hicpp",
- "//clang-tools-extra/clang-tidy/llvm",
- "//clang-tools-extra/clang-tidy/misc",
- "//clang-tools-extra/clang-tidy/modernize",
- "//clang-tools-extra/clang-tidy/objc",
- "//clang-tools-extra/clang-tidy/performance",
- "//clang-tools-extra/clang-tidy/portability",
- "//clang-tools-extra/clang-tidy/readability",
- "//clang-tools-extra/clang-tidy/zircon",
+ "//clang-tools-extra/clang-tidy",
+ "//clang-tools-extra/clang-tidy:all-checks",
"//clang/lib/AST",
"//clang/lib/ASTMatchers",
"//clang/lib/Basic",
@@ -72,9 +57,9 @@
"Cancellation.cpp",
"ClangdLSPServer.cpp",
"ClangdServer.cpp",
- "ClangdUnit.cpp",
"CodeComplete.cpp",
"CodeCompletionStrings.cpp",
+ "CompileCommands.cpp",
"Compiler.cpp",
"Context.cpp",
"Diagnostics.cpp",
@@ -84,20 +69,28 @@
"FSProvider.cpp",
"FileDistance.cpp",
"FindSymbols.cpp",
+ "FindTarget.cpp",
"Format.cpp",
"FormattedString.cpp",
"FuzzyMatch.cpp",
"GlobalCompilationDatabase.cpp",
+ "HeaderSourceSwitch.cpp",
"Headers.cpp",
+ "Hover.cpp",
"IncludeFixer.cpp",
"JSONTransport.cpp",
"Logger.cpp",
+ "ParsedAST.cpp",
+ "PathMapping.cpp",
+ "Preamble.cpp",
"Protocol.cpp",
"Quality.cpp",
"QueryDriverDatabase.cpp",
"RIFF.cpp",
"Selection.cpp",
"SemanticHighlighting.cpp",
+ "SemanticSelection.cpp",
+ "Shutdown.cpp",
"SourceCode.cpp",
"TUScheduler.cpp",
"Threading.cpp",
diff --git a/src/llvm-project/llvm/utils/gn/secondary/clang-tools-extra/clangd/refactor/tweaks/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/clang-tools-extra/clangd/refactor/tweaks/BUILD.gn
index ad712ef..993adce 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/clang-tools-extra/clangd/refactor/tweaks/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/clang-tools-extra/clangd/refactor/tweaks/BUILD.gn
@@ -13,11 +13,16 @@
include_dirs = [ "../.." ]
sources = [
"AnnotateHighlightings.cpp",
+ "DefineInline.cpp",
+ "DefineOutline.cpp",
"DumpAST.cpp",
"ExpandAutoType.cpp",
"ExpandMacro.cpp",
+ "ExtractFunction.cpp",
"ExtractVariable.cpp",
+ "ObjCLocalizeStringLiteral.cpp",
"RawStringLiteral.cpp",
+ "RemoveUsingNamespace.cpp",
"SwapIfBranches.cpp",
]
}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/clang-tools-extra/clangd/unittests/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/clang-tools-extra/clangd/unittests/BUILD.gn
index 0d7c8c6..2cfe0f0 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/clang-tools-extra/clangd/unittests/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/clang-tools-extra/clangd/unittests/BUILD.gn
@@ -35,9 +35,10 @@
"CancellationTests.cpp",
"CanonicalIncludesTests.cpp",
"ClangdTests.cpp",
- "ClangdUnitTests.cpp",
"CodeCompleteTests.cpp",
"CodeCompletionStringsTests.cpp",
+ "CollectMacrosTests.cpp",
+ "CompileCommandsTests.cpp",
"ContextTests.cpp",
"DexTests.cpp",
"DiagnosticsTests.cpp",
@@ -47,21 +48,27 @@
"FileDistanceTests.cpp",
"FileIndexTests.cpp",
"FindSymbolsTests.cpp",
+ "FindTargetTests.cpp",
"FormatTests.cpp",
"FormattedStringTests.cpp",
"FunctionTests.cpp",
"FuzzyMatchTests.cpp",
"GlobalCompilationDatabaseTests.cpp",
+ "HeaderSourceSwitchTests.cpp",
"HeadersTests.cpp",
+ "HoverTests.cpp",
"IndexActionTests.cpp",
"IndexTests.cpp",
"JSONTransportTests.cpp",
+ "ParsedASTTests.cpp",
+ "PathMappingTests.cpp",
"PrintASTTests.cpp",
"QualityTests.cpp",
"RIFFTests.cpp",
"RenameTests.cpp",
"SelectionTests.cpp",
"SemanticHighlightingTests.cpp",
+ "SemanticSelectionTests.cpp",
"SerializationTests.cpp",
"SourceCodeTests.cpp",
"SymbolCollectorTests.cpp",
@@ -73,6 +80,7 @@
"TestTU.cpp",
"ThreadingTests.cpp",
"TraceTests.cpp",
+ "TweakTesting.cpp",
"TweakTests.cpp",
"TypeHierarchyTests.cpp",
"URITests.cpp",
diff --git a/src/llvm-project/llvm/utils/gn/secondary/clang-tools-extra/unittests/clang-doc/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/clang-tools-extra/unittests/clang-doc/BUILD.gn
index 0ba03e9..9a6415c 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/clang-tools-extra/unittests/clang-doc/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/clang-tools-extra/unittests/clang-doc/BUILD.gn
@@ -21,6 +21,7 @@
sources = [
"BitcodeTest.cpp",
"ClangDocTest.cpp",
+ "GeneratorTest.cpp",
"HTMLGeneratorTest.cpp",
"MDGeneratorTest.cpp",
"MergeTest.cpp",
diff --git a/src/llvm-project/llvm/utils/gn/secondary/clang-tools-extra/unittests/clang-tidy/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/clang-tools-extra/unittests/clang-tidy/BUILD.gn
index 7d1f256..ff6a173 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/clang-tools-extra/unittests/clang-tidy/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/clang-tools-extra/unittests/clang-tidy/BUILD.gn
@@ -18,13 +18,15 @@
"//clang/lib/Serialization",
"//clang/lib/Tooling",
"//clang/lib/Tooling/Core",
- "//clang/lib/Tooling/Refactoring",
+ "//clang/lib/Tooling/Transformer",
"//llvm/lib/Support",
]
include_dirs = [ "//clang-tools-extra/clang-tidy" ]
sources = [
+ "AddConstTest.cpp",
"ClangTidyDiagnosticConsumerTest.cpp",
"ClangTidyOptionsTest.cpp",
+ "GlobListTest.cpp",
"GoogleModuleTest.cpp",
"IncludeInserterTest.cpp",
"LLVMModuleTest.cpp",
diff --git a/src/llvm-project/llvm/utils/gn/secondary/clang/include/clang/AST/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/clang/include/clang/AST/BUILD.gn
index 6ac4a72..4be766d 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/clang/include/clang/AST/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/clang/include/clang/AST/BUILD.gn
@@ -1,47 +1,27 @@
import("//clang/utils/TableGen/clang_tablegen.gni")
clang_tablegen("Attrs") {
- args = [
- "-gen-clang-attr-classes",
- "-I",
- rebase_path("../..", root_out_dir),
- ]
+ args = [ "-gen-clang-attr-classes" ]
td_file = "../Basic/Attr.td"
}
clang_tablegen("AttrImpl") {
- args = [
- "-gen-clang-attr-impl",
- "-I",
- rebase_path("../..", root_out_dir),
- ]
+ args = [ "-gen-clang-attr-impl" ]
td_file = "../Basic/Attr.td"
}
clang_tablegen("AttrTextNodeDump") {
- args = [
- "-gen-clang-attr-text-node-dump",
- "-I",
- rebase_path("../..", root_out_dir),
- ]
+ args = [ "-gen-clang-attr-text-node-dump" ]
td_file = "../Basic/Attr.td"
}
clang_tablegen("AttrNodeTraverse") {
- args = [
- "-gen-clang-attr-node-traverse",
- "-I",
- rebase_path("../..", root_out_dir),
- ]
+ args = [ "-gen-clang-attr-node-traverse" ]
td_file = "../Basic/Attr.td"
}
clang_tablegen("AttrVisitor") {
- args = [
- "-gen-clang-attr-ast-visitor",
- "-I",
- rebase_path("../..", root_out_dir),
- ]
+ args = [ "-gen-clang-attr-ast-visitor" ]
td_file = "../Basic/Attr.td"
}
@@ -55,6 +35,31 @@
td_file = "../Basic/DeclNodes.td"
}
+clang_tablegen("TypeNodes") {
+ args = [ "-gen-clang-type-nodes" ]
+ td_file = "../Basic/TypeNodes.td"
+}
+
+clang_tablegen("AbstractBasicReader") {
+ args = [ "-gen-clang-basic-reader" ]
+ td_file = "PropertiesBase.td"
+}
+
+clang_tablegen("AbstractBasicWriter") {
+ args = [ "-gen-clang-basic-writer" ]
+ td_file = "PropertiesBase.td"
+}
+
+clang_tablegen("AbstractTypeReader") {
+ args = [ "-gen-clang-type-reader" ]
+ td_file = "TypeProperties.td"
+}
+
+clang_tablegen("AbstractTypeWriter") {
+ args = [ "-gen-clang-type-writer" ]
+ td_file = "TypeProperties.td"
+}
+
clang_tablegen("CommentNodes") {
args = [ "-gen-clang-comment-nodes" ]
td_file = "../Basic/CommentNodes.td"
diff --git a/src/llvm-project/llvm/utils/gn/secondary/clang/include/clang/Basic/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/clang/include/clang/Basic/BUILD.gn
index 7d67a2f..7f56624 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/clang/include/clang/Basic/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/clang/include/clang/Basic/BUILD.gn
@@ -89,7 +89,7 @@
td_file = "Attr.td"
}
-# Misc
+# ARM NEON and MVE
clang_tablegen("arm_neon") {
args = [ "-gen-arm-neon-sema" ]
@@ -98,3 +98,23 @@
clang_tablegen("arm_fp16") {
args = [ "-gen-arm-neon-sema" ]
}
+
+clang_tablegen("arm_mve_builtins") {
+ args = [ "-gen-arm-mve-builtin-def" ]
+ td_file = "arm_mve.td"
+}
+
+clang_tablegen("arm_mve_builtin_cg") {
+ args = [ "-gen-arm-mve-builtin-codegen" ]
+ td_file = "arm_mve.td"
+}
+
+clang_tablegen("arm_mve_builtin_sema") {
+ args = [ "-gen-arm-mve-builtin-sema" ]
+ td_file = "arm_mve.td"
+}
+
+clang_tablegen("arm_mve_builtin_aliases") {
+ args = [ "-gen-arm-mve-builtin-aliases" ]
+ td_file = "arm_mve.td"
+}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/clang/include/clang/Config/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/clang/include/clang/Config/BUILD.gn
index 61b8887..a2c13ea 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/clang/include/clang/Config/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/clang/include/clang/Config/BUILD.gn
@@ -28,9 +28,10 @@
"C_INCLUDE_DIRS=",
"CLANG_CONFIG_FILE_SYSTEM_DIR=",
"CLANG_CONFIG_FILE_USER_DIR=",
+ "CLANG_SPAWN_CC1=0",
"DEFAULT_SYSROOT=",
"GCC_INSTALL_PREFIX=",
- "BACKEND_PACKAGE_STRING=LLVM ${llvm_version}svn",
+ "BACKEND_PACKAGE_STRING=LLVM ${llvm_version}git",
"ENABLE_LINKER_BUILD_ID=",
"ENABLE_X86_RELAX_RELOCATIONS=",
"ENABLE_EXPERIMENTAL_NEW_PASS_MANAGER=",
diff --git a/src/llvm-project/llvm/utils/gn/secondary/clang/lib/AST/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/clang/lib/AST/BUILD.gn
index 9d72b38..9d44ae1 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/clang/lib/AST/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/clang/lib/AST/BUILD.gn
@@ -1,7 +1,16 @@
+import("//clang/utils/TableGen/clang_tablegen.gni")
+
+clang_tablegen("Opcodes") {
+ visibility = [ ":AST" ]
+ args = [ "-gen-clang-opcodes" ]
+ td_file = "Interp/Opcodes.td"
+}
+
static_library("AST") {
output_name = "clangAST"
configs += [ "//llvm/utils/gn/build:clang_code" ]
deps = [
+ ":Opcodes",
"//clang/include/clang/AST:AttrImpl",
"//clang/include/clang/AST:AttrNodeTraverse",
"//clang/include/clang/AST:AttrTextNodeDump",
@@ -13,20 +22,27 @@
"//clang/lib/Basic",
"//clang/lib/Lex",
"//llvm/lib/BinaryFormat",
+ "//llvm/lib/Frontend/OpenMP",
"//llvm/lib/Support",
]
# Generated files used in public headers should be in public_deps, the rest
# in regular deps.
public_deps = [
+ "//clang/include/clang/AST:AbstractBasicReader",
+ "//clang/include/clang/AST:AbstractBasicWriter",
+ "//clang/include/clang/AST:AbstractTypeReader",
+ "//clang/include/clang/AST:AbstractTypeWriter",
"//clang/include/clang/AST:AttrVisitor",
"//clang/include/clang/AST:Attrs",
"//clang/include/clang/AST:CommentCommandList",
"//clang/include/clang/AST:CommentNodes",
"//clang/include/clang/AST:StmtNodes",
+ "//clang/include/clang/AST:TypeNodes",
]
sources = [
"APValue.cpp",
+ "ASTConcept.cpp",
"ASTConsumer.cpp",
"ASTContext.cpp",
"ASTDiagnostic.cpp",
@@ -58,12 +74,34 @@
"Expr.cpp",
"ExprCXX.cpp",
"ExprClassification.cpp",
+ "ExprConcepts.cpp",
"ExprConstant.cpp",
"ExprObjC.cpp",
"ExternalASTMerger.cpp",
"ExternalASTSource.cpp",
"FormatString.cpp",
"InheritViz.cpp",
+ "Interp/Block.cpp",
+ "Interp/ByteCodeEmitter.cpp",
+ "Interp/ByteCodeExprGen.cpp",
+ "Interp/ByteCodeGenError.cpp",
+ "Interp/ByteCodeStmtGen.cpp",
+ "Interp/Context.cpp",
+ "Interp/Descriptor.cpp",
+ "Interp/Disasm.cpp",
+ "Interp/EvalEmitter.cpp",
+ "Interp/Frame.cpp",
+ "Interp/Function.cpp",
+ "Interp/Interp.cpp",
+ "Interp/InterpFrame.cpp",
+ "Interp/InterpStack.cpp",
+ "Interp/InterpState.cpp",
+ "Interp/Pointer.cpp",
+ "Interp/PrimType.cpp",
+ "Interp/Program.cpp",
+ "Interp/Record.cpp",
+ "Interp/Source.cpp",
+ "Interp/State.cpp",
"ItaniumCXXABI.cpp",
"ItaniumMangle.cpp",
"JSONNodeDumper.cpp",
diff --git a/src/llvm-project/llvm/utils/gn/secondary/clang/lib/Analysis/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/clang/lib/Analysis/BUILD.gn
index 1d45693..512fbce 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/clang/lib/Analysis/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/clang/lib/Analysis/BUILD.gn
@@ -25,6 +25,7 @@
"ExprMutationAnalyzer.cpp",
"LiveVariables.cpp",
"ObjCNoReturn.cpp",
+ "PathDiagnostic.cpp",
"PostOrderCFGView.cpp",
"ProgramPoint.cpp",
"ReachableCode.cpp",
diff --git a/src/llvm-project/llvm/utils/gn/secondary/clang/lib/Basic/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/clang/lib/Basic/BUILD.gn
index dd7ae77..4729e28 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/clang/lib/Basic/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/clang/lib/Basic/BUILD.gn
@@ -1,3 +1,21 @@
+import("//llvm/utils/gn/build/write_vcsrevision.gni")
+
+config("write_vcsrevision_config") {
+ # To pick up the generated inc file.
+ include_dirs = [ target_gen_dir ]
+ visibility = [ ":write_vcsrevision" ]
+}
+
+write_vcsrevision("write_vcsrevision") {
+ visibility = [ ":Basic" ]
+ header = "$target_gen_dir/VCSVersion.inc"
+ names = [
+ "LLVM",
+ "CLANG",
+ ]
+ public_configs = [ ":write_vcsrevision_config" ]
+}
+
static_library("Basic") {
output_name = "clangBasic"
configs += [ "//llvm/utils/gn/build:clang_code" ]
@@ -6,10 +24,12 @@
"//clang/include/clang/Basic:AttrList",
"//clang/include/clang/Basic:AttrSubMatchRulesList",
"//clang/include/clang/Basic:DiagnosticGroups",
+ "//clang/include/clang/Basic:arm_mve_builtins",
"//clang/include/clang/Basic:diags_tablegen",
"//clang/include/clang/Basic:version",
]
deps = [
+ ":write_vcsrevision",
"//clang/include/clang/Basic:AttrHasAttributeImpl",
"//clang/include/clang/Basic:arm_fp16",
"//clang/include/clang/Basic:arm_neon",
@@ -34,6 +54,7 @@
"FixedPoint.cpp",
"IdentifierTable.cpp",
"LangOptions.cpp",
+ "LangStandards.cpp",
"Module.cpp",
"ObjCRuntime.cpp",
"OpenMPKinds.cpp",
@@ -43,6 +64,7 @@
"Sanitizers.cpp",
"SourceLocation.cpp",
"SourceManager.cpp",
+ "Stack.cpp",
"TargetInfo.cpp",
"Targets.cpp",
"Targets/AArch64.cpp",
@@ -69,12 +91,10 @@
"Targets/X86.cpp",
"Targets/XCore.cpp",
"TokenKinds.cpp",
-
- # FIXME: This should be in its own target that passes -DHAVE_SVN_VERSION_INC
- # and that also depends on a target generating SVNVersion.inc.
"Version.cpp",
"Warnings.cpp",
"XRayInstr.cpp",
"XRayLists.cpp",
]
+ defines = [ "HAVE_VCS_VERSION_INC" ] # For Version.cpp
}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/clang/lib/CodeGen/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/clang/lib/CodeGen/BUILD.gn
index 0d63baf..3832313 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/clang/lib/CodeGen/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/clang/lib/CodeGen/BUILD.gn
@@ -2,6 +2,7 @@
output_name = "clangCodeGen"
configs += [ "//llvm/utils/gn/build:clang_code" ]
deps = [
+ "//clang/include/clang/Basic:arm_mve_builtin_cg",
"//clang/lib/AST",
"//clang/lib/Analysis",
"//clang/lib/Basic",
diff --git a/src/llvm-project/llvm/utils/gn/secondary/clang/lib/Driver/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/clang/lib/Driver/BUILD.gn
index 66d2097..9dd07a4 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/clang/lib/Driver/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/clang/lib/Driver/BUILD.gn
@@ -36,10 +36,12 @@
"DriverOptions.cpp",
"Job.cpp",
"Multilib.cpp",
+ "OptionUtils.cpp",
"Phases.cpp",
"SanitizerArgs.cpp",
"Tool.cpp",
"ToolChain.cpp",
+ "ToolChains/AIX.cpp",
"ToolChains/AMDGPU.cpp",
"ToolChains/AVR.cpp",
"ToolChains/Ananas.cpp",
@@ -60,6 +62,7 @@
"ToolChains/Cuda.cpp",
"ToolChains/Darwin.cpp",
"ToolChains/DragonFly.cpp",
+ "ToolChains/Flang.cpp",
"ToolChains/FreeBSD.cpp",
"ToolChains/Fuchsia.cpp",
"ToolChains/Gnu.cpp",
@@ -67,6 +70,7 @@
"ToolChains/Haiku.cpp",
"ToolChains/Hexagon.cpp",
"ToolChains/Hurd.cpp",
+ "ToolChains/InterfaceStubs.cpp",
"ToolChains/Linux.cpp",
"ToolChains/MSP430.cpp",
"ToolChains/MSVC.cpp",
diff --git a/src/llvm-project/llvm/utils/gn/secondary/clang/lib/Frontend/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/clang/lib/Frontend/BUILD.gn
index f9659d0..1713e5a 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/clang/lib/Frontend/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/clang/lib/Frontend/BUILD.gn
@@ -37,7 +37,6 @@
"InitHeaderSearch.cpp",
"InitPreprocessor.cpp",
"InterfaceStubFunctionsConsumer.cpp",
- "LangStandards.cpp",
"LayoutOverrideSource.cpp",
"LogDiagnosticPrinter.cpp",
"ModuleDependencyCollector.cpp",
diff --git a/src/llvm-project/llvm/utils/gn/secondary/clang/lib/Headers/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/clang/lib/Headers/BUILD.gn
index 37d4524..e992e19 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/clang/lib/Headers/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/clang/lib/Headers/BUILD.gn
@@ -15,13 +15,22 @@
output_name = "arm_fp16.h"
}
+# Generate arm_mve.h
+clang_tablegen("arm_mve") {
+ args = [ "-gen-arm-mve-header" ]
+ td_file = "//clang/include/clang/Basic/arm_mve.td"
+ output_name = "arm_mve.h"
+}
+
copy("arm_headers") {
visibility = [ ":Headers" ]
deps = [
":arm_fp16",
+ ":arm_mve",
":arm_neon",
]
- sources = get_target_outputs(":arm_neon") + get_target_outputs(":arm_fp16")
+ sources = get_target_outputs(":arm_neon") + get_target_outputs(":arm_fp16") +
+ get_target_outputs(":arm_mve")
outputs = [
"$clang_resource_dir/include/{{source_file_part}}",
]
@@ -36,6 +45,7 @@
# Tell `gn format` to not reorder the sources list: Its order matches CMake,
# and the ordering is alphabetical but ignores leading underscores.
sources = [
+ "arm_cmse.h",
"adxintrin.h",
"altivec.h",
"ammintrin.h",
@@ -164,6 +174,9 @@
"ppc_wrappers/xmmintrin.h",
"ppc_wrappers/mm_malloc.h",
"ppc_wrappers/emmintrin.h",
+ "ppc_wrappers/pmmintrin.h",
+ "ppc_wrappers/smmintrin.h",
+ "ppc_wrappers/tmmintrin.h",
"openmp_wrappers/math.h",
"openmp_wrappers/cmath",
"openmp_wrappers/__clang_openmp_math.h",
diff --git a/src/llvm-project/llvm/utils/gn/secondary/clang/lib/Index/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/clang/lib/Index/BUILD.gn
index f0b4d59..ef15a55 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/clang/lib/Index/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/clang/lib/Index/BUILD.gn
@@ -13,7 +13,6 @@
"//llvm/lib/Support",
]
sources = [
- "CodegenNameGenerator.cpp",
"CommentToXML.cpp",
"FileIndexRecord.cpp",
"IndexBody.cpp",
diff --git a/src/llvm-project/llvm/utils/gn/secondary/clang/lib/Parse/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/clang/lib/Parse/BUILD.gn
index 341881e..2947bf1 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/clang/lib/Parse/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/clang/lib/Parse/BUILD.gn
@@ -8,6 +8,7 @@
"//clang/lib/Basic",
"//clang/lib/Lex",
"//clang/lib/Sema",
+ "//llvm/lib/Frontend/OpenMP",
"//llvm/lib/MC",
"//llvm/lib/MC/MCParser",
"//llvm/lib/Support",
diff --git a/src/llvm-project/llvm/utils/gn/secondary/clang/lib/Sema/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/clang/lib/Sema/BUILD.gn
index ab7486d..c081171 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/clang/lib/Sema/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/clang/lib/Sema/BUILD.gn
@@ -9,6 +9,8 @@
configs += [ "//llvm/utils/gn/build:clang_code" ]
deps = [
":OpenCLBuiltins",
+ "//clang/include/clang/Basic:arm_mve_builtin_aliases",
+ "//clang/include/clang/Basic:arm_mve_builtin_sema",
"//clang/include/clang/Sema:AttrParsedAttrImpl",
"//clang/include/clang/Sema:AttrParsedAttrKinds",
"//clang/include/clang/Sema:AttrParsedAttrList",
@@ -19,6 +21,7 @@
"//clang/lib/Basic",
"//clang/lib/Edit",
"//clang/lib/Lex",
+ "//llvm/lib/Frontend/OpenMP",
"//llvm/lib/Support",
]
sources = [
@@ -40,6 +43,7 @@
"SemaCast.cpp",
"SemaChecking.cpp",
"SemaCodeComplete.cpp",
+ "SemaConcept.cpp",
"SemaConsumer.cpp",
"SemaCoroutine.cpp",
"SemaDecl.cpp",
diff --git a/src/llvm-project/llvm/utils/gn/secondary/clang/lib/Serialization/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/clang/lib/Serialization/BUILD.gn
index 8096e3a..4862556 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/clang/lib/Serialization/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/clang/lib/Serialization/BUILD.gn
@@ -24,7 +24,7 @@
"GeneratePCH.cpp",
"GlobalModuleIndex.cpp",
"InMemoryModuleCache.cpp",
- "Module.cpp",
+ "ModuleFile.cpp",
"ModuleFileExtension.cpp",
"ModuleManager.cpp",
"PCHContainerOperations.cpp",
diff --git a/src/llvm-project/llvm/utils/gn/secondary/clang/lib/StaticAnalyzer/Checkers/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/clang/lib/StaticAnalyzer/Checkers/BUILD.gn
index 9cde0e0..008af09 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/clang/lib/StaticAnalyzer/Checkers/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/clang/lib/StaticAnalyzer/Checkers/BUILD.gn
@@ -29,6 +29,7 @@
"CastValueChecker.cpp",
"CheckObjCDealloc.cpp",
"CheckObjCInstMethSignature.cpp",
+ "CheckPlacementNew.cpp",
"CheckSecuritySyntaxOnly.cpp",
"CheckSizeofPointer.cpp",
"CheckerDocumentation.cpp",
@@ -37,6 +38,7 @@
"ConversionChecker.cpp",
"DeadStoresChecker.cpp",
"DebugCheckers.cpp",
+ "DebugIteratorModeling.cpp",
"DeleteWithNonVirtualDtorChecker.cpp",
"DereferenceChecker.cpp",
"DirectIvarAssignment.cpp",
@@ -46,12 +48,16 @@
"EnumCastOutOfRangeChecker.cpp",
"ExprInspectionChecker.cpp",
"FixedAddressChecker.cpp",
+ "FuchsiaHandleChecker.cpp",
"GCDAntipatternChecker.cpp",
"GTestChecker.cpp",
"GenericTaintChecker.cpp",
"IdenticalExprChecker.cpp",
"InnerPointerChecker.cpp",
- "IteratorChecker.cpp",
+ "InvalidatedIteratorChecker.cpp",
+ "Iterator.cpp",
+ "IteratorModeling.cpp",
+ "IteratorRangeChecker.cpp",
"IvarInvalidationChecker.cpp",
"LLVMConventionsChecker.cpp",
"LocalizationChecker.cpp",
@@ -64,6 +70,7 @@
"MallocChecker.cpp",
"MallocOverflowSecurityChecker.cpp",
"MallocSizeofChecker.cpp",
+ "MismatchedIteratorChecker.cpp",
"MmapWriteExecChecker.cpp",
"MoveChecker.cpp",
"NSAutoreleasePoolChecker.cpp",
diff --git a/src/llvm-project/llvm/utils/gn/secondary/clang/lib/StaticAnalyzer/Core/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/clang/lib/StaticAnalyzer/Core/BUILD.gn
index 21236bf..115afb6 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/clang/lib/StaticAnalyzer/Core/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/clang/lib/StaticAnalyzer/Core/BUILD.gn
@@ -28,7 +28,7 @@
"CommonBugCategories.cpp",
"ConstraintManager.cpp",
"CoreEngine.cpp",
- "DynamicTypeMap.cpp",
+ "DynamicType.cpp",
"Environment.cpp",
"ExplodedGraph.cpp",
"ExprEngine.cpp",
@@ -42,7 +42,6 @@
"LoopUnrolling.cpp",
"LoopWidening.cpp",
"MemRegion.cpp",
- "PathDiagnostic.cpp",
"PlistDiagnostics.cpp",
"ProgramState.cpp",
"RangeConstraintManager.cpp",
diff --git a/src/llvm-project/llvm/utils/gn/secondary/clang/lib/Tooling/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/clang/lib/Tooling/BUILD.gn
index 8c1d5e1..5bc4241 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/clang/lib/Tooling/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/clang/lib/Tooling/BUILD.gn
@@ -19,6 +19,7 @@
"CommonOptionsParser.cpp",
"CompilationDatabase.cpp",
"Execution.cpp",
+ "ExpandResponseFilesCompilationDatabase.cpp",
"FileMatchTrie.cpp",
"FixIt.cpp",
"GuessTargetAndModeCompilationDatabase.cpp",
diff --git a/src/llvm-project/llvm/utils/gn/secondary/clang/lib/Tooling/DependencyScanning/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/clang/lib/Tooling/DependencyScanning/BUILD.gn
index 572d0d6..6bae1f9 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/clang/lib/Tooling/DependencyScanning/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/clang/lib/Tooling/DependencyScanning/BUILD.gn
@@ -15,6 +15,10 @@
"//llvm/lib/Support",
]
sources = [
+ "DependencyScanningFilesystem.cpp",
+ "DependencyScanningService.cpp",
+ "DependencyScanningTool.cpp",
"DependencyScanningWorker.cpp",
+ "ModuleDepCollector.cpp",
]
}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/clang/lib/Tooling/Refactoring/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/clang/lib/Tooling/Refactoring/BUILD.gn
index ef25bec..29445c0 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/clang/lib/Tooling/Refactoring/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/clang/lib/Tooling/Refactoring/BUILD.gn
@@ -19,15 +19,11 @@
"AtomicChange.cpp",
"Extract/Extract.cpp",
"Extract/SourceExtraction.cpp",
- "RangeSelector.cpp",
"RefactoringActions.cpp",
"Rename/RenamingAction.cpp",
"Rename/SymbolOccurrences.cpp",
"Rename/USRFinder.cpp",
"Rename/USRFindingAction.cpp",
"Rename/USRLocFinder.cpp",
- "SourceCode.cpp",
- "Stencil.cpp",
- "Transformer.cpp",
]
}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/clang/lib/Tooling/Syntax/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/clang/lib/Tooling/Syntax/BUILD.gn
index 29eb3c2..caa5019 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/clang/lib/Tooling/Syntax/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/clang/lib/Tooling/Syntax/BUILD.gn
@@ -9,7 +9,10 @@
]
sources = [
"BuildTree.cpp",
+ "ComputeReplacements.cpp",
+ "Mutations.cpp",
"Nodes.cpp",
+ "Synthesis.cpp",
"Tokens.cpp",
"Tree.cpp",
]
diff --git a/src/llvm-project/llvm/utils/gn/secondary/clang/lib/Tooling/Transformer/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/clang/lib/Tooling/Transformer/BUILD.gn
new file mode 100644
index 0000000..5462063
--- /dev/null
+++ b/src/llvm-project/llvm/utils/gn/secondary/clang/lib/Tooling/Transformer/BUILD.gn
@@ -0,0 +1,21 @@
+static_library("Transformer") {
+ output_name = "clangToolingTransformer"
+ configs += [ "//llvm/utils/gn/build:clang_code" ]
+ deps = [
+ "//clang/lib/AST",
+ "//clang/lib/ASTMatchers",
+ "//clang/lib/Basic",
+ "//clang/lib/Lex",
+ "//clang/lib/Tooling/Core",
+ "//clang/lib/Tooling/Refactoring",
+ "//llvm/lib/Support",
+ ]
+ sources = [
+ "RangeSelector.cpp",
+ "RewriteRule.cpp",
+ "SourceCode.cpp",
+ "SourceCodeBuilders.cpp",
+ "Stencil.cpp",
+ "Transformer.cpp",
+ ]
+}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/clang/test/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/clang/test/BUILD.gn
index 7cb9753..5cdbab8 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/clang/test/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/clang/test/BUILD.gn
@@ -2,6 +2,7 @@
import("//clang/lib/StaticAnalyzer/Frontend/enable.gni")
import("//llvm/lib/Target/targets.gni")
import("//llvm/triples.gni")
+import("//llvm/utils/gn/build/libs/pthread/enable.gni")
import("//llvm/utils/gn/build/libs/zlib/enable.gni")
import("//llvm/utils/gn/build/write_cmake_config.gni")
import("clang_lit_site_cfg_files.gni")
@@ -100,6 +101,12 @@
# FIXME: Analysis/plugins need global -fPIC
extra_values += [ "LLVM_ENABLE_PLUGINS=0" ]
}
+
+ if (llvm_enable_threads) {
+ extra_values += [ "LLVM_ENABLE_THREADS=1" ]
+ } else {
+ extra_values += [ "LLVM_ENABLE_THREADS=0" ] # Must be 0.
+ }
}
write_lit_config("lit_unit_site_cfg") {
@@ -135,12 +142,15 @@
"//llvm/tools/llvm-bcanalyzer",
"//llvm/tools/llvm-cat",
"//llvm/tools/llvm-config",
+ "//llvm/tools/llvm-cxxfilt",
"//llvm/tools/llvm-dis",
"//llvm/tools/llvm-dwarfdump",
+ "//llvm/tools/llvm-ifs",
"//llvm/tools/llvm-lto",
"//llvm/tools/llvm-lto2",
"//llvm/tools/llvm-modextract",
"//llvm/tools/llvm-nm:symlinks",
+ "//llvm/tools/llvm-objcopy:symlinks",
"//llvm/tools/llvm-objdump:symlinks",
"//llvm/tools/llvm-profdata",
"//llvm/tools/llvm-readobj:symlinks",
diff --git a/src/llvm-project/llvm/utils/gn/secondary/clang/tools/clang-format/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/clang/tools/clang-format/BUILD.gn
index 7352ae1..d7e2346 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/clang/tools/clang-format/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/clang/tools/clang-format/BUILD.gn
@@ -3,6 +3,7 @@
deps = [
"//clang/lib/Basic",
"//clang/lib/Format",
+ "//clang/lib/Frontend",
"//clang/lib/Rewrite",
"//clang/lib/Tooling/Core",
"//llvm/lib/Support",
diff --git a/src/llvm-project/llvm/utils/gn/secondary/clang/tools/clang-offload-wrapper/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/clang/tools/clang-offload-wrapper/BUILD.gn
new file mode 100644
index 0000000..bf1b38e
--- /dev/null
+++ b/src/llvm-project/llvm/utils/gn/secondary/clang/tools/clang-offload-wrapper/BUILD.gn
@@ -0,0 +1,13 @@
+executable("clang-offload-wrapper") {
+ configs += [ "//llvm/utils/gn/build:clang_code" ]
+ deps = [
+ "//clang/lib/Basic",
+ "//llvm/lib/Bitcode/Writer",
+ "//llvm/lib/IR",
+ "//llvm/lib/Support",
+ "//llvm/lib/Transforms/Utils",
+ ]
+ sources = [
+ "ClangOffloadWrapper.cpp",
+ ]
+}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/clang/tools/driver/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/clang/tools/driver/BUILD.gn
index 7324e04..d65682e 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/clang/tools/driver/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/clang/tools/driver/BUILD.gn
@@ -59,6 +59,7 @@
"//clang/lib/FrontendTool",
"//clang/lib/Headers",
"//clang/tools/clang-offload-bundler",
+ "//clang/tools/clang-offload-wrapper",
"//llvm/include/llvm/Config:llvm-config",
"//llvm/lib/Analysis",
"//llvm/lib/CodeGen",
diff --git a/src/llvm-project/llvm/utils/gn/secondary/clang/tools/libclang/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/clang/tools/libclang/BUILD.gn
index eb04b30..a41a34c 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/clang/tools/libclang/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/clang/tools/libclang/BUILD.gn
@@ -84,6 +84,7 @@
"CXTranslationUnit.h",
"CXType.cpp",
"CXType.h",
+ "FatalErrorHandler.cpp",
"Index_Internal.h",
"Indexing.cpp",
]
diff --git a/src/llvm-project/llvm/utils/gn/secondary/clang/unittests/AST/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/clang/unittests/AST/BUILD.gn
index d52d586..06b28de 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/clang/unittests/AST/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/clang/unittests/AST/BUILD.gn
@@ -15,6 +15,7 @@
"ASTContextParentMapTest.cpp",
"ASTImporterFixtures.cpp",
"ASTImporterGenericRedeclTest.cpp",
+ "ASTImporterODRStrategiesTest.cpp",
"ASTImporterTest.cpp",
"ASTImporterVisibilityTest.cpp",
"ASTTraverserTest.cpp",
@@ -31,6 +32,7 @@
"Language.cpp",
"NamedDeclPrinterTest.cpp",
"OMPStructuredBlockTest.cpp",
+ "RecursiveASTVisitorTest.cpp",
"SourceLocationTest.cpp",
"StmtPrinterTest.cpp",
"StructuralEquivalenceTest.cpp",
diff --git a/src/llvm-project/llvm/utils/gn/secondary/clang/unittests/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/clang/unittests/BUILD.gn
index befe73b..d138291 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/clang/unittests/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/clang/unittests/BUILD.gn
@@ -31,7 +31,10 @@
# to failures, mostly in libclang.VirtualFileOverlay_*.
# FIXME: Also, the executable can't find libclang.dll since that's
# in a different directory.
- deps += [ "libclang:libclangTests" ]
+ deps += [
+ "libclang:libclangTests",
+ "libclang/CrashTests:libclangCrashTests",
+ ]
}
testonly = true
}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/clang/unittests/Driver/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/clang/unittests/Driver/BUILD.gn
index 6a91b03..b8ec031 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/clang/unittests/Driver/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/clang/unittests/Driver/BUILD.gn
@@ -5,6 +5,7 @@
deps = [
"//clang/lib/Basic",
"//clang/lib/Driver",
+ "//clang/lib/Frontend",
"//llvm/lib/Option",
"//llvm/lib/Support",
"//llvm/lib/Target:TargetsToBuild",
@@ -13,6 +14,7 @@
"DistroTest.cpp",
"ModuleCacheTest.cpp",
"MultilibTest.cpp",
+ "SanitizerArgsTest.cpp",
"ToolChainTest.cpp",
]
}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/clang/unittests/Sema/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/clang/unittests/Sema/BUILD.gn
index 2c9e894..1e51037 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/clang/unittests/Sema/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/clang/unittests/Sema/BUILD.gn
@@ -15,5 +15,6 @@
sources = [
"CodeCompleteTest.cpp",
"ExternalSemaSourceTest.cpp",
+ "GslOwnerPointerInference.cpp",
]
}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/clang/unittests/Tooling/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/clang/unittests/Tooling/BUILD.gn
index d57538d..147797d 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/clang/unittests/Tooling/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/clang/unittests/Tooling/BUILD.gn
@@ -14,6 +14,7 @@
"//clang/lib/Tooling",
"//clang/lib/Tooling/Core",
"//clang/lib/Tooling/Refactoring",
+ "//clang/lib/Tooling/Transformer",
"//llvm/lib/Support",
"//llvm/lib/Target:TargetsToBuild",
"//llvm/lib/Testing/Support",
@@ -23,6 +24,7 @@
"CastExprTest.cpp",
"CommentHandlerTest.cpp",
"CompilationDatabaseTest.cpp",
+ "DependencyScannerTest.cpp",
"DiagnosticsYamlTest.cpp",
"ExecutionTest.cpp",
"FixItTest.cpp",
@@ -37,11 +39,13 @@
"RecursiveASTVisitorTests/Attr.cpp",
"RecursiveASTVisitorTests/CXXBoolLiteralExpr.cpp",
"RecursiveASTVisitorTests/CXXMemberCall.cpp",
+ "RecursiveASTVisitorTests/CXXMethodDecl.cpp",
"RecursiveASTVisitorTests/CXXOperatorCallExprTraverser.cpp",
"RecursiveASTVisitorTests/Class.cpp",
"RecursiveASTVisitorTests/ConstructExpr.cpp",
"RecursiveASTVisitorTests/DeclRefExpr.cpp",
"RecursiveASTVisitorTests/ImplicitCtor.cpp",
+ "RecursiveASTVisitorTests/ImplicitCtorInitializer.cpp",
"RecursiveASTVisitorTests/InitListExprPostOrder.cpp",
"RecursiveASTVisitorTests/InitListExprPostOrderNoQueue.cpp",
"RecursiveASTVisitorTests/InitListExprPreOrder.cpp",
@@ -50,6 +54,7 @@
"RecursiveASTVisitorTests/LambdaDefaultCapture.cpp",
"RecursiveASTVisitorTests/LambdaExpr.cpp",
"RecursiveASTVisitorTests/LambdaTemplateParams.cpp",
+ "RecursiveASTVisitorTests/MemberPointerTypeLoc.cpp",
"RecursiveASTVisitorTests/NestedNameSpecifiers.cpp",
"RecursiveASTVisitorTests/ParenExpr.cpp",
"RecursiveASTVisitorTests/TemplateArgumentLocTraverser.cpp",
@@ -59,6 +64,7 @@
"RefactoringTest.cpp",
"ReplacementsYamlTest.cpp",
"RewriterTest.cpp",
+ "SourceCodeBuildersTest.cpp",
"SourceCodeTest.cpp",
"StencilTest.cpp",
"ToolingTest.cpp",
diff --git a/src/llvm-project/llvm/utils/gn/secondary/clang/unittests/libclang/CrashTests/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/clang/unittests/libclang/CrashTests/BUILD.gn
new file mode 100644
index 0000000..05ce1ec
--- /dev/null
+++ b/src/llvm-project/llvm/utils/gn/secondary/clang/unittests/libclang/CrashTests/BUILD.gn
@@ -0,0 +1,14 @@
+import("//llvm/utils/unittest/unittest.gni")
+
+unittest("libclangCrashTests") {
+ configs += [ "//llvm/utils/gn/build:clang_code" ]
+ deps = [
+ "//clang/tools/libclang",
+ ]
+ sources = [
+ "LibclangCrashTest.cpp",
+ ]
+ if (host_os == "mac") {
+ ldflags = [ "-Wl,-rpath," + rebase_path("$root_out_dir/lib") ]
+ }
+}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/clang/utils/TableGen/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/clang/utils/TableGen/BUILD.gn
index 9a81b79..c077203 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/clang/utils/TableGen/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/clang/utils/TableGen/BUILD.gn
@@ -4,16 +4,21 @@
"//llvm/lib/TableGen",
]
sources = [
+ "ASTTableGen.cpp",
"ClangASTNodesEmitter.cpp",
+ "ClangASTPropertiesEmitter.cpp",
"ClangAttrEmitter.cpp",
"ClangCommentCommandInfoEmitter.cpp",
"ClangCommentHTMLNamedCharacterReferenceEmitter.cpp",
"ClangCommentHTMLTagsEmitter.cpp",
"ClangDataCollectorsEmitter.cpp",
"ClangDiagnosticsEmitter.cpp",
+ "ClangOpcodesEmitter.cpp",
"ClangOpenCLBuiltinEmitter.cpp",
"ClangOptionDocEmitter.cpp",
"ClangSACheckersEmitter.cpp",
+ "ClangTypeNodesEmitter.cpp",
+ "MveEmitter.cpp",
"NeonEmitter.cpp",
"TableGen.cpp",
]
diff --git a/src/llvm-project/llvm/utils/gn/secondary/clang/utils/TableGen/clang_tablegen.gni b/src/llvm-project/llvm/utils/gn/secondary/clang/utils/TableGen/clang_tablegen.gni
index efc1e3c..4dd28ff 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/clang/utils/TableGen/clang_tablegen.gni
+++ b/src/llvm-project/llvm/utils/gn/secondary/clang/utils/TableGen/clang_tablegen.gni
@@ -29,12 +29,15 @@
tablegen(target_name) {
forward_variables_from(invoker,
[
- "args",
"output_name",
"td_file",
"visibility",
])
+ args = [
+ "-I",
+ rebase_path("//clang/include", root_out_dir),
+ ] + invoker.args
tblgen_target = "//clang/utils/TableGen:clang-tblgen"
}
}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/compiler-rt/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/compiler-rt/BUILD.gn
index d2bfd1c..7a19616 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/compiler-rt/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/compiler-rt/BUILD.gn
@@ -1,5 +1,19 @@
-group("compiler-rt") {
- deps = [
- "//compiler-rt/lib(//llvm/utils/gn/build/toolchain:stage2_unix)",
+import("//llvm/utils/gn/build/toolchain/compiler.gni")
+
+# In the GN build, compiler-rt is always built by just-built clang and lld.
+# FIXME: For macOS and iOS builds, depend on lib in all needed target arch
+# toolchains and then lipo them together for the final output.
+supported_toolchains = [ "//llvm/utils/gn/build/toolchain:stage2_unix" ]
+if (android_ndk_path != "") {
+ supported_toolchains += [
+ "//llvm/utils/gn/build/toolchain:stage2_android_aarch64",
+ "//llvm/utils/gn/build/toolchain:stage2_android_arm",
]
}
+
+group("compiler-rt") {
+ deps = []
+ foreach(toolchain, supported_toolchains) {
+ deps += [ "//compiler-rt/lib($toolchain)" ]
+ }
+}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/compiler-rt/include/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/compiler-rt/include/BUILD.gn
index 446df71..103865d 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/compiler-rt/include/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/compiler-rt/include/BUILD.gn
@@ -2,6 +2,8 @@
copy("include") {
sources = [
+ "fuzzer/FuzzedDataProvider.h",
+ "profile/InstrProfData.inc",
"sanitizer/allocator_interface.h",
"sanitizer/asan_interface.h",
"sanitizer/common_interface_defs.h",
@@ -15,6 +17,7 @@
"sanitizer/scudo_interface.h",
"sanitizer/tsan_interface.h",
"sanitizer/tsan_interface_atomic.h",
+ "sanitizer/ubsan_interface.h",
"xray/xray_interface.h",
"xray/xray_log_interface.h",
"xray/xray_records.h",
diff --git a/src/llvm-project/llvm/utils/gn/secondary/compiler-rt/lib/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/compiler-rt/lib/BUILD.gn
index 16aa0ec..bc3664e 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/compiler-rt/lib/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/compiler-rt/lib/BUILD.gn
@@ -1,5 +1,6 @@
group("lib") {
deps = [
"//compiler-rt/lib/builtins",
+ "//compiler-rt/lib/profile",
]
}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/compiler-rt/lib/builtins/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/compiler-rt/lib/builtins/BUILD.gn
index 53d6386..f0602a7 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/compiler-rt/lib/builtins/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/compiler-rt/lib/builtins/BUILD.gn
@@ -2,7 +2,7 @@
import("//llvm/utils/gn/build/buildflags.gni")
declare_args() {
- # Skip the atomic builtin (these should normally be provided by a shared library)
+ # Skip the atomic builtin (should normally be provided by a shared library).
compiler_rt_exclude_atomic_builtin = true
# Compile builtins for baremetal.
@@ -11,20 +11,26 @@
static_library("builtins") {
output_dir = crt_current_out_dir
- output_name = "clang_rt.builtins$crt_current_target_suffix"
+ if (current_os == "mac") {
+ output_name = "clang_rt.osx"
+ } else {
+ output_name = "clang_rt.builtins$crt_current_target_suffix"
+ }
+
complete_static_lib = true
+ configs -= [ "//llvm/utils/gn/build:thin_archive" ]
+
cflags = [
"-fPIC",
"-fno-builtin",
]
- if (target_os != "android") {
+ if (current_os != "android") {
cflags += [ "-fvisibility=hidden" ]
}
if (!is_debug) {
cflags += [ "-fomit-frame-pointer" ]
}
cflags_c = [ "-std=c11" ]
- configs -= [ "//llvm/utils/gn/build:thin_archive" ]
sources = [
"absvdi2.c",
@@ -93,6 +99,7 @@
"floatunsisf.c",
"floatuntidf.c",
"floatuntisf.c",
+ "fp_mode.c",
"int_util.c",
"lshrdi3.c",
"lshrti3.c",
@@ -157,7 +164,7 @@
"gcc_personality_v0.c",
]
- if (target_os != "fuchsia") {
+ if (current_os != "fuchsia") {
sources += [
"emutls.c",
"enable_execute_stack.c",
@@ -165,7 +172,7 @@
]
}
- if (target_os != "fuchsia" && !compiler_rt_baremetal_build) {
+ if (current_os != "fuchsia" && !compiler_rt_baremetal_build) {
sources += [
# This comment prevents `gn format` from putting the file on the same line
# as `sources +=`, for sync_source_lists_from_cmake.py.
@@ -173,7 +180,7 @@
]
}
- if (target_os == "mac") {
+ if (current_os == "mac") {
sources += [
"atomic_flag_clear.c",
"atomic_flag_clear_explicit.c",
@@ -184,128 +191,8 @@
]
}
- if (target_cpu == "x86" || target_cpu == "x64") {
- sources += [
- "cpu_model.c",
- "divxc3.c",
- "fixunsxfdi.c",
- "fixunsxfsi.c",
- "fixunsxfti.c",
- "fixxfdi.c",
- "fixxfti.c",
- "floatdixf.c",
- "floattixf.c",
- "floatundixf.c",
- "floatuntixf.c",
- "mulxc3.c",
- "powixf2.c",
- ]
- }
- if (target_os == "x86") {
- sources += [
- "i386/ashldi3.S",
- "i386/ashrdi3.S",
- "i386/divdi3.S",
- "i386/floatdidf.S",
- "i386/floatdisf.S",
- "i386/floatdixf.S",
- "i386/floatundidf.S",
- "i386/floatundisf.S",
- "i386/floatundixf.S",
- "i386/lshrdi3.S",
- "i386/moddi3.S",
- "i386/muldi3.S",
- "i386/udivdi3.S",
- "i386/umoddi3.S",
- ]
- if (target_os == "win") {
- sources += [
- "i386/chkstk.S",
- "i386/chkstk2.S",
- ]
- }
- } else if (target_cpu == "x64") {
- sources += [
- "x86_64/floatdidf.c",
- "x86_64/floatdisf.c",
- "x86_64/floatdixf.c",
- "x86_64/floatundidf.S",
- "x86_64/floatundisf.S",
- "x86_64/floatundixf.S",
- ]
- if (target_os == "win") {
- sources += [
- "x86_64/chkstk.S",
- "x86_64/chkstk2.S",
- ]
- }
- }
-
- if (target_cpu == "arm") {
- sources += [
- "arm/bswapdi2.S",
- "arm/bswapsi2.S",
- "arm/clzdi2.S",
- "arm/clzsi2.S",
- "arm/comparesf2.S",
- "arm/divmodsi4.S",
- "arm/divsi3.S",
- "arm/modsi3.S",
- "arm/sync_fetch_and_add_4.S",
- "arm/sync_fetch_and_add_8.S",
- "arm/sync_fetch_and_and_4.S",
- "arm/sync_fetch_and_and_8.S",
- "arm/sync_fetch_and_max_4.S",
- "arm/sync_fetch_and_max_8.S",
- "arm/sync_fetch_and_min_4.S",
- "arm/sync_fetch_and_min_8.S",
- "arm/sync_fetch_and_nand_4.S",
- "arm/sync_fetch_and_nand_8.S",
- "arm/sync_fetch_and_or_4.S",
- "arm/sync_fetch_and_or_8.S",
- "arm/sync_fetch_and_sub_4.S",
- "arm/sync_fetch_and_sub_8.S",
- "arm/sync_fetch_and_umax_4.S",
- "arm/sync_fetch_and_umax_8.S",
- "arm/sync_fetch_and_umin_4.S",
- "arm/sync_fetch_and_umin_8.S",
- "arm/sync_fetch_and_xor_4.S",
- "arm/sync_fetch_and_xor_8.S",
- "arm/udivmodsi4.S",
- "arm/udivsi3.S",
- "arm/umodsi3.S",
- ]
- if (target_os == "mingw") {
- sources += [
- "arm/aeabi_idivmod.S",
- "arm/aeabi_ldivmod.S",
- "arm/aeabi_uidivmod.S",
- "arm/aeabi_uldivmod.S",
- "arm/chkstk.S",
- "divdi3.c",
- "divmoddi4.c",
- "divmodsi4.c",
- "divsi3.c",
- "emutls.c",
- "fixdfdi.c",
- "fixsfdi.c",
- "fixunsdfdi.c",
- "fixunssfdi.c",
- "floatdidf.c",
- "floatdisf.c",
- "floatundidf.c",
- "floatundisf.c",
- "mingw_fixfloat.c",
- "moddi3.c",
- "udivmoddi4.c",
- "udivmodsi4.c",
- "udivsi3.c",
- "umoddi3.c",
- ]
- }
- }
-
- if (target_cpu == "arm64") {
+ if ((current_cpu == "x64" && current_os != "win") || current_cpu == "arm64") {
+ # GENERIC_TF_SOURCES
sources += [
"comparetf2.c",
"extenddftf2.c",
@@ -326,7 +213,223 @@
"trunctfdf2.c",
"trunctfsf2.c",
]
- if (target_os == "mingw") {
+ }
+
+ if (current_cpu == "x86" || current_cpu == "x64") {
+ sources -= [ "fp_mode.c" ]
+ sources += [
+ "cpu_model.c",
+ "divxc3.c",
+ "fixunsxfdi.c",
+ "fixunsxfsi.c",
+ "fixunsxfti.c",
+ "fixxfdi.c",
+ "fixxfti.c",
+ "floatdixf.c",
+ "floattixf.c",
+ "floatundixf.c",
+ "floatuntixf.c",
+ "i386/fp_mode.c",
+ "mulxc3.c",
+ "powixf2.c",
+ ]
+ }
+ if (current_cpu == "x86") {
+ sources -= [
+ "ashldi3.c",
+ "ashrdi3.c",
+ "divdi3.c",
+ "floatdidf.c",
+ "floatdisf.c",
+ "floatdixf.c",
+ "floatundidf.c",
+ "floatundisf.c",
+ "floatundixf.c",
+ "lshrdi3.c",
+ "moddi3.c",
+ "muldi3.c",
+ "udivdi3.c",
+ "umoddi3.c",
+ ]
+ sources += [
+ "i386/ashldi3.S",
+ "i386/ashrdi3.S",
+ "i386/divdi3.S",
+ "i386/floatdidf.S",
+ "i386/floatdisf.S",
+ "i386/floatdixf.S",
+ "i386/floatundidf.S",
+ "i386/floatundisf.S",
+ "i386/floatundixf.S",
+ "i386/lshrdi3.S",
+ "i386/moddi3.S",
+ "i386/muldi3.S",
+ "i386/udivdi3.S",
+ "i386/umoddi3.S",
+ ]
+ if (current_os == "win") {
+ sources += [
+ "i386/chkstk.S",
+ "i386/chkstk2.S",
+ ]
+ }
+ } else if (current_cpu == "x64") {
+ sources -= [
+ "floatdidf.c",
+ "floatdisf.c",
+ "floatdixf.c",
+ "floatundidf.c",
+ "floatundisf.c",
+ "floatundixf.c",
+ ]
+ sources += [
+ "x86_64/floatdidf.c",
+ "x86_64/floatdisf.c",
+ "x86_64/floatdixf.c",
+ "x86_64/floatundidf.S",
+ "x86_64/floatundisf.S",
+ "x86_64/floatundixf.S",
+ ]
+ if (current_os == "win") {
+ sources += [
+ "x86_64/chkstk.S",
+ "x86_64/chkstk2.S",
+ ]
+ }
+ }
+
+ if (current_cpu == "arm") {
+ if (current_os != "mingw") {
+ sources -= [
+ "bswapdi2.c",
+ "bswapsi2.c",
+ "clzdi2.c",
+ "clzsi2.c",
+ "comparesf2.c",
+ "divmodsi4.c",
+ "divsi3.c",
+ "fp_mode.c",
+ "modsi3.c",
+ "udivmodsi4.c",
+ "udivsi3.c",
+ "umodsi3.c",
+ ]
+ sources += [
+ "arm/aeabi_cdcmp.S",
+ "arm/aeabi_cdcmpeq_check_nan.c",
+ "arm/aeabi_cfcmp.S",
+ "arm/aeabi_cfcmpeq_check_nan.c",
+ "arm/aeabi_dcmp.S",
+ "arm/aeabi_div0.c",
+ "arm/aeabi_drsub.c",
+ "arm/aeabi_fcmp.S",
+ "arm/aeabi_frsub.c",
+ "arm/aeabi_idivmod.S",
+ "arm/aeabi_ldivmod.S",
+ "arm/aeabi_memcmp.S",
+ "arm/aeabi_memcpy.S",
+ "arm/aeabi_memmove.S",
+ "arm/aeabi_memset.S",
+ "arm/aeabi_uidivmod.S",
+ "arm/aeabi_uldivmod.S",
+ "arm/bswapdi2.S",
+ "arm/bswapsi2.S",
+ "arm/clzdi2.S",
+ "arm/clzsi2.S",
+ "arm/comparesf2.S",
+ "arm/divmodsi4.S",
+ "arm/divsi3.S",
+ "arm/fp_mode.c",
+ "arm/modsi3.S",
+ "arm/switch16.S",
+ "arm/switch32.S",
+ "arm/switch8.S",
+ "arm/switchu8.S",
+ "arm/sync_fetch_and_add_4.S",
+ "arm/sync_fetch_and_add_8.S",
+ "arm/sync_fetch_and_and_4.S",
+ "arm/sync_fetch_and_and_8.S",
+ "arm/sync_fetch_and_max_4.S",
+ "arm/sync_fetch_and_max_8.S",
+ "arm/sync_fetch_and_min_4.S",
+ "arm/sync_fetch_and_min_8.S",
+ "arm/sync_fetch_and_nand_4.S",
+ "arm/sync_fetch_and_nand_8.S",
+ "arm/sync_fetch_and_or_4.S",
+ "arm/sync_fetch_and_or_8.S",
+ "arm/sync_fetch_and_sub_4.S",
+ "arm/sync_fetch_and_sub_8.S",
+ "arm/sync_fetch_and_umax_4.S",
+ "arm/sync_fetch_and_umax_8.S",
+ "arm/sync_fetch_and_umin_4.S",
+ "arm/sync_fetch_and_umin_8.S",
+ "arm/sync_fetch_and_xor_4.S",
+ "arm/sync_fetch_and_xor_8.S",
+ "arm/sync_synchronize.S",
+ "arm/udivmodsi4.S",
+ "arm/udivsi3.S",
+ "arm/umodsi3.S",
+ ]
+
+ if (current_os == "android") {
+ sources += [
+ "arm/adddf3vfp.S",
+ "arm/addsf3vfp.S",
+ "arm/divdf3vfp.S",
+ "arm/divsf3vfp.S",
+ "arm/eqdf2vfp.S",
+ "arm/eqsf2vfp.S",
+ "arm/extendsfdf2vfp.S",
+ "arm/fixdfsivfp.S",
+ "arm/fixsfsivfp.S",
+ "arm/fixunsdfsivfp.S",
+ "arm/fixunssfsivfp.S",
+ "arm/floatsidfvfp.S",
+ "arm/floatsisfvfp.S",
+ "arm/floatunssidfvfp.S",
+ "arm/floatunssisfvfp.S",
+ "arm/gedf2vfp.S",
+ "arm/gesf2vfp.S",
+ "arm/gtdf2vfp.S",
+ "arm/gtsf2vfp.S",
+ "arm/ledf2vfp.S",
+ "arm/lesf2vfp.S",
+ "arm/ltdf2vfp.S",
+ "arm/ltsf2vfp.S",
+ "arm/muldf3vfp.S",
+ "arm/mulsf3vfp.S",
+ "arm/nedf2vfp.S",
+ "arm/negdf2vfp.S",
+ "arm/negsf2vfp.S",
+ "arm/nesf2vfp.S",
+ "arm/restore_vfp_d8_d15_regs.S",
+ "arm/save_vfp_d8_d15_regs.S",
+ "arm/subdf3vfp.S",
+ "arm/subsf3vfp.S",
+ "arm/truncdfsf2vfp.S",
+ "arm/unorddf2vfp.S",
+ "arm/unordsf2vfp.S",
+ ]
+ }
+ } else {
+ sources += [
+ "arm/aeabi_idivmod.S",
+ "arm/aeabi_ldivmod.S",
+ "arm/aeabi_uidivmod.S",
+ "arm/aeabi_uldivmod.S",
+ "arm/chkstk.S",
+ "mingw_fixfloat.c",
+ ]
+ }
+ }
+
+ if (current_cpu == "arm64") {
+ sources += [
+ # This comment prevents `gn format` from putting the file on the same line
+ # as `sources +=`, for sync_source_lists_from_cmake.py.
+ "aarch64/fp_mode.c",
+ ]
+ if (current_os == "mingw") {
sources += [
# This comment prevents `gn format` from putting the file on the same
# line as `sources +=`, for sync_source_lists_from_cmake.py.
@@ -335,7 +438,7 @@
}
}
- if (target_cpu == "hexagon") {
+ if (current_cpu == "hexagon") {
sources += [
"hexagon/common_entry_exit_abi1.S",
"hexagon/common_entry_exit_abi2.S",
@@ -370,10 +473,11 @@
]
}
- if (target_cpu == "ppc64") {
+ if (current_cpu == "ppc64") {
sources += [
"ppc/divtc3.c",
"ppc/fixtfdi.c",
+ "ppc/fixtfti.c",
"ppc/fixunstfdi.c",
"ppc/fixunstfti.c",
"ppc/floatditf.c",
@@ -387,7 +491,7 @@
]
}
- if (target_cpu == "riscv") {
+ if (current_cpu == "riscv") {
sources += [
# This comment prevents `gn format` from putting the file on the same line
# as `sources +=`, for sync_source_lists_from_cmake.py.
@@ -404,7 +508,8 @@
}
}
-# Currently unused but necessary to make the sync_source_lists_from_cmake.py happy.
+# Currently unused but necessary to make the sync_source_lists_from_cmake.py
+# happy.
source_set("_unused") {
sources = [
# Thumb1
@@ -412,73 +517,5 @@
"arm/comparesf2.S",
"arm/divsi3.S",
"arm/udivsi3.S",
-
- # EABI
- "arm/aeabi_cdcmp.S",
- "arm/aeabi_cdcmpeq_check_nan.c",
- "arm/aeabi_cfcmp.S",
- "arm/aeabi_cfcmpeq_check_nan.c",
- "arm/aeabi_dcmp.S",
- "arm/aeabi_div0.c",
- "arm/aeabi_drsub.c",
- "arm/aeabi_fcmp.S",
- "arm/aeabi_frsub.c",
- "arm/aeabi_idivmod.S",
- "arm/aeabi_ldivmod.S",
- "arm/aeabi_memcmp.S",
- "arm/aeabi_memcpy.S",
- "arm/aeabi_memmove.S",
- "arm/aeabi_memset.S",
- "arm/aeabi_uidivmod.S",
- "arm/aeabi_uldivmod.S",
-
- # Thumb1 JT
- "arm/switch16.S",
- "arm/switch32.S",
- "arm/switch8.S",
- "arm/switchu8.S",
-
- # Thumb1 SjLj
- "arm/restore_vfp_d8_d15_regs.S",
- "arm/save_vfp_d8_d15_regs.S",
-
- # Thumb1 VFPv2
- "arm/adddf3vfp.S",
- "arm/addsf3vfp.S",
- "arm/divdf3vfp.S",
- "arm/divsf3vfp.S",
- "arm/eqdf2vfp.S",
- "arm/eqsf2vfp.S",
- "arm/extendsfdf2vfp.S",
- "arm/fixdfsivfp.S",
- "arm/fixsfsivfp.S",
- "arm/fixunsdfsivfp.S",
- "arm/fixunssfsivfp.S",
- "arm/floatsidfvfp.S",
- "arm/floatsisfvfp.S",
- "arm/floatunssidfvfp.S",
- "arm/floatunssisfvfp.S",
- "arm/gedf2vfp.S",
- "arm/gesf2vfp.S",
- "arm/gtdf2vfp.S",
- "arm/gtsf2vfp.S",
- "arm/ledf2vfp.S",
- "arm/lesf2vfp.S",
- "arm/ltdf2vfp.S",
- "arm/ltsf2vfp.S",
- "arm/muldf3vfp.S",
- "arm/mulsf3vfp.S",
- "arm/nedf2vfp.S",
- "arm/negdf2vfp.S",
- "arm/negsf2vfp.S",
- "arm/nesf2vfp.S",
- "arm/subdf3vfp.S",
- "arm/subsf3vfp.S",
- "arm/truncdfsf2vfp.S",
- "arm/unorddf2vfp.S",
- "arm/unordsf2vfp.S",
-
- # Thumb1 icache
- "arm/sync_synchronize.S",
]
}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/compiler-rt/lib/hwasan/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/compiler-rt/lib/hwasan/BUILD.gn
index f29d245..de7fe18 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/compiler-rt/lib/hwasan/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/compiler-rt/lib/hwasan/BUILD.gn
@@ -45,6 +45,7 @@
"hwasan_allocator.h",
"hwasan_dynamic_shadow.cpp",
"hwasan_dynamic_shadow.h",
+ "hwasan_exceptions.cpp",
"hwasan_flags.h",
"hwasan_interceptors.cpp",
"hwasan_interceptors_vfork.S",
@@ -57,11 +58,13 @@
"hwasan_poisoning.h",
"hwasan_report.cpp",
"hwasan_report.h",
+ "hwasan_setjmp.S",
"hwasan_tag_mismatch_aarch64.S",
"hwasan_thread.cpp",
"hwasan_thread.h",
"hwasan_thread_list.cpp",
"hwasan_thread_list.h",
+ "hwasan_type_test.cpp",
]
}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/compiler-rt/lib/interception/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/compiler-rt/lib/interception/BUILD.gn
index 77a6c28..02eadbf 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/compiler-rt/lib/interception/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/compiler-rt/lib/interception/BUILD.gn
@@ -6,12 +6,12 @@
]
sources = [
"interception.h",
- "interception_linux.cc",
+ "interception_linux.cpp",
"interception_linux.h",
- "interception_mac.cc",
+ "interception_mac.cpp",
"interception_mac.h",
- "interception_type_test.cc",
- "interception_win.cc",
+ "interception_type_test.cpp",
+ "interception_win.cpp",
"interception_win.h",
]
}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/compiler-rt/lib/profile/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/compiler-rt/lib/profile/BUILD.gn
new file mode 100644
index 0000000..36e8b15
--- /dev/null
+++ b/src/llvm-project/llvm/utils/gn/secondary/compiler-rt/lib/profile/BUILD.gn
@@ -0,0 +1,69 @@
+import("//compiler-rt/target.gni")
+
+static_library("profile") {
+ output_dir = crt_current_out_dir
+ if (current_os == "mac") {
+ output_name = "clang_rt.profile_osx"
+ } else {
+ output_name = "clang_rt.profile$crt_current_target_suffix"
+ }
+
+ complete_static_lib = true
+ configs -= [ "//llvm/utils/gn/build:thin_archive" ]
+
+ cflags = []
+ if (current_os != "win") {
+ cflags = [
+ "-fPIC",
+ "-Wno-pedantic",
+ ]
+ } else {
+ # This appears to be a C-only warning banning the use of locals in
+ # aggregate initializers. All other compilers accept this, though.
+ # nonstandard extension used : 'identifier' :
+ # cannot be initialized using address of automatic variable
+ cflags += [ "/wd4221" ]
+ }
+
+ include_dirs = [
+ "..",
+ "../../include",
+ ]
+
+ sources = [
+ "GCDAProfiling.c",
+ "InstrProfiling.c",
+ "InstrProfiling.h",
+ "InstrProfilingBuffer.c",
+ "InstrProfilingFile.c",
+ "InstrProfilingInternal.h",
+ "InstrProfilingMerge.c",
+ "InstrProfilingMergeFile.c",
+ "InstrProfilingNameVar.c",
+ "InstrProfilingPlatformDarwin.c",
+ "InstrProfilingPlatformFuchsia.c",
+ "InstrProfilingPlatformLinux.c",
+ "InstrProfilingPlatformOther.c",
+ "InstrProfilingPlatformWindows.c",
+ "InstrProfilingPort.h",
+ "InstrProfilingRuntime.cpp",
+ "InstrProfilingUtil.c",
+ "InstrProfilingUtil.h",
+ "InstrProfilingValue.c",
+ "InstrProfilingWriter.c",
+ ]
+ if (current_os == "win") {
+ sources += [
+ "WindowsMMap.c",
+ "WindowsMMap.h",
+ ]
+ }
+
+ if (current_os != "win") {
+ defines = [
+ "COMPILER_RT_TARGET_HAS_ATOMICS",
+ "COMPILER_RT_TARGET_HAS_FCNTL_LCK",
+ "COMPILER_RT_TARGET_HAS_UNAME",
+ ]
+ }
+}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/compiler-rt/lib/sanitizer_common/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/compiler-rt/lib/sanitizer_common/BUILD.gn
index 0c4c2e2..c5d9ab6 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/compiler-rt/lib/sanitizer_common/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/compiler-rt/lib/sanitizer_common/BUILD.gn
@@ -12,13 +12,13 @@
libs += [ "rt" ]
}
sources = [
- "sancov_flags.cc",
+ "sancov_flags.cpp",
"sancov_flags.h",
"sanitizer_addrhashmap.h",
- "sanitizer_allocator.cc",
+ "sanitizer_allocator.cpp",
"sanitizer_allocator.h",
"sanitizer_allocator_bytemap.h",
- "sanitizer_allocator_checks.cc",
+ "sanitizer_allocator_checks.cpp",
"sanitizer_allocator_checks.h",
"sanitizer_allocator_combined.h",
"sanitizer_allocator_interface.h",
@@ -26,7 +26,7 @@
"sanitizer_allocator_local_cache.h",
"sanitizer_allocator_primary32.h",
"sanitizer_allocator_primary64.h",
- "sanitizer_allocator_report.cc",
+ "sanitizer_allocator_report.cpp",
"sanitizer_allocator_report.h",
"sanitizer_allocator_secondary.h",
"sanitizer_allocator_size_class_map.h",
@@ -40,121 +40,138 @@
"sanitizer_atomic_msvc.h",
"sanitizer_bitvector.h",
"sanitizer_bvgraph.h",
- "sanitizer_common.cc",
+ "sanitizer_common.cpp",
"sanitizer_common.h",
- "sanitizer_common_libcdep.cc",
- "sanitizer_coverage_fuchsia.cc",
- "sanitizer_coverage_libcdep_new.cc",
- "sanitizer_coverage_win_sections.cc",
+ "sanitizer_common_libcdep.cpp",
+ "sanitizer_coverage_fuchsia.cpp",
+ "sanitizer_coverage_libcdep_new.cpp",
+ "sanitizer_coverage_win_sections.cpp",
"sanitizer_dbghelp.h",
"sanitizer_deadlock_detector.h",
- "sanitizer_deadlock_detector1.cc",
- "sanitizer_deadlock_detector2.cc",
+ "sanitizer_deadlock_detector1.cpp",
+ "sanitizer_deadlock_detector2.cpp",
"sanitizer_deadlock_detector_interface.h",
- "sanitizer_errno.cc",
+ "sanitizer_errno.cpp",
"sanitizer_errno.h",
"sanitizer_errno_codes.h",
- "sanitizer_file.cc",
+ "sanitizer_file.cpp",
"sanitizer_file.h",
- "sanitizer_flag_parser.cc",
+ "sanitizer_flag_parser.cpp",
"sanitizer_flag_parser.h",
- "sanitizer_flags.cc",
+ "sanitizer_flags.cpp",
"sanitizer_flags.h",
"sanitizer_freebsd.h",
- "sanitizer_fuchsia.cc",
+ "sanitizer_fuchsia.cpp",
"sanitizer_fuchsia.h",
"sanitizer_getauxval.h",
"sanitizer_hash.h",
"sanitizer_interface_internal.h",
"sanitizer_internal_defs.h",
"sanitizer_lfstack.h",
- "sanitizer_libc.cc",
+ "sanitizer_libc.cpp",
"sanitizer_libc.h",
- "sanitizer_libignore.cc",
+ "sanitizer_libignore.cpp",
"sanitizer_libignore.h",
- "sanitizer_linux.cc",
+ "sanitizer_linux.cpp",
"sanitizer_linux.h",
- "sanitizer_linux_libcdep.cc",
- "sanitizer_linux_s390.cc",
+ "sanitizer_linux_libcdep.cpp",
+ "sanitizer_linux_s390.cpp",
"sanitizer_list.h",
"sanitizer_local_address_space_view.h",
- "sanitizer_mac.cc",
+ "sanitizer_mac.cpp",
"sanitizer_mac.h",
- "sanitizer_mac_libcdep.cc",
+ "sanitizer_mac_libcdep.cpp",
"sanitizer_mutex.h",
- "sanitizer_netbsd.cc",
- "sanitizer_openbsd.cc",
- "sanitizer_persistent_allocator.cc",
+ "sanitizer_netbsd.cpp",
+ "sanitizer_openbsd.cpp",
+ "sanitizer_persistent_allocator.cpp",
"sanitizer_persistent_allocator.h",
"sanitizer_placement_new.h",
"sanitizer_platform.h",
"sanitizer_platform_interceptors.h",
- "sanitizer_platform_limits_freebsd.cc",
- "sanitizer_platform_limits_linux.cc",
- "sanitizer_platform_limits_netbsd.cc",
+ "sanitizer_platform_limits_freebsd.cpp",
+ "sanitizer_platform_limits_linux.cpp",
+ "sanitizer_platform_limits_netbsd.cpp",
"sanitizer_platform_limits_netbsd.h",
- "sanitizer_platform_limits_openbsd.cc",
+ "sanitizer_platform_limits_openbsd.cpp",
"sanitizer_platform_limits_openbsd.h",
- "sanitizer_platform_limits_posix.cc",
+ "sanitizer_platform_limits_posix.cpp",
"sanitizer_platform_limits_posix.h",
- "sanitizer_platform_limits_solaris.cc",
+ "sanitizer_platform_limits_solaris.cpp",
"sanitizer_platform_limits_solaris.h",
- "sanitizer_posix.cc",
+ "sanitizer_posix.cpp",
"sanitizer_posix.h",
- "sanitizer_posix_libcdep.cc",
- "sanitizer_printf.cc",
+ "sanitizer_posix_libcdep.cpp",
+ "sanitizer_printf.cpp",
"sanitizer_procmaps.h",
- "sanitizer_procmaps_bsd.cc",
- "sanitizer_procmaps_common.cc",
- "sanitizer_procmaps_linux.cc",
- "sanitizer_procmaps_mac.cc",
- "sanitizer_procmaps_solaris.cc",
+ "sanitizer_procmaps_bsd.cpp",
+ "sanitizer_procmaps_common.cpp",
+ "sanitizer_procmaps_linux.cpp",
+ "sanitizer_procmaps_mac.cpp",
+ "sanitizer_procmaps_solaris.cpp",
"sanitizer_quarantine.h",
"sanitizer_report_decorator.h",
"sanitizer_ring_buffer.h",
- "sanitizer_rtems.cc",
+ "sanitizer_rtems.cpp",
"sanitizer_rtems.h",
- "sanitizer_solaris.cc",
- "sanitizer_stackdepot.cc",
+ "sanitizer_solaris.cpp",
+ "sanitizer_stackdepot.cpp",
"sanitizer_stackdepot.h",
"sanitizer_stackdepotbase.h",
- "sanitizer_stacktrace.cc",
+ "sanitizer_stacktrace.cpp",
"sanitizer_stacktrace.h",
- "sanitizer_stacktrace_libcdep.cc",
- "sanitizer_stacktrace_printer.cc",
+ "sanitizer_stacktrace_libcdep.cpp",
+ "sanitizer_stacktrace_printer.cpp",
"sanitizer_stacktrace_printer.h",
- "sanitizer_stacktrace_sparc.cc",
+ "sanitizer_stacktrace_sparc.cpp",
"sanitizer_stoptheworld.h",
- "sanitizer_stoptheworld_linux_libcdep.cc",
- "sanitizer_stoptheworld_mac.cc",
- "sanitizer_suppressions.cc",
+ "sanitizer_stoptheworld_linux_libcdep.cpp",
+ "sanitizer_stoptheworld_mac.cpp",
+ "sanitizer_stoptheworld_netbsd_libcdep.cpp",
+ "sanitizer_suppressions.cpp",
"sanitizer_suppressions.h",
- "sanitizer_symbolizer.cc",
+ "sanitizer_symbolizer.cpp",
"sanitizer_symbolizer.h",
"sanitizer_symbolizer_fuchsia.h",
"sanitizer_symbolizer_internal.h",
- "sanitizer_symbolizer_libbacktrace.cc",
+ "sanitizer_symbolizer_libbacktrace.cpp",
"sanitizer_symbolizer_libbacktrace.h",
- "sanitizer_symbolizer_libcdep.cc",
- "sanitizer_symbolizer_mac.cc",
+ "sanitizer_symbolizer_libcdep.cpp",
+ "sanitizer_symbolizer_mac.cpp",
"sanitizer_symbolizer_mac.h",
- "sanitizer_symbolizer_markup.cc",
- "sanitizer_symbolizer_posix_libcdep.cc",
- "sanitizer_symbolizer_report.cc",
+ "sanitizer_symbolizer_markup.cpp",
+ "sanitizer_symbolizer_posix_libcdep.cpp",
+ "sanitizer_symbolizer_report.cpp",
"sanitizer_symbolizer_rtems.h",
- "sanitizer_symbolizer_win.cc",
- "sanitizer_termination.cc",
- "sanitizer_thread_registry.cc",
+ "sanitizer_symbolizer_win.cpp",
+ "sanitizer_termination.cpp",
+ "sanitizer_thread_registry.cpp",
"sanitizer_thread_registry.h",
- "sanitizer_tls_get_addr.cc",
+ "sanitizer_tls_get_addr.cpp",
"sanitizer_tls_get_addr.h",
- "sanitizer_unwind_linux_libcdep.cc",
- "sanitizer_unwind_win.cc",
+ "sanitizer_type_traits.cpp",
+ "sanitizer_unwind_linux_libcdep.cpp",
+ "sanitizer_unwind_win.cpp",
"sanitizer_vector.h",
- "sanitizer_win.cc",
+ "sanitizer_win.cpp",
"sanitizer_win.h",
"sanitizer_win_defs.h",
"sanitizer_win_dll_thunk.h",
"sanitizer_win_weak_interception.h",
]
}
+
+# Libc functions stubs. These sources should be linked instead of
+# SANITIZER_LIBCDEP_SOURCES when sanitizer_common library must not depend on
+# libc. This is currently unreferenced and exists to make
+# sync_source_lists_from_cmake happy.
+source_set("nolibc_sources") {
+ configs -= [ "//llvm/utils/gn/build:llvm_code" ]
+ configs += [ "//llvm/utils/gn/build:crt_code" ]
+ deps = [
+ "//llvm/utils/gn/build/libs/pthread",
+ ]
+ sources = [
+ "sanitizer_common_nolibc.cpp",
+ ]
+}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/compiler-rt/lib/scudo/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/compiler-rt/lib/scudo/BUILD.gn
new file mode 100644
index 0000000..a428674
--- /dev/null
+++ b/src/llvm-project/llvm/utils/gn/secondary/compiler-rt/lib/scudo/BUILD.gn
@@ -0,0 +1,49 @@
+import("//llvm/utils/gn/build/toolchain/compiler.gni")
+
+supported_toolchains = []
+if (target_os == "linux" || target_os == "fuchsia") {
+ supported_toolchains += [ "//llvm/utils/gn/build/toolchain:stage2_unix" ]
+}
+if (android_ndk_path != "") {
+ supported_toolchains += [
+ "//llvm/utils/gn/build/toolchain:stage2_android_aarch64",
+ "//llvm/utils/gn/build/toolchain:stage2_android_arm",
+ ]
+}
+
+group("scudo") {
+ deps = []
+ foreach(toolchain, supported_toolchains) {
+ deps += [
+ "standalone/benchmarks:ScudoBenchmarks($toolchain)",
+ "standalone/tests:ScudoCUnitTest($toolchain)",
+ "standalone/tests:ScudoCxxUnitTest($toolchain)",
+ "standalone/tests:ScudoUnitTest($toolchain)",
+ ]
+ }
+ testonly = true
+}
+
+# This target is unused, it only exists to satisfy
+# sync_source_lists_from_cmake.py.
+source_set("sources") {
+ sources = [
+ "scudo_allocator.cpp",
+ "scudo_allocator.h",
+ "scudo_allocator_combined.h",
+ "scudo_allocator_secondary.h",
+ "scudo_crc32.cpp",
+ "scudo_crc32.h",
+ "scudo_errors.cpp",
+ "scudo_errors.h",
+ "scudo_flags.cpp",
+ "scudo_flags.h",
+ "scudo_interface_internal.h",
+ "scudo_malloc.cpp",
+ "scudo_platform.h",
+ "scudo_termination.cpp",
+ "scudo_tsd.h",
+ "scudo_tsd_exclusive.cpp",
+ "scudo_tsd_shared.cpp",
+ ]
+}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/compiler-rt/lib/scudo/standalone/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/compiler-rt/lib/scudo/standalone/BUILD.gn
new file mode 100644
index 0000000..245ba18
--- /dev/null
+++ b/src/llvm-project/llvm/utils/gn/secondary/compiler-rt/lib/scudo/standalone/BUILD.gn
@@ -0,0 +1,84 @@
+import("//compiler-rt/target.gni")
+
+source_set("sources") {
+ configs -= [ "//llvm/utils/gn/build:llvm_code" ]
+ configs += [ "//llvm/utils/gn/build:crt_code" ]
+ sources = [
+ "allocator_config.h",
+ "atomic_helpers.h",
+ "bytemap.h",
+ "checksum.cpp",
+ "checksum.h",
+ "chunk.h",
+ "combined.h",
+ "common.cpp",
+ "crc32_hw.cpp",
+ "flags.cpp",
+ "flags.h",
+ "flags_parser.cpp",
+ "flags_parser.h",
+ "fuchsia.cpp",
+ "fuchsia.h",
+ "interface.h",
+ "internal_defs.h",
+ "linux.cpp",
+ "linux.h",
+ "list.h",
+ "local_cache.h",
+ "mutex.h",
+ "platform.h",
+ "primary32.h",
+ "primary64.h",
+ "quarantine.h",
+ "release.h",
+ "report.cpp",
+ "report.h",
+ "secondary.h",
+ "size_class_map.h",
+ "stats.h",
+ "string_utils.cpp",
+ "string_utils.h",
+ "tsd.h",
+ "tsd_exclusive.h",
+ "tsd_shared.h",
+ "vector.h",
+ "wrappers_c.h",
+ "wrappers_c_checks.h",
+ ]
+
+ if (current_cpu == "arm" || current_cpu == "arm64") {
+ cflags = [ "-mcrc" ]
+ }
+ if (current_cpu == "x64") {
+ cflags = [ "-msse4.2" ]
+ }
+
+ public_configs = [ ":scudo_config" ]
+}
+
+source_set("c_wrapper_sources") {
+ configs -= [ "//llvm/utils/gn/build:llvm_code" ]
+ configs += [ "//llvm/utils/gn/build:crt_code" ]
+ sources = [
+ "wrappers_c.cpp",
+ ]
+
+ public_configs = [ ":scudo_config" ]
+}
+
+source_set("cxx_wrapper_sources") {
+ configs -= [ "//llvm/utils/gn/build:llvm_code" ]
+ configs += [ "//llvm/utils/gn/build:crt_code" ]
+ sources = [
+ "wrappers_cpp.cpp",
+ ]
+
+ public_configs = [ ":scudo_config" ]
+}
+
+config("scudo_config") {
+ include_dirs = [ "//compiler-rt/lib/scudo/standalone" ]
+ if (current_os == "android") {
+ cflags = [ "-fno-emulated-tls" ]
+ }
+}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/compiler-rt/lib/scudo/standalone/benchmarks/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/compiler-rt/lib/scudo/standalone/benchmarks/BUILD.gn
new file mode 100644
index 0000000..bed9e3d
--- /dev/null
+++ b/src/llvm-project/llvm/utils/gn/secondary/compiler-rt/lib/scudo/standalone/benchmarks/BUILD.gn
@@ -0,0 +1,10 @@
+executable("ScudoBenchmarks") {
+ configs += [ "//llvm/utils/gn/build:crt_code" ]
+ sources = [
+ "malloc_benchmark.cpp",
+ ]
+ deps = [
+ "//compiler-rt/lib/scudo/standalone:sources",
+ "//llvm/utils/benchmark",
+ ]
+}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/compiler-rt/lib/scudo/standalone/tests/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/compiler-rt/lib/scudo/standalone/tests/BUILD.gn
new file mode 100644
index 0000000..391c296
--- /dev/null
+++ b/src/llvm-project/llvm/utils/gn/secondary/compiler-rt/lib/scudo/standalone/tests/BUILD.gn
@@ -0,0 +1,62 @@
+import("//llvm/utils/gn/build/toolchain/compiler.gni")
+import("//llvm/utils/unittest/unittest.gni")
+
+unittest("ScudoUnitTest") {
+ configs += [ "//llvm/utils/gn/build:crt_code" ]
+ deps = [
+ "//compiler-rt/lib/scudo/standalone:sources",
+ ]
+ sources = [
+ "atomic_test.cpp",
+ "bytemap_test.cpp",
+ "checksum_test.cpp",
+ "chunk_test.cpp",
+ "combined_test.cpp",
+ "flags_test.cpp",
+ "list_test.cpp",
+ "map_test.cpp",
+ "mutex_test.cpp",
+ "primary_test.cpp",
+ "quarantine_test.cpp",
+ "release_test.cpp",
+ "report_test.cpp",
+ "scudo_unit_test_main.cpp",
+ "secondary_test.cpp",
+ "size_class_map_test.cpp",
+ "stats_test.cpp",
+ "strings_test.cpp",
+ "tsd_test.cpp",
+ "vector_test.cpp",
+ ]
+ has_custom_main = true
+}
+
+unittest("ScudoCUnitTest") {
+ configs += [ "//llvm/utils/gn/build:crt_code" ]
+ deps = [
+ "//compiler-rt/lib/scudo/standalone:c_wrapper_sources",
+ "//compiler-rt/lib/scudo/standalone:sources",
+ ]
+ sources = [
+ "scudo_unit_test_main.cpp",
+ "wrappers_c_test.cpp",
+ ]
+ has_custom_main = true
+}
+
+unittest("ScudoCxxUnitTest") {
+ configs += [ "//llvm/utils/gn/build:crt_code" ]
+ deps = [
+ "//compiler-rt/lib/scudo/standalone:c_wrapper_sources",
+ "//compiler-rt/lib/scudo/standalone:cxx_wrapper_sources",
+ "//compiler-rt/lib/scudo/standalone:sources",
+ ]
+ sources = [
+ "scudo_unit_test_main.cpp",
+ "wrappers_cpp_test.cpp",
+ ]
+ if (is_clang) {
+ cflags = [ "-Wno-mismatched-new-delete" ]
+ }
+ has_custom_main = true
+}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/compiler-rt/lib/ubsan/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/compiler-rt/lib/ubsan/BUILD.gn
index 6fa8663..d38040c 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/compiler-rt/lib/ubsan/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/compiler-rt/lib/ubsan/BUILD.gn
@@ -7,34 +7,47 @@
"//compiler-rt/lib/sanitizer_common:sources",
]
sources = [
- "ubsan_diag.cc",
+ "ubsan_diag.cpp",
"ubsan_diag.h",
- "ubsan_flags.cc",
+ "ubsan_flags.cpp",
"ubsan_flags.h",
- "ubsan_handlers.cc",
+ "ubsan_handlers.cpp",
"ubsan_handlers.h",
- "ubsan_init.cc",
+ "ubsan_init.cpp",
"ubsan_init.h",
- "ubsan_monitor.cc",
+ "ubsan_monitor.cpp",
"ubsan_monitor.h",
"ubsan_platform.h",
"ubsan_signals_standalone.h",
"ubsan_type_hash.h",
- "ubsan_value.cc",
+ "ubsan_value.cpp",
"ubsan_value.h",
]
}
+# Unreferenced; at the moment exists to make sync_source_lists_from_cmake happy.
+source_set("standalone_sources") {
+ configs -= [ "//llvm/utils/gn/build:llvm_code" ]
+ configs -= [ "//llvm/utils/gn/build:no_rtti" ]
+ configs += [ "//llvm/utils/gn/build:crt_code" ]
+ defines = [ "UBSAN_CAN_USE_CXXABI" ]
+ sources = [
+ "ubsan_diag_standalone.cpp",
+ "ubsan_init_standalone.cpp",
+ "ubsan_signals_standalone.cpp",
+ ]
+}
+
source_set("cxx_sources") {
configs -= [ "//llvm/utils/gn/build:llvm_code" ]
configs -= [ "//llvm/utils/gn/build:no_rtti" ]
configs += [ "//llvm/utils/gn/build:crt_code" ]
defines = [ "UBSAN_CAN_USE_CXXABI" ]
sources = [
- "ubsan_handlers_cxx.cc",
+ "ubsan_handlers_cxx.cpp",
"ubsan_handlers_cxx.h",
- "ubsan_type_hash.cc",
- "ubsan_type_hash_itanium.cc",
- "ubsan_type_hash_win.cc",
+ "ubsan_type_hash.cpp",
+ "ubsan_type_hash_itanium.cpp",
+ "ubsan_type_hash_win.cpp",
]
}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/compiler-rt/target.gni b/src/llvm-project/llvm/utils/gn/secondary/compiler-rt/target.gni
index 0d55e0d..1f2372e 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/compiler-rt/target.gni
+++ b/src/llvm-project/llvm/utils/gn/secondary/compiler-rt/target.gni
@@ -5,6 +5,8 @@
crt_current_target_arch = "i386"
} else if (current_cpu == "x64") {
crt_current_target_arch = "x86_64"
+} else if (current_cpu == "arm") {
+ crt_current_target_arch = "arm"
} else if (current_cpu == "arm64") {
crt_current_target_arch = "aarch64"
} else if (current_cpu == "ppc64") {
@@ -24,6 +26,8 @@
if (current_os == "android") {
crt_current_target_suffix += "-android"
}
+} else if (current_os == "mac") {
+ crt_current_out_dir = "$clang_resource_dir/lib/darwin"
} else {
assert(false, "unimplemented current_os " + current_os)
}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/compiler-rt/test/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/compiler-rt/test/BUILD.gn
index 1ee30ee..c033991 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/compiler-rt/test/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/compiler-rt/test/BUILD.gn
@@ -50,6 +50,7 @@
"SANITIZER_CAN_USE_CXXABI_PYBOOL=True",
"COMPILER_RT_HAS_LLD_PYBOOL=True",
"COMPILER_RT_HAS_GWP_ASAN_PYBOOL=False",
+ "LLVM_ENABLE_EXPENSIVE_CHECKS_PYBOOL=False",
"HAVE_RPC_XDR_H=0",
"ANDROID_NDK_VERSION=19",
"ANDROID_SERIAL_FOR_TESTING=$android_serial_for_testing",
diff --git a/src/llvm-project/llvm/utils/gn/secondary/libcxx/src/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/libcxx/src/BUILD.gn
index 8f5c1c3..f96e4e0 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/libcxx/src/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/libcxx/src/BUILD.gn
@@ -230,7 +230,7 @@
if (libcxx_enable_abi_linker_script) {
action("cxx_linker_script") {
- script = "//libcxx/utils/gen_link_script.py"
+ script = "//llvm/utils/gn/secondary/libcxx/utils/gen_link_script.py"
outputs = [
"$runtimes_dir/libc++.so",
]
diff --git a/src/llvm-project/llvm/utils/gn/secondary/libcxx/utils/gen_link_script.py b/src/llvm-project/llvm/utils/gn/secondary/libcxx/utils/gen_link_script.py
new file mode 100755
index 0000000..485aa64
--- /dev/null
+++ b/src/llvm-project/llvm/utils/gn/secondary/libcxx/utils/gen_link_script.py
@@ -0,0 +1,50 @@
+#!/usr/bin/env python
+#===----------------------------------------------------------------------===##
+#
+# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+# See https://llvm.org/LICENSE.txt for license information.
+# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+#
+#===----------------------------------------------------------------------===##
+
+"""
+Generate a linker script that links libc++ to the proper ABI library.
+An example script for c++abi would look like "INPUT(libc++.so.1 -lc++abi)".
+"""
+
+import argparse
+import os
+import sys
+
+
+def main():
+ parser = argparse.ArgumentParser(description=__doc__)
+ parser.add_argument("--input", help="Path to libc++ library", required=True)
+ parser.add_argument("--output", help="Path to libc++ linker script",
+ required=True)
+ parser.add_argument("libraries", nargs="+",
+ help="List of libraries libc++ depends on")
+ args = parser.parse_args()
+
+ # Use the relative path for the libc++ library.
+ libcxx = os.path.relpath(args.input, os.path.dirname(args.output))
+
+ # Prepare the list of public libraries to link.
+ public_libs = ['-l%s' % l for l in args.libraries]
+
+ # Generate the linker script contents.
+ contents = "INPUT(%s)" % ' '.join([libcxx] + public_libs)
+
+ # Remove the existing libc++ symlink if it exists.
+ if os.path.islink(args.output):
+ os.unlink(args.output)
+
+ # Replace it with the linker script.
+ with open(args.output, 'w') as f:
+ f.write(contents + "\n")
+
+ return 0
+
+
+if __name__ == '__main__':
+ sys.exit(main())
diff --git a/src/llvm-project/llvm/utils/gn/secondary/libunwind/src/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/libunwind/src/BUILD.gn
index 1e96b56..9b11804 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/libunwind/src/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/libunwind/src/BUILD.gn
@@ -45,7 +45,11 @@
"UnwindCursor.hpp",
]
if (target_os == "mac") {
- unwind_sources += [ "src/Unwind_AppleExtras.cpp" ]
+ unwind_sources += [
+ # This comment prevents `gn format` from putting the file on the same line
+ # as `sources +=`, for sync_source_lists_from_cmake.py.
+ "Unwind_AppleExtras.cpp",
+ ]
}
config("unwind_config") {
diff --git a/src/llvm-project/llvm/utils/gn/secondary/lld/COFF/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/lld/COFF/BUILD.gn
index c565b0b..4e0a207 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/lld/COFF/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/lld/COFF/BUILD.gn
@@ -15,6 +15,7 @@
"//llvm/lib/DebugInfo/CodeView",
"//llvm/lib/DebugInfo/MSF",
"//llvm/lib/DebugInfo/PDB",
+ "//llvm/lib/DebugInfo/Symbolize",
"//llvm/lib/IR",
"//llvm/lib/LTO",
"//llvm/lib/MC",
diff --git a/src/llvm-project/llvm/utils/gn/secondary/lld/Common/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/lld/Common/BUILD.gn
index 6f7e50b..dc18044 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/lld/Common/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/lld/Common/BUILD.gn
@@ -16,6 +16,7 @@
]
sources = [
"Args.cpp",
+ "DWARF.cpp",
"ErrorHandler.cpp",
"Filesystem.cpp",
"Memory.cpp",
@@ -24,6 +25,8 @@
"TargetOptionsCommandFlags.cpp",
"Threads.cpp",
"Timer.cpp",
+
+ # FIXME: This should be in its own target that passes -DHAVE_VCS_VERSION_INC
"Version.cpp",
]
}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/lld/ELF/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/lld/ELF/BUILD.gn
index 3645595..99870a7 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/lld/ELF/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/lld/ELF/BUILD.gn
@@ -24,6 +24,7 @@
include_dirs = [ "." ]
sources = [
"AArch64ErrataFix.cpp",
+ "ARMErrataFix.cpp",
"Arch/AArch64.cpp",
"Arch/AMDGPU.cpp",
"Arch/ARM.cpp",
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/include/llvm/Config/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/include/llvm/Config/BUILD.gn
index f09d8a2..96be1e9 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/llvm/include/llvm/Config/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/include/llvm/Config/BUILD.gn
@@ -120,8 +120,8 @@
"LLVM_VERSION_PRINTER_SHOW_HOST_TARGET_INFO=1",
"PACKAGE_BUGREPORT=https://bugs.llvm.org/",
"PACKAGE_NAME=LLVM",
- "PACKAGE_STRING=LLVM ${llvm_version}svn",
- "PACKAGE_VERSION=${llvm_version}svn",
+ "PACKAGE_STRING=LLVM ${llvm_version}git",
+ "PACKAGE_VERSION=${llvm_version}git",
"PACKAGE_VENDOR=",
"RETSIGTYPE=void",
"LLVM_GISEL_COV_ENABLED=",
@@ -323,7 +323,6 @@
output = "$target_gen_dir/llvm-config.h"
values = [
"LLVM_ENABLE_DUMP=",
- "LINK_POLLY_INTO_TOOLS=",
"LLVM_DEFAULT_TARGET_TRIPLE=$llvm_target_triple",
"LLVM_HAS_ATOMICS=1",
"LLVM_HOST_TRIPLE=$llvm_current_triple",
@@ -340,7 +339,7 @@
"LLVM_VERSION_MAJOR=$llvm_version_major",
"LLVM_VERSION_MINOR=$llvm_version_minor",
"LLVM_VERSION_PATCH=$llvm_version_patch",
- "PACKAGE_VERSION=${llvm_version}svn",
+ "PACKAGE_VERSION=${llvm_version}git",
"LLVM_FORCE_ENABLE_STATS=",
]
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/include/llvm/IR/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/include/llvm/IR/BUILD.gn
index c9165c3..9dad1b9 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/llvm/include/llvm/IR/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/include/llvm/IR/BUILD.gn
@@ -1,9 +1,8 @@
import("//llvm/utils/TableGen/tablegen.gni")
-tablegen("IntrinsicEnums") {
+tablegen("Attributes") {
visibility = [ ":public_tablegen" ]
- args = [ "-gen-intrinsic-enums" ]
- td_file = "Intrinsics.td"
+ args = [ "-gen-attrs" ]
}
tablegen("IntrinsicImpl") {
@@ -12,14 +11,155 @@
td_file = "Intrinsics.td"
}
-tablegen("Attributes") {
+tablegen("IntrinsicEnums") {
visibility = [ ":public_tablegen" ]
- args = [ "-gen-attrs" ]
+ args = [ "-gen-intrinsic-enums" ]
+ td_file = "Intrinsics.td"
+}
+
+tablegen("IntrinsicsAArch64") {
+ visibility = [ ":public_tablegen" ]
+ output_name = "IntrinsicsAArch64.h"
+ args = [
+ "-gen-intrinsic-enums",
+ "-intrinsic-prefix=aarch64",
+ ]
+ td_file = "Intrinsics.td"
+}
+
+tablegen("IntrinsicsAMDGPU") {
+ visibility = [ ":public_tablegen" ]
+ output_name = "IntrinsicsAMDGPU.h"
+ args = [
+ "-gen-intrinsic-enums",
+ "-intrinsic-prefix=amdgcn",
+ ]
+ td_file = "Intrinsics.td"
+}
+
+tablegen("IntrinsicsARM") {
+ visibility = [ ":public_tablegen" ]
+ output_name = "IntrinsicsARM.h"
+ args = [
+ "-gen-intrinsic-enums",
+ "-intrinsic-prefix=arm",
+ ]
+ td_file = "Intrinsics.td"
+}
+
+tablegen("IntrinsicsBPF") {
+ visibility = [ ":public_tablegen" ]
+ output_name = "IntrinsicsBPF.h"
+ args = [
+ "-gen-intrinsic-enums",
+ "-intrinsic-prefix=bpf",
+ ]
+ td_file = "Intrinsics.td"
+}
+
+tablegen("IntrinsicsHexagon") {
+ visibility = [ ":public_tablegen" ]
+ output_name = "IntrinsicsHexagon.h"
+ args = [
+ "-gen-intrinsic-enums",
+ "-intrinsic-prefix=hexagon",
+ ]
+ td_file = "Intrinsics.td"
+}
+
+tablegen("IntrinsicsMips") {
+ visibility = [ ":public_tablegen" ]
+ output_name = "IntrinsicsMips.h"
+ args = [
+ "-gen-intrinsic-enums",
+ "-intrinsic-prefix=mips",
+ ]
+ td_file = "Intrinsics.td"
+}
+
+tablegen("IntrinsicsNVPTX") {
+ visibility = [ ":public_tablegen" ]
+ output_name = "IntrinsicsNVPTX.h"
+ args = [
+ "-gen-intrinsic-enums",
+ "-intrinsic-prefix=nvvm",
+ ]
+ td_file = "Intrinsics.td"
+}
+
+tablegen("IntrinsicsPowerPC") {
+ visibility = [ ":public_tablegen" ]
+ output_name = "IntrinsicsPowerPC.h"
+ args = [
+ "-gen-intrinsic-enums",
+ "-intrinsic-prefix=ppc",
+ ]
+ td_file = "Intrinsics.td"
+}
+
+tablegen("IntrinsicsR600") {
+ visibility = [ ":public_tablegen" ]
+ output_name = "IntrinsicsR600.h"
+ args = [
+ "-gen-intrinsic-enums",
+ "-intrinsic-prefix=r600",
+ ]
+ td_file = "Intrinsics.td"
+}
+
+tablegen("IntrinsicsRISCV") {
+ visibility = [ ":public_tablegen" ]
+ output_name = "IntrinsicsRISCV.h"
+ args = [
+ "-gen-intrinsic-enums",
+ "-intrinsic-prefix=riscv",
+ ]
+ td_file = "Intrinsics.td"
+}
+
+tablegen("IntrinsicsS390") {
+ visibility = [ ":public_tablegen" ]
+ output_name = "IntrinsicsS390.h"
+ args = [
+ "-gen-intrinsic-enums",
+ "-intrinsic-prefix=s390",
+ ]
+ td_file = "Intrinsics.td"
+}
+
+tablegen("IntrinsicsWebAssembly") {
+ visibility = [ ":public_tablegen" ]
+ output_name = "IntrinsicsWebAssembly.h"
+ args = [
+ "-gen-intrinsic-enums",
+ "-intrinsic-prefix=wasm",
+ ]
+ td_file = "Intrinsics.td"
+}
+
+tablegen("IntrinsicsX86") {
+ visibility = [ ":public_tablegen" ]
+ output_name = "IntrinsicsX86.h"
+ args = [
+ "-gen-intrinsic-enums",
+ "-intrinsic-prefix=x86",
+ ]
+ td_file = "Intrinsics.td"
+}
+
+tablegen("IntrinsicsXCore") {
+ visibility = [ ":public_tablegen" ]
+ output_name = "IntrinsicsXCore.h"
+ args = [
+ "-gen-intrinsic-enums",
+ "-intrinsic-prefix=xcore",
+ ]
+ td_file = "Intrinsics.td"
}
# Groups all tablegen() calls that create .inc files that are included in
-# IR's public headers. //llvm/lib/Target has this as a public_dep, so targets
-# dependign on //llvm/lib/IR don't need to depend on this. This exists
+# IR's public headers. //llvm/lib/IR has this as a public_dep, so targets
+# depending on //llvm/lib/IR don't need to depend on this. This exists
# solely for targets that use IR's public headers but don't link against IR.
group("public_tablegen") {
public_deps = [
@@ -28,5 +168,22 @@
# IR's public headers include IntrinsicEnums.inc.
":IntrinsicEnums",
+
+ # FIXME: These are only included from .cpp files at first glance.
+ # Try removing them from the public_tablegen target.
+ ":IntrinsicsAArch64",
+ ":IntrinsicsAMDGPU",
+ ":IntrinsicsARM",
+ ":IntrinsicsBPF",
+ ":IntrinsicsHexagon",
+ ":IntrinsicsMips",
+ ":IntrinsicsNVPTX",
+ ":IntrinsicsPowerPC",
+ ":IntrinsicsR600",
+ ":IntrinsicsRISCV",
+ ":IntrinsicsS390",
+ ":IntrinsicsWebAssembly",
+ ":IntrinsicsX86",
+ ":IntrinsicsXCore",
]
}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/include/llvm/Support/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/include/llvm/Support/BUILD.gn
index cf26a21..6991ac7 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/llvm/include/llvm/Support/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/include/llvm/Support/BUILD.gn
@@ -1,25 +1,23 @@
-declare_args() {
- # If this set to false, VCSRevision.h is updated after every git commit.
- # That's technically correct, but results in rebuilds after every commit.
- # If it's true (default), VCSRevision.h will usually be somewhat
- # out-of-date, but builds will be faster.
- llvm_allow_tardy_revision = true
+import("//llvm/utils/gn/build/write_vcsrevision.gni")
+
+write_vcsrevision("write_vcsrevision") {
+ header = "$target_gen_dir/VCSRevision.h"
}
-action("write_vcsrevision") {
- script = "//llvm/utils/gn/build/write_vcsrevision.py"
- header = "$target_gen_dir/VCSRevision.h"
-
- args = [ rebase_path(header, root_build_dir) ]
- if (!llvm_allow_tardy_revision) {
- depfile = "$header.d"
- args += [
- "-d",
- rebase_path(depfile, root_build_dir),
- ]
- }
-
+# Corresponds to process_llvm_pass_plugins() in the CMake build.
+# For now, just turn everything off.
+# If we ever add real support for this, the GN way for this is probably
+# to have a declare_args() list with plugin names that people can override
+# in their args.gn and with empty defaults (similar to llvm_targets_to_build).
+action("write_extension_def") {
+ script = "//llvm/utils/gn/secondary/llvm/include/llvm/Support/write_extension_def.py"
outputs = [
- header,
+ "$target_gen_dir/Extension.def",
+ ]
+ # If any extensions should be enabled, they'd be passed as additional
+ # arguments, e.g. `args += [ "Bye", "Polly" ]`.
+ args = [
+ "-o",
+ rebase_path(outputs[0], root_build_dir),
]
}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/include/llvm/Support/write_extension_def.py b/src/llvm-project/llvm/utils/gn/secondary/llvm/include/llvm/Support/write_extension_def.py
new file mode 100755
index 0000000..9cd1dd0
--- /dev/null
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/include/llvm/Support/write_extension_def.py
@@ -0,0 +1,23 @@
+#!/usr/bin/env python
+from __future__ import print_function
+
+import argparse
+import os
+import sys
+
+
+def main():
+ parser = argparse.ArgumentParser()
+ parser.add_argument('exts', nargs='*', help='list of supported extensions')
+ parser.add_argument('-o', '--output', required=True, help='output file')
+ args = parser.parse_args()
+
+ output = ''.join(['HANDLE_EXTENSION(%s)\n' % ext for ext in args.exts])
+ output += '#undef HANDLE_EXTENSION\n'
+
+ if not os.path.exists(args.output) or open(args.output).read() != output:
+ open(args.output, 'w').write(output)
+
+
+if __name__ == '__main__':
+ sys.exit(main())
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Analysis/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Analysis/BUILD.gn
index 3a8382e..cbbe149 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Analysis/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Analysis/BUILD.gn
@@ -36,9 +36,11 @@
"CodeMetrics.cpp",
"ConstantFolding.cpp",
"CostModel.cpp",
+ "DDG.cpp",
"Delinearization.cpp",
"DemandedBits.cpp",
"DependenceAnalysis.cpp",
+ "DependenceGraphBuilder.cpp",
"DivergenceAnalysis.cpp",
"DomPrinter.cpp",
"DomTreeUpdater.cpp",
@@ -64,6 +66,7 @@
"Loads.cpp",
"LoopAccessAnalysis.cpp",
"LoopAnalysisManager.cpp",
+ "LoopCacheAnalysis.cpp",
"LoopInfo.cpp",
"LoopPass.cpp",
"LoopUnrollAnalyzer.cpp",
@@ -104,6 +107,7 @@
"Trace.cpp",
"TypeBasedAliasAnalysis.cpp",
"TypeMetadataUtils.cpp",
+ "VFABIDemangling.cpp",
"ValueLattice.cpp",
"ValueLatticeUtils.cpp",
"ValueTracking.cpp",
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/BinaryFormat/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/BinaryFormat/BUILD.gn
index 72847d1..15721b5 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/BinaryFormat/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/BinaryFormat/BUILD.gn
@@ -13,5 +13,6 @@
"MsgPackReader.cpp",
"MsgPackWriter.cpp",
"Wasm.cpp",
+ "XCOFF.cpp",
]
}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/CodeGen/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/CodeGen/BUILD.gn
index 9a6e19a..805edb1 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/CodeGen/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/CodeGen/BUILD.gn
@@ -26,6 +26,7 @@
"BranchRelaxation.cpp",
"BreakFalseDeps.cpp",
"BuiltinGCs.cpp",
+ "CFGuardLongjmp.cpp",
"CFIInstrInserter.cpp",
"CalcSpillWeights.cpp",
"CallingConvLower.cpp",
@@ -82,8 +83,10 @@
"LowLevelType.cpp",
"LowerEmuTLS.cpp",
"MIRCanonicalizerPass.cpp",
+ "MIRNamerPass.cpp",
"MIRPrinter.cpp",
"MIRPrintingPass.cpp",
+ "MIRVRegNamerUtils.cpp",
"MachineBasicBlock.cpp",
"MachineBlockFrequencyInfo.cpp",
"MachineBlockPlacement.cpp",
@@ -101,6 +104,7 @@
"MachineInstrBundle.cpp",
"MachineLICM.cpp",
"MachineLoopInfo.cpp",
+ "MachineLoopUtils.cpp",
"MachineModuleInfo.cpp",
"MachineModuleInfoImpls.cpp",
"MachineOperand.cpp",
@@ -113,9 +117,12 @@
"MachineSSAUpdater.cpp",
"MachineScheduler.cpp",
"MachineSink.cpp",
+ "MachineSizeOpts.cpp",
"MachineTraceMetrics.cpp",
"MachineVerifier.cpp",
"MacroFusion.cpp",
+ "ModuloSchedule.cpp",
+ "NonRelocatableStringpool.cpp",
"OptimizePHIs.cpp",
"PHIElimination.cpp",
"PHIEliminationUtils.cpp",
@@ -176,6 +183,7 @@
"TargetSchedule.cpp",
"TargetSubtargetInfo.cpp",
"TwoAddressInstructionPass.cpp",
+ "TypePromotion.cpp",
"UnreachableBlockElim.cpp",
"ValueTypes.cpp",
"VirtRegMap.cpp",
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/CodeGen/GlobalISel/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/CodeGen/GlobalISel/BUILD.gn
index 7e6ecad..dcfc1d1 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/CodeGen/GlobalISel/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/CodeGen/GlobalISel/BUILD.gn
@@ -18,6 +18,7 @@
"Combiner.cpp",
"CombinerHelper.cpp",
"GISelChangeObserver.cpp",
+ "GISelKnownBits.cpp",
"GlobalISel.cpp",
"IRTranslator.cpp",
"InstructionSelect.cpp",
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/DWARFLinker/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/DWARFLinker/BUILD.gn
new file mode 100644
index 0000000..57a3a7f
--- /dev/null
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/DWARFLinker/BUILD.gn
@@ -0,0 +1,16 @@
+static_library("DWARFLinker") {
+ output_name = "LLVMDWARFLinker"
+ deps = [
+ "//llvm/lib/CodeGen",
+ "//llvm/lib/CodeGen/AsmPrinter",
+ "//llvm/lib/DebugInfo/DWARF",
+ "//llvm/lib/MC",
+ "//llvm/lib/Object",
+ "//llvm/lib/Support",
+ ]
+ sources = [
+ "DWARFLinker.cpp",
+ "DWARFLinkerCompileUnit.cpp",
+ "DWARFLinkerDeclContext.cpp",
+ ]
+}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/DebugInfo/DWARF/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/DebugInfo/DWARF/BUILD.gn
index c93427c..41bfecb 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/DebugInfo/DWARF/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/DebugInfo/DWARF/BUILD.gn
@@ -30,6 +30,7 @@
"DWARFFormValue.cpp",
"DWARFGdbIndex.cpp",
"DWARFListTable.cpp",
+ "DWARFLocationExpression.cpp",
"DWARFTypeUnit.cpp",
"DWARFUnit.cpp",
"DWARFUnitIndex.cpp",
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/DebugInfo/GSYM/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/DebugInfo/GSYM/BUILD.gn
index 48b70bd..b323906 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/DebugInfo/GSYM/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/DebugInfo/GSYM/BUILD.gn
@@ -1,11 +1,18 @@
static_library("GSYM") {
output_name = "LLVMDebugInfoGSYM"
deps = [
+ "//llvm/lib/MC",
"//llvm/lib/Support",
]
sources = [
+ "FileWriter.cpp",
"FunctionInfo.cpp",
+ "GsymCreator.cpp",
+ "GsymReader.cpp",
+ "Header.cpp",
"InlineInfo.cpp",
+ "LineTable.cpp",
+ "LookupResult.cpp",
"Range.cpp",
]
}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/ExecutionEngine/JITLink/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/ExecutionEngine/JITLink/BUILD.gn
index aa9894c..8743395 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/ExecutionEngine/JITLink/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/ExecutionEngine/JITLink/BUILD.gn
@@ -11,7 +11,8 @@
"JITLinkGeneric.cpp",
"JITLinkMemoryManager.cpp",
"MachO.cpp",
- "MachOAtomGraphBuilder.cpp",
+ "MachOLinkGraphBuilder.cpp",
+ "MachO_arm64.cpp",
"MachO_x86_64.cpp",
]
}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/ExecutionEngine/Orc/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/ExecutionEngine/Orc/BUILD.gn
index d9ea254..093b3e3 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/ExecutionEngine/Orc/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/ExecutionEngine/Orc/BUILD.gn
@@ -2,9 +2,12 @@
output_name = "LLVMOrcJIT"
deps = [
"//llvm/lib/ExecutionEngine",
+ "//llvm/lib/ExecutionEngine/JITLink",
+ "//llvm/lib/ExecutionEngine/OrcError",
"//llvm/lib/ExecutionEngine/RuntimeDyld",
"//llvm/lib/IR",
"//llvm/lib/Object",
+ "//llvm/lib/Passes",
"//llvm/lib/Support",
"//llvm/lib/Transforms/Utils",
]
@@ -12,6 +15,7 @@
"CompileOnDemandLayer.cpp",
"CompileUtils.cpp",
"Core.cpp",
+ "DebugUtils.cpp",
"ExecutionUtils.cpp",
"IRCompileLayer.cpp",
"IRTransformLayer.cpp",
@@ -26,10 +30,10 @@
"ObjectTransformLayer.cpp",
"OrcABISupport.cpp",
"OrcCBindings.cpp",
- "OrcError.cpp",
"OrcMCJITReplacement.cpp",
- "RPCUtils.cpp",
"RTDyldObjectLinkingLayer.cpp",
+ "SpeculateAnalyses.cpp",
+ "Speculation.cpp",
"ThreadSafeModule.cpp",
]
}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/ExecutionEngine/OrcError/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/ExecutionEngine/OrcError/BUILD.gn
new file mode 100644
index 0000000..48ee614
--- /dev/null
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/ExecutionEngine/OrcError/BUILD.gn
@@ -0,0 +1,10 @@
+static_library("OrcError") {
+ output_name = "LLVMOrcError"
+ deps = [
+ "//llvm/lib/Support",
+ ]
+ sources = [
+ "OrcError.cpp",
+ "RPCError.cpp",
+ ]
+}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Frontend/OpenMP/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Frontend/OpenMP/BUILD.gn
new file mode 100644
index 0000000..cab353e
--- /dev/null
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Frontend/OpenMP/BUILD.gn
@@ -0,0 +1,12 @@
+static_library("OpenMP") {
+ output_name = "LLVMFrontendOpenMP"
+ deps = [
+ "//llvm/lib/Transforms/Utils",
+ "//llvm/lib/IR",
+ "//llvm/lib/Support",
+ ]
+ sources = [
+ "OMPConstants.cpp",
+ "OMPIRBuilder.cpp",
+ ]
+}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/IR/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/IR/BUILD.gn
index a93b714..cfd183f 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/IR/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/IR/BUILD.gn
@@ -39,6 +39,7 @@
"DiagnosticInfo.cpp",
"DiagnosticPrinter.cpp",
"Dominators.cpp",
+ "FPEnv.cpp",
"Function.cpp",
"GVMaterializer.cpp",
"Globals.cpp",
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/MC/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/MC/BUILD.gn
index 28717f4..aa71f49 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/MC/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/MC/BUILD.gn
@@ -23,7 +23,6 @@
"MCAsmStreamer.cpp",
"MCAssembler.cpp",
"MCCodeEmitter.cpp",
- "MCCodePadder.cpp",
"MCCodeView.cpp",
"MCContext.cpp",
"MCDwarf.cpp",
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/MCA/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/MCA/BUILD.gn
index d7a632a..6aaa993 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/MCA/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/MCA/BUILD.gn
@@ -7,6 +7,7 @@
]
include_dirs = [ "../include" ]
sources = [
+ "CodeEmitter.cpp",
"Context.cpp",
"HWEventListener.cpp",
"HardwareUnits/HardwareUnit.cpp",
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Object/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Object/BUILD.gn
index 9f4477a..4a36799 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Object/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Object/BUILD.gn
@@ -9,6 +9,7 @@
"//llvm/lib/MC",
"//llvm/lib/MC/MCParser",
"//llvm/lib/Support",
+ "//llvm/lib/TextAPI",
]
sources = [
@@ -34,6 +35,8 @@
"RelocationResolver.cpp",
"SymbolSize.cpp",
"SymbolicFile.cpp",
+ "TapiFile.cpp",
+ "TapiUniversal.cpp",
"WasmObjectFile.cpp",
"WindowsMachineFlag.cpp",
"WindowsResource.cpp",
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/ObjectYAML/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/ObjectYAML/BUILD.gn
index 84575f2..fbb4187 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/ObjectYAML/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/ObjectYAML/BUILD.gn
@@ -2,9 +2,12 @@
output_name = "LLVMObjectYAML"
deps = [
"//llvm/lib/DebugInfo/CodeView",
+ "//llvm/lib/MC",
+ "//llvm/lib/Object",
"//llvm/lib/Support",
]
sources = [
+ "COFFEmitter.cpp",
"COFFYAML.cpp",
"CodeViewYAMLDebugSections.cpp",
"CodeViewYAMLSymbols.cpp",
@@ -13,12 +16,17 @@
"DWARFEmitter.cpp",
"DWARFVisitor.cpp",
"DWARFYAML.cpp",
+ "ELFEmitter.cpp",
"ELFYAML.cpp",
+ "MachOEmitter.cpp",
"MachOYAML.cpp",
+ "MinidumpEmitter.cpp",
"MinidumpYAML.cpp",
"ObjectYAML.cpp",
+ "WasmEmitter.cpp",
"WasmYAML.cpp",
"XCOFFYAML.cpp",
"YAML.cpp",
+ "yaml2obj.cpp",
]
}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Remarks/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Remarks/BUILD.gn
index 19510c1..74d7939 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Remarks/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Remarks/BUILD.gn
@@ -1,13 +1,18 @@
static_library("Remarks") {
output_name = "LLVMRemarks"
deps = [
+ "//llvm/lib/Bitstream/Reader",
"//llvm/lib/Support",
]
sources = [
+ "BitstreamRemarkParser.cpp",
+ "BitstreamRemarkSerializer.cpp",
"Remark.cpp",
"RemarkFormat.cpp",
+ "RemarkLinker.cpp",
"RemarkParser.cpp",
+ "RemarkSerializer.cpp",
"RemarkStringTable.cpp",
"YAMLRemarkParser.cpp",
"YAMLRemarkSerializer.cpp",
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Support/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Support/BUILD.gn
index b34e2a6..b5d8e62 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Support/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Support/BUILD.gn
@@ -22,6 +22,9 @@
# public_dep because public header TargetSelect.h includes these .def files.
"//llvm/include/llvm/Config:write_target_def_files",
+
+ # public_dep because random targets assume its output exists.
+ "//llvm/include/llvm/Support:write_extension_def",
]
include_dirs = [
"Unix",
@@ -29,6 +32,7 @@
]
sources = [
"AArch64TargetParser.cpp",
+ "ABIBreak.cpp",
"AMDGPUMetadata.cpp",
"APFloat.cpp",
"APInt.cpp",
@@ -64,6 +68,7 @@
"Error.cpp",
"ErrorHandling.cpp",
"FileCheck.cpp",
+ "FileCollector.cpp",
"FileOutputBuffer.cpp",
"FileUtilities.cpp",
"FoldingSet.cpp",
@@ -77,7 +82,6 @@
"IntervalMap.cpp",
"ItaniumManglingCanonicalizer.cpp",
"JSON.cpp",
- "JamCRC.cpp",
"KnownBits.cpp",
"LEB128.cpp",
"LineIterator.cpp",
@@ -90,10 +94,10 @@
"MemoryBuffer.cpp",
"NativeFormatting.cpp",
"Optional.cpp",
- "Options.cpp",
"Parallel.cpp",
"PluginLoader.cpp",
"PrettyStackTrace.cpp",
+ "RWMutex.cpp",
"RandomNumberGenerator.cpp",
"Regex.cpp",
"SHA1.cpp",
@@ -144,11 +148,9 @@
"Errno.cpp",
"Host.cpp",
"Memory.cpp",
- "Mutex.cpp",
"Path.cpp",
"Process.cpp",
"Program.cpp",
- "RWMutex.cpp",
"Signals.cpp",
"TargetRegistry.cpp",
"ThreadLocal.cpp",
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/AArch64/AsmParser/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/AArch64/AsmParser/BUILD.gn
index 54a12d2..588ac6f 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/AArch64/AsmParser/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/AArch64/AsmParser/BUILD.gn
@@ -1,7 +1,10 @@
import("//llvm/utils/TableGen/tablegen.gni")
tablegen("AArch64GenAsmMatcher") {
- visibility = [ ":AsmParser" ]
+ visibility = [
+ ":AsmParser",
+ "//llvm/lib/Target/AArch64:LLVMAArch64CodeGen",
+ ]
args = [ "-gen-asm-matcher" ]
td_file = "../AArch64.td"
}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/AArch64/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/AArch64/BUILD.gn
index 02e02ee..57759a2 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/AArch64/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/AArch64/BUILD.gn
@@ -1,11 +1,5 @@
import("//llvm/utils/TableGen/tablegen.gni")
-tablegen("AArch64GenAsmMatcher") {
- visibility = [ ":LLVMAArch64CodeGen" ]
- args = [ "-gen-asm-matcher" ]
- td_file = "AArch64.td"
-}
-
tablegen("AArch64GenCallingConv") {
visibility = [ ":LLVMAArch64CodeGen" ]
args = [ "-gen-callingconv" ]
@@ -30,6 +24,15 @@
td_file = "AArch64.td"
}
+tablegen("AArch64GenGICombiner") {
+ visibility = [ ":LLVMAArch64CodeGen" ]
+ args = [
+ "-gen-global-isel-combiner",
+ "-combiners=AArch64PreLegalizerCombinerHelper",
+ ]
+ td_file = "AArch64.td"
+}
+
tablegen("AArch64GenMCPseudoLowering") {
visibility = [ ":LLVMAArch64CodeGen" ]
args = [ "-gen-pseudo-lowering" ]
@@ -44,13 +47,16 @@
static_library("LLVMAArch64CodeGen") {
deps = [
- ":AArch64GenAsmMatcher",
":AArch64GenCallingConv",
":AArch64GenDAGISel",
":AArch64GenFastISel",
+ ":AArch64GenGICombiner",
":AArch64GenGlobalISel",
":AArch64GenMCPseudoLowering",
":AArch64GenRegisterBank",
+
+ # See https://reviews.llvm.org/D69130
+ "AsmParser:AArch64GenAsmMatcher",
"MCTargetDesc",
"TargetInfo",
"Utils",
@@ -63,7 +69,9 @@
"//llvm/lib/MC",
"//llvm/lib/Support",
"//llvm/lib/Target",
+ "//llvm/lib/Transforms/CFGuard",
"//llvm/lib/Transforms/Scalar",
+ "//llvm/lib/Transforms/Utils",
]
include_dirs = [ "." ]
sources = [
@@ -104,6 +112,7 @@
"AArch64SelectionDAGInfo.cpp",
"AArch64SpeculationHardening.cpp",
"AArch64StackTagging.cpp",
+ "AArch64StackTaggingPreRA.cpp",
"AArch64StorePairSuppress.cpp",
"AArch64Subtarget.cpp",
"AArch64TargetMachine.cpp",
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/AArch64/Utils/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/AArch64/Utils/BUILD.gn
index aef50a0..c680c76 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/AArch64/Utils/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/AArch64/Utils/BUILD.gn
@@ -1,5 +1,6 @@
import("//llvm/utils/TableGen/tablegen.gni")
+# Generates AArch64GenSystemOperands.inc
tablegen("AArch64GenSystemOperands") {
visibility = [ ":Utils" ]
args = [ "-gen-searchable-tables" ]
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/AMDGPU/AsmParser/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/AMDGPU/AsmParser/BUILD.gn
new file mode 100644
index 0000000..39fedb1
--- /dev/null
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/AMDGPU/AsmParser/BUILD.gn
@@ -0,0 +1,24 @@
+import("//llvm/utils/TableGen/tablegen.gni")
+
+tablegen("AMDGPUGenAsmMatcher") {
+ visibility = [ ":AsmParser" ]
+ args = [ "-gen-asm-matcher" ]
+ td_file = "../AMDGPU.td"
+}
+
+static_library("AsmParser") {
+ output_name = "LLVMAMDGPUAsmParser"
+ deps = [
+ ":AMDGPUGenAsmMatcher",
+ "//llvm/lib/MC",
+ "//llvm/lib/MC/MCParser",
+ "//llvm/lib/Support",
+ "//llvm/lib/Target/AMDGPU/MCTargetDesc",
+ "//llvm/lib/Target/AMDGPU/TargetInfo",
+ "//llvm/lib/Target/AMDGPU/Utils",
+ ]
+ include_dirs = [ ".." ]
+ sources = [
+ "AMDGPUAsmParser.cpp",
+ ]
+}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/AMDGPU/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/AMDGPU/BUILD.gn
new file mode 100644
index 0000000..621458d
--- /dev/null
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/AMDGPU/BUILD.gn
@@ -0,0 +1,200 @@
+import("//llvm/utils/TableGen/tablegen.gni")
+
+tablegen("AMDGPUGenAsmMatcher") {
+ visibility = [ ":LLVMAMDGPUCodeGen" ]
+ args = [ "-gen-asm-matcher" ]
+ td_file = "AMDGPU.td"
+}
+
+tablegen("AMDGPUGenCallingConv") {
+ visibility = [ ":LLVMAMDGPUCodeGen" ]
+ args = [ "-gen-callingconv" ]
+ td_file = "AMDGPU.td"
+}
+
+tablegen("AMDGPUGenDAGISel") {
+ visibility = [ ":LLVMAMDGPUCodeGen" ]
+ args = [ "-gen-dag-isel" ]
+ td_file = "AMDGPU.td"
+}
+
+tablegen("AMDGPUGenGlobalISel") {
+ visibility = [ ":LLVMAMDGPUCodeGen" ]
+ args = [ "-gen-global-isel" ]
+ td_file = "AMDGPUGISel.td"
+}
+
+tablegen("AMDGPUGenMCPseudoLowering") {
+ visibility = [ ":LLVMAMDGPUCodeGen" ]
+ args = [ "-gen-pseudo-lowering" ]
+ td_file = "AMDGPU.td"
+}
+
+tablegen("AMDGPUGenRegisterBank") {
+ visibility = [ ":LLVMAMDGPUCodeGen" ]
+ args = [ "-gen-register-bank" ]
+ td_file = "AMDGPU.td"
+}
+
+tablegen("R600GenCallingConv") {
+ visibility = [ ":LLVMAMDGPUCodeGen" ]
+ args = [ "-gen-callingconv" ]
+ td_file = "R600.td"
+}
+
+tablegen("R600GenDAGISel") {
+ visibility = [ ":LLVMAMDGPUCodeGen" ]
+ args = [ "-gen-dag-isel" ]
+ td_file = "R600.td"
+}
+
+tablegen("R600GenDFAPacketizer") {
+ visibility = [ ":LLVMAMDGPUCodeGen" ]
+ args = [ "-gen-dfa-packetizer" ]
+ td_file = "R600.td"
+}
+
+static_library("LLVMAMDGPUCodeGen") {
+ deps = [
+ ":AMDGPUGenAsmMatcher",
+ ":AMDGPUGenCallingConv",
+ ":AMDGPUGenDAGISel",
+ ":AMDGPUGenGlobalISel",
+ ":AMDGPUGenMCPseudoLowering",
+ ":AMDGPUGenRegisterBank",
+ ":R600GenCallingConv",
+ ":R600GenDAGISel",
+ ":R600GenDFAPacketizer",
+ "MCTargetDesc",
+ "TargetInfo",
+ "Utils",
+ "//llvm/lib/Analysis",
+ "//llvm/lib/CodeGen",
+ "//llvm/lib/CodeGen/AsmPrinter",
+ "//llvm/lib/CodeGen/GlobalISel",
+ "//llvm/lib/CodeGen/MIRParser",
+ "//llvm/lib/CodeGen/SelectionDAG",
+ "//llvm/lib/IR",
+ "//llvm/lib/MC",
+ "//llvm/lib/Support",
+ "//llvm/lib/Target",
+ "//llvm/lib/Transforms/IPO",
+ "//llvm/lib/Transforms/Scalar",
+ "//llvm/lib/Transforms/Utils",
+ ]
+ include_dirs = [ "." ]
+ sources = [
+ "AMDGPUAliasAnalysis.cpp",
+ "AMDGPUAlwaysInlinePass.cpp",
+ "AMDGPUAnnotateKernelFeatures.cpp",
+ "AMDGPUAnnotateUniformValues.cpp",
+ "AMDGPUArgumentUsageInfo.cpp",
+ "AMDGPUAsmPrinter.cpp",
+ "AMDGPUAtomicOptimizer.cpp",
+ "AMDGPUCallLowering.cpp",
+ "AMDGPUCodeGenPrepare.cpp",
+ "AMDGPUFixFunctionBitcasts.cpp",
+ "AMDGPUFrameLowering.cpp",
+ "AMDGPUGlobalISelUtils.cpp",
+ "AMDGPUHSAMetadataStreamer.cpp",
+ "AMDGPUISelDAGToDAG.cpp",
+ "AMDGPUISelLowering.cpp",
+ "AMDGPUInline.cpp",
+ "AMDGPUInstrInfo.cpp",
+ "AMDGPUInstructionSelector.cpp",
+ "AMDGPULegalizerInfo.cpp",
+ "AMDGPULibCalls.cpp",
+ "AMDGPULibFunc.cpp",
+ "AMDGPULowerIntrinsics.cpp",
+ "AMDGPULowerKernelArguments.cpp",
+ "AMDGPULowerKernelAttributes.cpp",
+ "AMDGPUMCInstLower.cpp",
+ "AMDGPUMachineCFGStructurizer.cpp",
+ "AMDGPUMachineFunction.cpp",
+ "AMDGPUMachineModuleInfo.cpp",
+ "AMDGPUMacroFusion.cpp",
+ "AMDGPUOpenCLEnqueuedBlockLowering.cpp",
+ "AMDGPUPerfHintAnalysis.cpp",
+ "AMDGPUPrintfRuntimeBinding.cpp",
+ "AMDGPUPromoteAlloca.cpp",
+ "AMDGPUPropagateAttributes.cpp",
+ "AMDGPURegisterBankInfo.cpp",
+ "AMDGPURegisterInfo.cpp",
+ "AMDGPURewriteOutArguments.cpp",
+ "AMDGPUSubtarget.cpp",
+ "AMDGPUTargetMachine.cpp",
+ "AMDGPUTargetObjectFile.cpp",
+ "AMDGPUTargetTransformInfo.cpp",
+ "AMDGPUUnifyDivergentExitNodes.cpp",
+ "AMDGPUUnifyMetadata.cpp",
+ "AMDILCFGStructurizer.cpp",
+ "GCNDPPCombine.cpp",
+ "GCNHazardRecognizer.cpp",
+ "GCNILPSched.cpp",
+ "GCNIterativeScheduler.cpp",
+ "GCNMinRegStrategy.cpp",
+ "GCNNSAReassign.cpp",
+ "GCNRegBankReassign.cpp",
+ "GCNRegPressure.cpp",
+ "GCNSchedStrategy.cpp",
+ "R600AsmPrinter.cpp",
+ "R600ClauseMergePass.cpp",
+ "R600ControlFlowFinalizer.cpp",
+ "R600EmitClauseMarkers.cpp",
+ "R600ExpandSpecialInstrs.cpp",
+ "R600FrameLowering.cpp",
+ "R600ISelLowering.cpp",
+ "R600InstrInfo.cpp",
+ "R600MachineFunctionInfo.cpp",
+ "R600MachineScheduler.cpp",
+ "R600OpenCLImageTypeLoweringPass.cpp",
+ "R600OptimizeVectorRegisters.cpp",
+ "R600Packetizer.cpp",
+ "R600RegisterInfo.cpp",
+ "SIAddIMGInit.cpp",
+ "SIAnnotateControlFlow.cpp",
+ "SIFixSGPRCopies.cpp",
+ "SIFixVGPRCopies.cpp",
+ "SIFixupVectorISel.cpp",
+ "SIFoldOperands.cpp",
+ "SIFormMemoryClauses.cpp",
+ "SIFrameLowering.cpp",
+ "SIISelLowering.cpp",
+ "SIInsertSkips.cpp",
+ "SIInsertWaitcnts.cpp",
+ "SIInstrInfo.cpp",
+ "SILoadStoreOptimizer.cpp",
+ "SILowerControlFlow.cpp",
+ "SILowerI1Copies.cpp",
+ "SILowerSGPRSpills.cpp",
+ "SIMachineFunctionInfo.cpp",
+ "SIMachineScheduler.cpp",
+ "SIMemoryLegalizer.cpp",
+ "SIModeRegister.cpp",
+ "SIOptimizeExecMasking.cpp",
+ "SIOptimizeExecMaskingPreRA.cpp",
+ "SIPeepholeSDWA.cpp",
+ "SIPreAllocateWWMRegs.cpp",
+ "SIRegisterInfo.cpp",
+ "SIRemoveShortExecBranches.cpp",
+ "SIShrinkInstructions.cpp",
+ "SIWholeQuadMode.cpp",
+ ]
+}
+
+# This is a bit different from most build files: Due to this group
+# having the directory's name, "//llvm/lib/Target/AMDGPU" will refer to this
+# target, which pulls in the code in this directory *and all subdirectories*.
+# For most other directories, "//llvm/lib/Foo" only pulls in the code directly
+# in "llvm/lib/Foo". The forwarding targets in //llvm/lib/Target expect this
+# different behavior.
+group("AMDGPU") {
+ deps = [
+ ":LLVMAMDGPUCodeGen",
+ "AsmParser",
+ "Disassembler",
+ "MCTargetDesc",
+ "TargetInfo",
+ "Utils",
+ ]
+}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/AMDGPU/Disassembler/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/AMDGPU/Disassembler/BUILD.gn
new file mode 100644
index 0000000..8a536b1
--- /dev/null
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/AMDGPU/Disassembler/BUILD.gn
@@ -0,0 +1,24 @@
+import("//llvm/utils/TableGen/tablegen.gni")
+
+tablegen("AMDGPUGenDisassemblerTables") {
+ visibility = [ ":Disassembler" ]
+ args = [ "-gen-disassembler" ]
+ td_file = "../AMDGPU.td"
+}
+
+static_library("Disassembler") {
+ output_name = "LLVMAMDGPUDisassembler"
+ deps = [
+ ":AMDGPUGenDisassemblerTables",
+ "//llvm/lib/MC",
+ "//llvm/lib/MC/MCDisassembler",
+ "//llvm/lib/Support",
+ "//llvm/lib/Target/AMDGPU/MCTargetDesc",
+ "//llvm/lib/Target/AMDGPU/TargetInfo",
+ "//llvm/lib/Target/AMDGPU/Utils",
+ ]
+ include_dirs = [ ".." ]
+ sources = [
+ "AMDGPUDisassembler.cpp",
+ ]
+}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/AMDGPU/MCTargetDesc/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/AMDGPU/MCTargetDesc/BUILD.gn
new file mode 100644
index 0000000..0b17e16
--- /dev/null
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/AMDGPU/MCTargetDesc/BUILD.gn
@@ -0,0 +1,112 @@
+import("//llvm/utils/TableGen/tablegen.gni")
+
+tablegen("AMDGPUGenAsmWriter") {
+ visibility = [ ":MCTargetDesc" ]
+ args = [ "-gen-asm-writer" ]
+ td_file = "../AMDGPU.td"
+}
+
+tablegen("AMDGPUGenInstrInfo") {
+ visibility = [ ":tablegen" ]
+ args = [ "-gen-instr-info" ]
+ td_file = "../AMDGPU.td"
+}
+
+tablegen("AMDGPUGenMCCodeEmitter") {
+ visibility = [ ":MCTargetDesc" ]
+ args = [ "-gen-emitter" ]
+ td_file = "../AMDGPU.td"
+}
+
+tablegen("AMDGPUGenRegisterInfo") {
+ visibility = [ ":tablegen" ]
+ args = [ "-gen-register-info" ]
+ td_file = "../AMDGPU.td"
+}
+
+tablegen("AMDGPUGenSubtargetInfo") {
+ visibility = [ ":tablegen" ]
+ args = [ "-gen-subtarget" ]
+ td_file = "../AMDGPU.td"
+}
+
+tablegen("R600GenAsmWriter") {
+ visibility = [ ":MCTargetDesc" ]
+ args = [ "-gen-asm-writer" ]
+ td_file = "../R600.td"
+}
+
+tablegen("R600GenInstrInfo") {
+ visibility = [ ":tablegen" ]
+ args = [ "-gen-instr-info" ]
+ td_file = "../R600.td"
+}
+
+tablegen("R600GenMCCodeEmitter") {
+ visibility = [ ":MCTargetDesc" ]
+ args = [ "-gen-emitter" ]
+ td_file = "../R600.td"
+}
+
+tablegen("R600GenRegisterInfo") {
+ visibility = [ ":tablegen" ]
+ args = [ "-gen-register-info" ]
+ td_file = "../R600.td"
+}
+
+tablegen("R600GenSubtargetInfo") {
+ visibility = [ ":tablegen" ]
+ args = [ "-gen-subtarget" ]
+ td_file = "../R600.td"
+}
+
+# This should contain tablegen targets generating .inc files included
+# by other targets. .inc files only used by .cpp files in this directory
+# should be in deps on the static_library instead.
+group("tablegen") {
+ visibility = [
+ ":MCTargetDesc",
+ "../Utils",
+ ]
+ public_deps = [
+ ":AMDGPUGenInstrInfo",
+ ":AMDGPUGenRegisterInfo",
+ ":AMDGPUGenSubtargetInfo",
+ ":R600GenInstrInfo",
+ ":R600GenRegisterInfo",
+ ":R600GenSubtargetInfo",
+ ]
+}
+
+static_library("MCTargetDesc") {
+ output_name = "LLVMAMDGPUDesc"
+ public_deps = [
+ ":tablegen",
+ ]
+ deps = [
+ ":AMDGPUGenAsmWriter",
+ ":AMDGPUGenMCCodeEmitter",
+ ":R600GenAsmWriter",
+ ":R600GenMCCodeEmitter",
+ "//llvm/lib/BinaryFormat",
+ "//llvm/lib/IR",
+ "//llvm/lib/MC",
+ "//llvm/lib/Support",
+ "//llvm/lib/Target/AMDGPU/TargetInfo",
+ "//llvm/lib/Target/AMDGPU/Utils",
+ ]
+ include_dirs = [ ".." ]
+ sources = [
+ "AMDGPUAsmBackend.cpp",
+ "AMDGPUELFObjectWriter.cpp",
+ "AMDGPUELFStreamer.cpp",
+ "AMDGPUInstPrinter.cpp",
+ "AMDGPUMCAsmInfo.cpp",
+ "AMDGPUMCCodeEmitter.cpp",
+ "AMDGPUMCTargetDesc.cpp",
+ "AMDGPUTargetStreamer.cpp",
+ "R600MCCodeEmitter.cpp",
+ "R600MCTargetDesc.cpp",
+ "SIMCCodeEmitter.cpp",
+ ]
+}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/AMDGPU/TargetInfo/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/AMDGPU/TargetInfo/BUILD.gn
new file mode 100644
index 0000000..57d751b
--- /dev/null
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/AMDGPU/TargetInfo/BUILD.gn
@@ -0,0 +1,10 @@
+static_library("TargetInfo") {
+ output_name = "LLVMAMDGPUInfo"
+ deps = [
+ "//llvm/lib/Support",
+ ]
+ include_dirs = [ ".." ]
+ sources = [
+ "AMDGPUTargetInfo.cpp",
+ ]
+}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/AMDGPU/Utils/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/AMDGPU/Utils/BUILD.gn
new file mode 100644
index 0000000..7f9a7ee
--- /dev/null
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/AMDGPU/Utils/BUILD.gn
@@ -0,0 +1,33 @@
+import("//llvm/utils/TableGen/tablegen.gni")
+
+tablegen("AMDGPUGenSearchableTables") {
+ visibility = [ ":Utils" ]
+ args = [ "-gen-searchable-tables" ]
+ td_file = "../AMDGPU.td"
+}
+
+static_library("Utils") {
+ output_name = "LLVMAMDGPUUtils"
+ public_deps = [
+ ":AMDGPUGenSearchableTables",
+ ]
+ deps = [
+ "//llvm/lib/BinaryFormat",
+ "//llvm/lib/IR",
+ "//llvm/lib/MC",
+ "//llvm/lib/Support",
+
+ # MCTargetDesc depends on Utils, so we can't depend on the full
+ # MCTargetDesc target here: it would form a cycle.
+ "//llvm/lib/Target/AMDGPU/MCTargetDesc:tablegen",
+ ]
+
+ # AMDGPUBaseInfo.h includes a header from MCTargetDesc :-/
+ include_dirs = [ ".." ]
+ sources = [
+ "AMDGPUAsmUtils.cpp",
+ "AMDGPUBaseInfo.cpp",
+ "AMDGPUPALMetadata.cpp",
+ "AMDKernelCodeTUtils.cpp",
+ ]
+}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/ARM/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/ARM/BUILD.gn
index a7d3bda..6fb1767 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/ARM/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/ARM/BUILD.gn
@@ -57,6 +57,8 @@
"//llvm/lib/MC",
"//llvm/lib/Support",
"//llvm/lib/Target",
+ "//llvm/lib/Transforms/CFGuard",
+ "//llvm/lib/Transforms/Utils",
]
include_dirs = [ "." ]
sources = [
@@ -67,7 +69,6 @@
"ARMBasicBlockInfo.cpp",
"ARMCallLowering.cpp",
"ARMCallingConv.cpp",
- "ARMCodeGenPrepare.cpp",
"ARMConstantIslandPass.cpp",
"ARMConstantPoolValue.cpp",
"ARMExpandPseudoInsts.cpp",
@@ -94,6 +95,9 @@
"ARMTargetObjectFile.cpp",
"ARMTargetTransformInfo.cpp",
"MLxExpansionPass.cpp",
+ "MVEGatherScatterLowering.cpp",
+ "MVETailPredication.cpp",
+ "MVEVPTBlockPass.cpp",
"Thumb1FrameLowering.cpp",
"Thumb1InstrInfo.cpp",
"Thumb2ITBlockPass.cpp",
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/ARM/Utils/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/ARM/Utils/BUILD.gn
index 5303a32..fc541fa 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/ARM/Utils/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/ARM/Utils/BUILD.gn
@@ -1,5 +1,6 @@
import("//llvm/utils/TableGen/tablegen.gni")
+# Generates ARMGenSystemRegister.inc
tablegen("ARMGenSystemRegister") {
visibility = [ ":Utils" ]
args = [ "-gen-searchable-tables" ]
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/AVR/AsmParser/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/AVR/AsmParser/BUILD.gn
new file mode 100644
index 0000000..6a99c37
--- /dev/null
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/AVR/AsmParser/BUILD.gn
@@ -0,0 +1,23 @@
+import("//llvm/utils/TableGen/tablegen.gni")
+
+tablegen("AVRGenAsmMatcher") {
+ visibility = [ ":AsmParser" ]
+ args = [ "-gen-asm-matcher" ]
+ td_file = "../AVR.td"
+}
+
+static_library("AsmParser") {
+ output_name = "LLVMAVRAsmParser"
+ deps = [
+ ":AVRGenAsmMatcher",
+ "//llvm/lib/MC",
+ "//llvm/lib/MC/MCParser",
+ "//llvm/lib/Support",
+ "//llvm/lib/Target/AVR/MCTargetDesc",
+ "//llvm/lib/Target/AVR/TargetInfo",
+ ]
+ include_dirs = [ ".." ]
+ sources = [
+ "AVRAsmParser.cpp",
+ ]
+}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/AVR/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/AVR/BUILD.gn
new file mode 100644
index 0000000..40ab437
--- /dev/null
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/AVR/BUILD.gn
@@ -0,0 +1,61 @@
+import("//llvm/utils/TableGen/tablegen.gni")
+
+tablegen("AVRGenCallingConv") {
+ visibility = [ ":LLVMAVRCodeGen" ]
+ args = [ "-gen-callingconv" ]
+ td_file = "AVR.td"
+}
+
+tablegen("AVRGenDAGISel") {
+ visibility = [ ":LLVMAVRCodeGen" ]
+ args = [ "-gen-dag-isel" ]
+ td_file = "AVR.td"
+}
+
+static_library("LLVMAVRCodeGen") {
+ deps = [
+ ":AVRGenCallingConv",
+ ":AVRGenDAGISel",
+ "MCTargetDesc",
+ "TargetInfo",
+ "//llvm/include/llvm/Config:llvm-config",
+ "//llvm/lib/CodeGen",
+ "//llvm/lib/CodeGen/AsmPrinter",
+ "//llvm/lib/CodeGen/SelectionDAG",
+ "//llvm/lib/IR",
+ "//llvm/lib/MC",
+ "//llvm/lib/Support",
+ "//llvm/lib/Target",
+ ]
+ include_dirs = [ "." ]
+ sources = [
+ "AVRAsmPrinter.cpp",
+ "AVRExpandPseudoInsts.cpp",
+ "AVRFrameLowering.cpp",
+ "AVRISelDAGToDAG.cpp",
+ "AVRISelLowering.cpp",
+ "AVRInstrInfo.cpp",
+ "AVRMCInstLower.cpp",
+ "AVRRegisterInfo.cpp",
+ "AVRRelaxMemOperations.cpp",
+ "AVRSubtarget.cpp",
+ "AVRTargetMachine.cpp",
+ "AVRTargetObjectFile.cpp",
+ ]
+}
+
+# This is a bit different from most build files: Due to this group
+# having the directory's name, "//llvm/lib/Target/AVR" will refer to this
+# target, which pulls in the code in this directory *and all subdirectories*.
+# For most other directories, "//llvm/lib/Foo" only pulls in the code directly
+# in "llvm/lib/Foo". The forwarding targets in //llvm/lib/Target expect this
+# different behavior.
+group("AVR") {
+ deps = [
+ ":LLVMAVRCodeGen",
+ "AsmParser",
+ "Disassembler",
+ "MCTargetDesc",
+ "TargetInfo",
+ ]
+}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/AVR/Disassembler/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/AVR/Disassembler/BUILD.gn
new file mode 100644
index 0000000..ce678f9
--- /dev/null
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/AVR/Disassembler/BUILD.gn
@@ -0,0 +1,23 @@
+import("//llvm/utils/TableGen/tablegen.gni")
+
+tablegen("AVRGenDisassemblerTables") {
+ visibility = [ ":Disassembler" ]
+ args = [ "-gen-disassembler" ]
+ td_file = "../AVR.td"
+}
+
+static_library("Disassembler") {
+ output_name = "LLVMAVRDisassembler"
+ deps = [
+ ":AVRGenDisassemblerTables",
+ "//llvm/lib/MC/MCDisassembler",
+ "//llvm/lib/Support",
+ "//llvm/lib/Target/AVR:LLVMAVRCodeGen",
+ "//llvm/lib/Target/AVR/MCTargetDesc",
+ "//llvm/lib/Target/AVR/TargetInfo",
+ ]
+ include_dirs = [ ".." ]
+ sources = [
+ "AVRDisassembler.cpp",
+ ]
+}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/AVR/MCTargetDesc/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/AVR/MCTargetDesc/BUILD.gn
new file mode 100644
index 0000000..d2d5399
--- /dev/null
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/AVR/MCTargetDesc/BUILD.gn
@@ -0,0 +1,64 @@
+import("//llvm/utils/TableGen/tablegen.gni")
+
+tablegen("AVRGenAsmWriter") {
+ visibility = [ ":MCTargetDesc" ]
+ args = [ "-gen-asm-writer" ]
+ td_file = "../AVR.td"
+}
+
+tablegen("AVRGenInstrInfo") {
+ visibility = [ ":MCTargetDesc" ]
+ args = [ "-gen-instr-info" ]
+ td_file = "../AVR.td"
+}
+
+tablegen("AVRGenMCCodeEmitter") {
+ visibility = [ ":MCTargetDesc" ]
+ args = [ "-gen-emitter" ]
+ td_file = "../AVR.td"
+}
+
+tablegen("AVRGenRegisterInfo") {
+ visibility = [ ":MCTargetDesc" ]
+ args = [ "-gen-register-info" ]
+ td_file = "../AVR.td"
+}
+
+tablegen("AVRGenSubtargetInfo") {
+ visibility = [ ":MCTargetDesc" ]
+ args = [ "-gen-subtarget" ]
+ td_file = "../AVR.td"
+}
+
+static_library("MCTargetDesc") {
+ output_name = "LLVMAVRDesc"
+
+ # This should contain tablegen targets generating .inc files included
+ # by other targets. .inc files only used by .cpp files in this directory
+ # should be in deps instead.
+ public_deps = [
+ ":AVRGenInstrInfo",
+ ":AVRGenRegisterInfo",
+ ":AVRGenSubtargetInfo",
+ ]
+ deps = [
+ ":AVRGenAsmWriter",
+ ":AVRGenMCCodeEmitter",
+ "//llvm/lib/MC",
+ "//llvm/lib/Support",
+ "//llvm/lib/Target/AVR/TargetInfo",
+ ]
+ include_dirs = [ ".." ]
+ sources = [
+ "AVRAsmBackend.cpp",
+ "AVRELFObjectWriter.cpp",
+ "AVRELFStreamer.cpp",
+ "AVRInstPrinter.cpp",
+ "AVRMCAsmInfo.cpp",
+ "AVRMCCodeEmitter.cpp",
+ "AVRMCELFStreamer.cpp",
+ "AVRMCExpr.cpp",
+ "AVRMCTargetDesc.cpp",
+ "AVRTargetStreamer.cpp",
+ ]
+}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/AVR/TargetInfo/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/AVR/TargetInfo/BUILD.gn
new file mode 100644
index 0000000..e069cac
--- /dev/null
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/AVR/TargetInfo/BUILD.gn
@@ -0,0 +1,10 @@
+static_library("TargetInfo") {
+ output_name = "LLVMAVRInfo"
+ deps = [
+ "//llvm/lib/Support",
+ ]
+ include_dirs = [ ".." ]
+ sources = [
+ "AVRTargetInfo.cpp",
+ ]
+}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/PowerPC/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/PowerPC/BUILD.gn
index 2065d0e..b27a460 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/PowerPC/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/PowerPC/BUILD.gn
@@ -53,7 +53,8 @@
"PPCISelDAGToDAG.cpp",
"PPCISelLowering.cpp",
"PPCInstrInfo.cpp",
- "PPCLoopPreIncPrep.cpp",
+ "PPCLoopInstrFormPrep.cpp",
+ "PPCLowerMASSVEntries.cpp",
"PPCMCInstLower.cpp",
"PPCMIPeephole.cpp",
"PPCMachineFunctionInfo.cpp",
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/RISCV/AsmParser/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/RISCV/AsmParser/BUILD.gn
index ef28b23..fd664ac 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/RISCV/AsmParser/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/RISCV/AsmParser/BUILD.gn
@@ -1,7 +1,10 @@
import("//llvm/utils/TableGen/tablegen.gni")
tablegen("RISCVGenAsmMatcher") {
- visibility = [ ":AsmParser" ]
+ visibility = [
+ ":AsmParser",
+ "//llvm/lib/Target/RISCV:LLVMRISCVCodeGen",
+ ]
args = [ "-gen-asm-matcher" ]
td_file = "../RISCV.td"
}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/RISCV/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/RISCV/BUILD.gn
index 7a0610e..963d5bb 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/RISCV/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/RISCV/BUILD.gn
@@ -20,17 +20,34 @@
td_file = "RISCV.td"
}
+tablegen("RISCVGenGlobalISel") {
+ visibility = [ ":LLVMRISCVCodeGen" ]
+ args = [ "-gen-global-isel" ]
+ td_file = "RISCV.td"
+}
+
tablegen("RISCVGenMCPseudoLowering") {
visibility = [ ":LLVMRISCVCodeGen" ]
args = [ "-gen-pseudo-lowering" ]
td_file = "RISCV.td"
}
+tablegen("RISCVGenRegisterBank") {
+ visibility = [ ":LLVMRISCVCodeGen" ]
+ args = [ "-gen-register-bank" ]
+ td_file = "RISCV.td"
+}
+
static_library("LLVMRISCVCodeGen") {
deps = [
":RISCVGenCompressInstEmitter",
":RISCVGenDAGISel",
+ ":RISCVGenGlobalISel",
":RISCVGenMCPseudoLowering",
+ ":RISCVGenRegisterBank",
+
+ # See https://reviews.llvm.org/D69130
+ "AsmParser:RISCVGenAsmMatcher",
"MCTargetDesc",
"TargetInfo",
"Utils",
@@ -46,13 +63,17 @@
include_dirs = [ "." ]
sources = [
"RISCVAsmPrinter.cpp",
+ "RISCVCallLowering.cpp",
"RISCVExpandPseudoInsts.cpp",
"RISCVFrameLowering.cpp",
"RISCVISelDAGToDAG.cpp",
"RISCVISelLowering.cpp",
"RISCVInstrInfo.cpp",
+ "RISCVInstructionSelector.cpp",
+ "RISCVLegalizerInfo.cpp",
"RISCVMCInstLower.cpp",
"RISCVMergeBaseOffset.cpp",
+ "RISCVRegisterBankInfo.cpp",
"RISCVRegisterInfo.cpp",
"RISCVSubtarget.cpp",
"RISCVTargetMachine.cpp",
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/RISCV/Utils/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/RISCV/Utils/BUILD.gn
index 66924be..6ae0d78 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/RISCV/Utils/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/RISCV/Utils/BUILD.gn
@@ -1,5 +1,6 @@
import("//llvm/utils/TableGen/tablegen.gni")
+# Generates RISCVGenSystemOperands.inc
tablegen("RISCVGenSystemOperands") {
visibility = [ ":Utils" ]
args = [ "-gen-searchable-tables" ]
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/SystemZ/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/SystemZ/BUILD.gn
index 034645f..51f65f9 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/SystemZ/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/SystemZ/BUILD.gn
@@ -35,7 +35,6 @@
"SystemZCallingConv.cpp",
"SystemZConstantPoolValue.cpp",
"SystemZElimCompare.cpp",
- "SystemZExpandPseudo.cpp",
"SystemZFrameLowering.cpp",
"SystemZHazardRecognizer.cpp",
"SystemZISelDAGToDAG.cpp",
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/X86/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/X86/BUILD.gn
index 3748189..ac29ad3 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/X86/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/X86/BUILD.gn
@@ -70,6 +70,7 @@
"//llvm/lib/MC",
"//llvm/lib/Support",
"//llvm/lib/Target",
+ "//llvm/lib/Transforms/CFGuard",
]
if (x86_gen_fold_tables) {
deps += [ ":X86GenFoldTables" ]
@@ -77,6 +78,7 @@
sources = [
"X86AsmPrinter.cpp",
"X86AvoidStoreForwardingBlocks.cpp",
+ "X86AvoidTrailingCall.cpp",
"X86CallFrameOptimization.cpp",
"X86CallLowering.cpp",
"X86CallingConv.cpp",
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/X86/Disassembler/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/X86/Disassembler/BUILD.gn
index d3e9e30..89b2be7 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/X86/Disassembler/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/X86/Disassembler/BUILD.gn
@@ -18,6 +18,5 @@
include_dirs = [ ".." ]
sources = [
"X86Disassembler.cpp",
- "X86DisassemblerDecoder.cpp",
]
}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/targets.gni b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/targets.gni
index 61001fc..8306b5d 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/targets.gni
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/targets.gni
@@ -5,6 +5,25 @@
llvm_targets_to_build = "host"
}
+# FIXME: Port the remaining targets.
+llvm_all_targets = [
+ "AArch64",
+ "AMDGPU",
+ "ARM",
+ "AVR",
+ "BPF",
+ "Hexagon",
+ "Lanai",
+ "Mips",
+ "NVPTX",
+ "PowerPC",
+ "RISCV",
+ "Sparc",
+ "SystemZ",
+ "WebAssembly",
+ "X86",
+]
+
if (llvm_targets_to_build == "host") {
if (host_cpu == "arm64") {
llvm_targets_to_build = [ "AArch64" ]
@@ -18,28 +37,16 @@
assert(false, "add your host_cpu above")
}
} else if (llvm_targets_to_build == "all") {
- # FIXME: Port the remaining targets.
- llvm_targets_to_build = [
- "AArch64",
- "ARM",
- "BPF",
- "Hexagon",
- "Lanai",
- "Mips",
- "NVPTX",
- "PowerPC",
- "Sparc",
- "SystemZ",
- "WebAssembly",
- "X86",
- ]
+ llvm_targets_to_build = llvm_all_targets
}
# Validate that llvm_targets_to_build is set to a list of valid targets,
-# and remember which targets are built.
+# and remember which targets are built where needed (for conditionally-built
+# unittest targets).
llvm_build_AArch64 = false
llvm_build_ARM = false
llvm_build_BPF = false
+llvm_build_Mips = false
llvm_build_PowerPC = false
llvm_build_WebAssembly = false
llvm_build_X86 = false
@@ -50,29 +57,25 @@
llvm_build_ARM = true
} else if (target == "BPF") {
llvm_build_BPF = true
- } else if (target == "Hexagon") {
- # Nothing to do.
- } else if (target == "Lanai") {
- # Nothing to do.
} else if (target == "Mips") {
- # Nothing to do.
- } else if (target == "NVPTX") {
- # Nothing to do.
+ llvm_build_Mips = true
} else if (target == "PowerPC") {
llvm_build_PowerPC = true
- } else if (target == "RISCV") {
- # Nothing to do.
- } else if (target == "Sparc") {
- # Nothing to do.
- } else if (target == "SystemZ") {
- # Nothing to do.
} else if (target == "WebAssembly") {
llvm_build_WebAssembly = true
} else if (target == "X86") {
llvm_build_X86 = true
+ } else if (target == "AMDGPU" || target == "AVR" || target == "Hexagon" ||
+ target == "Lanai" || target == "NVPTX" || target == "RISCV" ||
+ target == "Sparc" || target == "SystemZ") {
+ # Nothing to do.
} else {
- # FIXME: Port the remaining targets.
- assert(false, "Unknown target '$target'.")
+ all_targets_string = ""
+ foreach(target, llvm_all_targets) {
+ all_targets_string += "$0x0a " + target
+ }
+ assert(false, "Unknown target '$target' in llvm_targets_to_build. " +
+ "Known targets:" + all_targets_string)
}
}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/TextAPI/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/TextAPI/BUILD.gn
index 509d589..aa695da 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/TextAPI/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/TextAPI/BUILD.gn
@@ -12,7 +12,9 @@
"MachO/ArchitectureSet.cpp",
"MachO/InterfaceFile.cpp",
"MachO/PackedVersion.cpp",
+ "MachO/Platform.cpp",
"MachO/Symbol.cpp",
+ "MachO/Target.cpp",
"MachO/TextStub.cpp",
"MachO/TextStubCommon.cpp",
]
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Transforms/CFGuard/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Transforms/CFGuard/BUILD.gn
new file mode 100644
index 0000000..c683509
--- /dev/null
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Transforms/CFGuard/BUILD.gn
@@ -0,0 +1,10 @@
+static_library("CFGuard") {
+ output_name = "LLVMCFGuard"
+ deps = [
+ "//llvm/lib/IR",
+ "//llvm/lib/Support",
+ ]
+ sources = [
+ "CFGuard.cpp",
+ ]
+}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Transforms/Instrumentation/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Transforms/Instrumentation/BUILD.gn
index d6c256b..ec7f3d8 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Transforms/Instrumentation/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Transforms/Instrumentation/BUILD.gn
@@ -26,5 +26,6 @@
"PoisonChecking.cpp",
"SanitizerCoverage.cpp",
"ThreadSanitizer.cpp",
+ "ValueProfileCollector.cpp",
]
}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Transforms/Scalar/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Transforms/Scalar/BUILD.gn
index d09bb70..57c09a7 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Transforms/Scalar/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Transforms/Scalar/BUILD.gn
@@ -55,8 +55,10 @@
"LoopUnswitch.cpp",
"LoopVersioningLICM.cpp",
"LowerAtomic.cpp",
+ "LowerConstantIntrinsics.cpp",
"LowerExpectIntrinsic.cpp",
"LowerGuardIntrinsic.cpp",
+ "LowerMatrixIntrinsics.cpp",
"LowerWidenableCondition.cpp",
"MakeGuardsExplicit.cpp",
"MemCpyOptimizer.cpp",
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Transforms/Utils/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Transforms/Utils/BUILD.gn
index 6b28bc8..a95b19a 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Transforms/Utils/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Transforms/Utils/BUILD.gn
@@ -17,7 +17,9 @@
"CloneFunction.cpp",
"CloneModule.cpp",
"CodeExtractor.cpp",
+ "CodeMoverUtils.cpp",
"CtorUtils.cpp",
+ "Debugify.cpp",
"DemoteRegToStack.cpp",
"EntryExitInstrumenter.cpp",
"EscapeEnumerator.cpp",
@@ -28,6 +30,7 @@
"GlobalStatus.cpp",
"GuardUtils.cpp",
"ImportedFunctionsInliningStatistics.cpp",
+ "InjectTLIMappings.cpp",
"InlineFunction.cpp",
"InstructionNamer.cpp",
"IntegerDivision.cpp",
@@ -47,6 +50,7 @@
"LowerSwitch.cpp",
"Mem2Reg.cpp",
"MetaRenamer.cpp",
+ "MisExpect.cpp",
"ModuleUtils.cpp",
"NameAnonGlobals.cpp",
"PredicateInfo.cpp",
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Transforms/Vectorize/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Transforms/Vectorize/BUILD.gn
index a308fce..ff5de65 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Transforms/Vectorize/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/lib/Transforms/Vectorize/BUILD.gn
@@ -13,9 +13,9 @@
"SLPVectorizer.cpp",
"VPlan.cpp",
"VPlanHCFGBuilder.cpp",
- "VPlanHCFGTransforms.cpp",
"VPlanPredicator.cpp",
"VPlanSLP.cpp",
+ "VPlanTransforms.cpp",
"VPlanVerifier.cpp",
"Vectorize.cpp",
]
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/test/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/test/BUILD.gn
index 7c6a316..5ac7a72 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/llvm/test/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/test/BUILD.gn
@@ -69,6 +69,7 @@
# No bindings are implemented in the GN build.
"LLVM_BINDINGS=",
+ "LLVM_BYE_LINK_INTO_TOOLS=0",
"GO_EXECUTABLE=",
"LLVM_INCLUDE_GO_TESTS=0",
@@ -215,6 +216,7 @@
"//llvm/tools/llvm-elfabi",
"//llvm/tools/llvm-exegesis",
"//llvm/tools/llvm-extract",
+ "//llvm/tools/llvm-ifs",
"//llvm/tools/llvm-isel-fuzzer",
"//llvm/tools/llvm-jitlink",
"//llvm/tools/llvm-link",
@@ -234,6 +236,7 @@
"//llvm/tools/llvm-profdata",
"//llvm/tools/llvm-rc",
"//llvm/tools/llvm-readobj:symlinks",
+ "//llvm/tools/llvm-reduce",
"//llvm/tools/llvm-rtdyld",
"//llvm/tools/llvm-size",
"//llvm/tools/llvm-split",
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/tools/dsymutil/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/tools/dsymutil/BUILD.gn
index 721b4c4..48dacea 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/llvm/tools/dsymutil/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/tools/dsymutil/BUILD.gn
@@ -1,9 +1,19 @@
+import("//llvm/utils/TableGen/tablegen.gni")
+
+tablegen("Options") {
+ visibility = [ ":dsymutil" ]
+ args = [ "-gen-opt-parser-defs" ]
+}
+
executable("dsymutil") {
deps = [
+ ":Options",
"//llvm/lib/CodeGen/AsmPrinter",
+ "//llvm/lib/DWARFLinker",
"//llvm/lib/DebugInfo/DWARF",
"//llvm/lib/MC",
"//llvm/lib/Object",
+ "//llvm/lib/Option",
"//llvm/lib/Support",
"//llvm/lib/Target",
"//llvm/lib/Target:TargetsToBuild",
@@ -11,14 +21,11 @@
sources = [
"BinaryHolder.cpp",
"CFBundle.cpp",
- "CompileUnit.cpp",
"DebugMap.cpp",
- "DeclContext.cpp",
- "DwarfLinker.cpp",
+ "DwarfLinkerForBinary.cpp",
"DwarfStreamer.cpp",
"MachODebugMapParser.cpp",
"MachOUtils.cpp",
- "NonRelocatableStringpool.cpp",
"SymbolMap.cpp",
"dsymutil.cpp",
]
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/tools/llvm-config/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/tools/llvm-config/BUILD.gn
index 2f662e0..c4fc77a 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/llvm/tools/llvm-config/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/tools/llvm-config/BUILD.gn
@@ -40,7 +40,7 @@
# lib/Support/Windows/Path.inc.
# advapi32 required for CryptAcquireContextW in
# lib/Support/Windows/Path.inc
- system_libs = "psapi.lib shell32.lib ole32.lib uuid.lib advapi32"
+ system_libs = "psapi.lib shell32.lib ole32.lib uuid.lib advapi32.lib"
} else {
system_libs += "-lm"
if (host_os == "linux") {
@@ -81,8 +81,8 @@
"LLVM_BUILD_LLVM_DYLIB=0",
"LLVM_LINK_LLVM_DYLIB=0",
"BUILD_SHARED_LIBS=0",
- "LLVM_DYLIB_COMPONENTS=all",
- "LLVM_DYLIB_VERSION=${llvm_version_major}svn",
+ "LLVM_DYLIB_COMPONENTS_expanded=all",
+ "LLVM_DYLIB_VERSION=${llvm_version_major}git",
"LLVM_HAS_GLOBAL_ISEL=1",
"LLVM_TOOLS_INSTALL_DIR=",
]
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/tools/llvm-exegesis/lib/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/tools/llvm-exegesis/lib/BUILD.gn
index 5cea22c..199c033 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/llvm/tools/llvm-exegesis/lib/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/tools/llvm-exegesis/lib/BUILD.gn
@@ -28,7 +28,9 @@
"RegisterAliasing.cpp",
"RegisterValue.cpp",
"SchedClassResolution.cpp",
+ "SnippetFile.cpp",
"SnippetGenerator.cpp",
+ "SnippetRepetitor.cpp",
"Target.cpp",
"Uops.cpp",
]
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/tools/llvm-exegesis/lib/Mips/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/tools/llvm-exegesis/lib/Mips/BUILD.gn
new file mode 100644
index 0000000..61d5f1f
--- /dev/null
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/tools/llvm-exegesis/lib/Mips/BUILD.gn
@@ -0,0 +1,21 @@
+import("//llvm/utils/TableGen/tablegen.gni")
+
+tablegen("MipsGenExegesis") {
+ args = [ "-gen-exegesis" ]
+ td_file = "//llvm/lib/Target/Mips/Mips.td"
+}
+
+static_library("Mips") {
+ output_name = "LLVMExegesisMips"
+ deps = [
+ ":MipsGenExegesis",
+
+ # Exegesis reaches inside the Target/Mips tablegen internals and must
+ # depend on these Target/Mips-internal build targets.
+ "//llvm/lib/Target/Mips/MCTargetDesc",
+ ]
+ sources = [
+ "Target.cpp",
+ ]
+ include_dirs = [ "//llvm/lib/Target/Mips" ]
+}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/tools/llvm-ifs/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/tools/llvm-ifs/BUILD.gn
new file mode 100644
index 0000000..95b49d6
--- /dev/null
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/tools/llvm-ifs/BUILD.gn
@@ -0,0 +1,11 @@
+executable("llvm-ifs") {
+ deps = [
+ "//llvm/lib/Object",
+ "//llvm/lib/ObjectYAML",
+ "//llvm/lib/Support",
+ "//llvm/lib/TextAPI",
+ ]
+ sources = [
+ "llvm-ifs.cpp",
+ ]
+}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/tools/llvm-objcopy/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/tools/llvm-objcopy/BUILD.gn
index 341220c..d76cc0b 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/llvm/tools/llvm-objcopy/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/tools/llvm-objcopy/BUILD.gn
@@ -2,6 +2,11 @@
import("//llvm/utils/TableGen/tablegen.gni")
import("//llvm/utils/gn/build/symlink_or_copy.gni")
+tablegen("InstallNameToolOpts") {
+ visibility = [ ":llvm-objcopy" ]
+ args = [ "-gen-opt-parser-defs" ]
+}
+
tablegen("ObjcopyOpts") {
visibility = [ ":llvm-objcopy" ]
args = [ "-gen-opt-parser-defs" ]
@@ -12,7 +17,10 @@
args = [ "-gen-opt-parser-defs" ]
}
-symlinks = [ "llvm-strip" ]
+symlinks = [
+ "llvm-install-name-tool",
+ "llvm-strip",
+]
if (llvm_install_binutils_symlinks) {
symlinks += [
"objcopy",
@@ -39,6 +47,7 @@
executable("llvm-objcopy") {
deps = [
+ ":InstallNameToolOpts",
":ObjcopyOpts",
":StripOpts",
"//llvm/lib/MC",
@@ -54,8 +63,10 @@
"COFF/Reader.cpp",
"COFF/Writer.cpp",
"CopyConfig.cpp",
+ "ELF/ELFConfig.cpp",
"ELF/ELFObjcopy.cpp",
"ELF/Object.cpp",
+ "MachO/MachOLayoutBuilder.cpp",
"MachO/MachOObjcopy.cpp",
"MachO/MachOReader.cpp",
"MachO/MachOWriter.cpp",
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/tools/llvm-reduce/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/tools/llvm-reduce/BUILD.gn
new file mode 100644
index 0000000..efa80c1
--- /dev/null
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/tools/llvm-reduce/BUILD.gn
@@ -0,0 +1,22 @@
+executable("llvm-reduce") {
+ deps = [
+ "//llvm/lib/IR",
+ "//llvm/lib/IRReader",
+ "//llvm/lib/Support",
+ "//llvm/lib/Target",
+ "//llvm/lib/Target:TargetsToBuild",
+ "//llvm/lib/Transforms/Utils",
+ ]
+ include_dirs = [ "." ]
+ sources = [
+ "TestRunner.cpp",
+ "deltas/Delta.cpp",
+ "deltas/ReduceArguments.cpp",
+ "deltas/ReduceBasicBlocks.cpp",
+ "deltas/ReduceFunctions.cpp",
+ "deltas/ReduceGlobalVars.cpp",
+ "deltas/ReduceInstructions.cpp",
+ "deltas/ReduceMetadata.cpp",
+ "llvm-reduce.cpp",
+ ]
+}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/tools/opt/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/tools/opt/BUILD.gn
index 2bf062c..88b77b1 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/llvm/tools/opt/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/tools/opt/BUILD.gn
@@ -22,7 +22,6 @@
sources = [
"AnalysisWrappers.cpp",
"BreakpointPrinter.cpp",
- "Debugify.cpp",
"GraphPrinters.cpp",
"NewPMDriver.cpp",
"PassPrinters.cpp",
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/tools/yaml2obj/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/tools/yaml2obj/BUILD.gn
index a36004d..b0e2fe0 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/llvm/tools/yaml2obj/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/tools/yaml2obj/BUILD.gn
@@ -1,17 +1,9 @@
executable("yaml2obj") {
deps = [
- "//llvm/lib/DebugInfo/CodeView",
- "//llvm/lib/MC",
- "//llvm/lib/Object",
"//llvm/lib/ObjectYAML",
"//llvm/lib/Support",
]
sources = [
- "yaml2coff.cpp",
- "yaml2elf.cpp",
- "yaml2macho.cpp",
- "yaml2minidump.cpp",
"yaml2obj.cpp",
- "yaml2wasm.cpp",
]
}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/triples.gni b/src/llvm-project/llvm/utils/gn/secondary/llvm/triples.gni
index efe8be2..c6bef4b 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/llvm/triples.gni
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/triples.gni
@@ -10,11 +10,15 @@
} else if (current_os == "mac") {
llvm_current_triple = "x86_64-apple-darwin"
} else if (current_os == "win") {
- llvm_current_triple = "x86_64-pc-windows"
+ llvm_current_triple = "x86_64-pc-windows-msvc"
+ }
+} else if (current_cpu == "arm") {
+ if (current_os == "android") {
+ llvm_current_triple = "arm-linux-androideabi29"
}
} else if (current_cpu == "arm64") {
if (current_os == "android") {
- llvm_current_triple = "aarch64-linux-android21"
+ llvm_current_triple = "aarch64-linux-android29"
}
} else if (current_cpu == "ppc64") {
if (current_os == "linux") {
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/ADT/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/ADT/BUILD.gn
index d444bc3..7a532fc 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/ADT/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/ADT/BUILD.gn
@@ -24,8 +24,11 @@
"DenseMapTest.cpp",
"DenseSetTest.cpp",
"DepthFirstIteratorTest.cpp",
+ "DirectedGraphTest.cpp",
+ "EnumeratedArrayTest.cpp",
"EquivalenceClassesTest.cpp",
"FallibleIteratorTest.cpp",
+ "FloatingPointMode.cpp",
"FoldingSet.cpp",
"FunctionExtrasTest.cpp",
"FunctionRefTest.cpp",
@@ -77,6 +80,5 @@
"TinyPtrVectorTest.cpp",
"TripleTest.cpp",
"TwineTest.cpp",
- "VariadicFunctionTest.cpp",
]
}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/Analysis/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/Analysis/BUILD.gn
index 9be8d42..1e4b158 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/Analysis/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/Analysis/BUILD.gn
@@ -36,6 +36,7 @@
"UnrollAnalyzerTest.cpp",
"ValueLatticeTest.cpp",
"ValueTrackingTest.cpp",
+ "VectorFunctionABITest.cpp",
"VectorUtilsTest.cpp",
]
}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/BUILD.gn
index e2f813d..7f41b6c 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/BUILD.gn
@@ -20,6 +20,7 @@
"ExecutionEngine/JITLink:JITLinkTests",
"ExecutionEngine/MCJIT:MCJITTests",
"ExecutionEngine/Orc:OrcJITTests",
+ "Frontend:LLVMFrontendTests",
"FuzzMutate:FuzzMutateTests",
"IR:IRTests",
"LineEditor:LineEditorTests",
@@ -34,6 +35,7 @@
"Remarks:RemarksTests",
"Support:SupportTests",
"Support/DynamicLibrary:DynamicLibraryTests",
+ "TableGen:TableGenTests",
"TextAPI:TextAPITests",
"Transforms/IPO:IPOTests",
"Transforms/Scalar:ScalarTests",
@@ -55,16 +57,25 @@
]
}
if (llvm_build_ARM) {
- deps += [ "tools/llvm-exegesis/ARM:LLVMExegesisARMTests" ]
+ deps += [
+ "Target/ARM:ARMTests",
+ "tools/llvm-exegesis/ARM:LLVMExegesisARMTests",
+ ]
}
- if (llvm_build_WebAssembly) {
- deps += [ "Target/WebAssembly:WebAssemblyTests" ]
+ if (llvm_build_Mips) {
+ deps += [ "tools/llvm-exegesis/Mips:LLVMExegesisMipsTests" ]
}
if (llvm_build_PowerPC) {
deps += [ "tools/llvm-exegesis/PowerPC:LLVMExegesisPowerPCTests" ]
}
+ if (llvm_build_WebAssembly) {
+ deps += [ "Target/WebAssembly:WebAssemblyTests" ]
+ }
if (llvm_build_X86) {
- deps += [ "tools/llvm-exegesis/X86:LLVMExegesisX86Tests" ]
+ deps += [
+ "Target/X86:X86Tests",
+ "tools/llvm-exegesis/X86:LLVMExegesisX86Tests",
+ ]
}
testonly = true
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/Bitcode/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/Bitcode/BUILD.gn
index 9a3817e..6200a0f 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/Bitcode/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/Bitcode/BUILD.gn
@@ -10,5 +10,6 @@
]
sources = [
"BitReaderTest.cpp",
+ "DataLayoutUpgradeTest.cpp",
]
}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/CodeGen/GlobalISel/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/CodeGen/GlobalISel/BUILD.gn
index 3afd244..4a042fd 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/CodeGen/GlobalISel/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/CodeGen/GlobalISel/BUILD.gn
@@ -13,7 +13,10 @@
]
sources = [
"CSETest.cpp",
+ "ConstantFoldingTest.cpp",
"GISelMITest.cpp",
+ "KnownBitsTest.cpp",
+ "LegalizerTest.cpp",
"LegalizerHelperTest.cpp",
"LegalizerInfoTest.cpp",
"MachineIRBuilderTest.cpp",
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/DebugInfo/DWARF/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/DebugInfo/DWARF/BUILD.gn
index 1c22a4b..12c5b3b 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/DebugInfo/DWARF/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/DebugInfo/DWARF/BUILD.gn
@@ -14,7 +14,9 @@
sources = [
"DWARFDebugInfoTest.cpp",
"DWARFDebugLineTest.cpp",
+ "DWARFDieTest.cpp",
"DWARFFormValueTest.cpp",
+ "DWARFLocationExpressionTest.cpp",
"DwarfGenerator.cpp",
"DwarfUtils.cpp",
]
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/ExecutionEngine/JITLink/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/ExecutionEngine/JITLink/BUILD.gn
index 75a00a1..0a85ff7 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/ExecutionEngine/JITLink/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/ExecutionEngine/JITLink/BUILD.gn
@@ -4,17 +4,12 @@
deps = [
"//llvm/lib/ExecutionEngine/JITLink",
"//llvm/lib/ExecutionEngine/RuntimeDyld",
- "//llvm/lib/MC",
- "//llvm/lib/MC/MCDisassembler",
- "//llvm/lib/MC/MCParser",
"//llvm/lib/Object",
"//llvm/lib/Support",
- "//llvm/lib/Target",
"//llvm/lib/Target:TargetsToBuild",
"//llvm/lib/Testing/Support",
]
sources = [
- "JITLinkTestCommon.cpp",
- "MachO_x86_64_Tests.cpp",
+ "LinkGraphTests.cpp",
]
}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/Frontend/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/Frontend/BUILD.gn
new file mode 100644
index 0000000..bf37b9f
--- /dev/null
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/Frontend/BUILD.gn
@@ -0,0 +1,15 @@
+import("//llvm/utils/unittest/unittest.gni")
+
+unittest("LLVMFrontendTests") {
+ deps = [
+ "//llvm/lib/Analysis",
+ "//llvm/lib/IR",
+ "//llvm/lib/Frontend/OpenMP",
+ "//llvm/lib/Passes",
+ "//llvm/lib/Support",
+ "//llvm/lib/Testing/Support",
+ ]
+ sources = [
+ "OpenMPIRBuilderTest.cpp",
+ ]
+}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/MC/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/MC/BUILD.gn
index d42db2c..01be445 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/MC/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/MC/BUILD.gn
@@ -10,6 +10,7 @@
sources = [
"Disassembler.cpp",
"DwarfLineTables.cpp",
+ "MCInstPrinter.cpp",
"StringTableBuilderTest.cpp",
"TargetRegistry.cpp",
]
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/Object/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/Object/BUILD.gn
index 204e718..d4aea98 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/Object/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/Object/BUILD.gn
@@ -8,6 +8,7 @@
]
sources = [
"MinidumpTest.cpp",
+ "ObjectFileTest.cpp",
"SymbolSizeTest.cpp",
"SymbolicFileTest.cpp",
]
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/ObjectYAML/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/ObjectYAML/BUILD.gn
index 4e7d610..2fbcaa9 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/ObjectYAML/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/ObjectYAML/BUILD.gn
@@ -8,6 +8,7 @@
]
sources = [
"MinidumpYAMLTest.cpp",
+ "YAML2ObjTest.cpp",
"YAMLTest.cpp",
]
}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/Remarks/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/Remarks/BUILD.gn
index cd1cd56..2fdd613 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/Remarks/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/Remarks/BUILD.gn
@@ -2,11 +2,18 @@
unittest("RemarksTests") {
deps = [
+ "//llvm/lib/Bitcode/Reader",
"//llvm/lib/Remarks",
"//llvm/lib/Support",
]
sources = [
+ "BitstreamRemarksFormatTest.cpp",
+ "BitstreamRemarksParsingTest.cpp",
+ "BitstreamRemarksSerializerTest.cpp",
+ "RemarksAPITest.cpp",
+ "RemarksLinkingTest.cpp",
"RemarksStrTabParsingTest.cpp",
"YAMLRemarksParsingTest.cpp",
+ "YAMLRemarksSerializerTest.cpp",
]
}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/Support/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/Support/BUILD.gn
index 2490293..7dbe23e 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/Support/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/Support/BUILD.gn
@@ -8,6 +8,7 @@
sources = [
"ARMAttributeParser.cpp",
"AlignOfTest.cpp",
+ "AlignmentTest.cpp",
"AllocatorTest.cpp",
"AnnotationsTest.cpp",
"ArrayRecyclerTest.cpp",
@@ -33,7 +34,9 @@
"ErrorOrTest.cpp",
"ErrorTest.cpp",
"FileCheckTest.cpp",
+ "FileCollectorTest.cpp",
"FileOutputBufferTest.cpp",
+ "FileUtilitiesTest.cpp",
"FormatVariadicTest.cpp",
"GlobPatternTest.cpp",
"Host.cpp",
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/TableGen/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/TableGen/BUILD.gn
new file mode 100644
index 0000000..dbd10e6
--- /dev/null
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/TableGen/BUILD.gn
@@ -0,0 +1,29 @@
+import("//llvm/utils/TableGen/tablegen.gni")
+import("//llvm/utils/unittest/unittest.gni")
+
+tablegen("AutomataAutomata") {
+ visibility = [ ":TableGenTests" ]
+ args = [ "-gen-automata" ]
+ td_file = "Automata.td"
+}
+
+tablegen("AutomataTables") {
+ visibility = [ ":TableGenTests" ]
+ args = [ "-gen-searchable-tables" ]
+ td_file = "Automata.td"
+}
+
+unittest("TableGenTests") {
+ deps = [
+ ":AutomataAutomata",
+ ":AutomataTables",
+ "//llvm/lib/Support",
+ "//llvm/lib/TableGen",
+ "//llvm/utils/TableGen/GlobalISel",
+ ]
+ include_dirs = [ "//llvm/utils/TableGen" ]
+ sources = [
+ "AutomataTest.cpp",
+ "CodeExpanderTest.cpp",
+ ]
+}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/Target/AArch64/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/Target/AArch64/BUILD.gn
index 9a3313d..7059828 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/Target/AArch64/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/Target/AArch64/BUILD.gn
@@ -16,5 +16,6 @@
include_dirs = [ "//llvm/lib/Target/AArch64" ]
sources = [
"InstSizes.cpp",
+ "TestStackOffset.cpp",
]
}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/Target/ARM/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/Target/ARM/BUILD.gn
new file mode 100644
index 0000000..fd9db37
--- /dev/null
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/Target/ARM/BUILD.gn
@@ -0,0 +1,17 @@
+import("//llvm/utils/unittest/unittest.gni")
+
+unittest("ARMTests") {
+ deps = [
+ "//llvm/lib/MC",
+ "//llvm/lib/Support",
+ "//llvm/lib/Target",
+ "//llvm/lib/Target/ARM:LLVMARMCodeGen",
+ "//llvm/lib/Target/ARM/MCTargetDesc",
+ "//llvm/lib/Target/ARM/TargetInfo",
+ "//llvm/lib/Target/ARM/Utils",
+ ]
+ include_dirs = [ "//llvm/lib/Target/ARM" ]
+ sources = [
+ "MachineInstrTest.cpp",
+ ]
+}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/Target/X86/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/Target/X86/BUILD.gn
new file mode 100644
index 0000000..5092e7a
--- /dev/null
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/Target/X86/BUILD.gn
@@ -0,0 +1,20 @@
+import("//llvm/utils/unittest/unittest.gni")
+
+unittest("X86Tests") {
+ deps = [
+ "//llvm/lib/Analysis",
+ "//llvm/lib/CodeGen",
+ "//llvm/lib/CodeGen/MIRParser",
+ "//llvm/lib/IR",
+ "//llvm/lib/MC",
+ "//llvm/lib/Support",
+ "//llvm/lib/Target",
+ "//llvm/lib/Target/X86:LLVMX86CodeGen",
+ "//llvm/lib/Target/X86/MCTargetDesc",
+ "//llvm/lib/Target/X86/TargetInfo",
+ ]
+ include_dirs = [ "//llvm/lib/Target/X86" ]
+ sources = [
+ "MachineSizeOptsTest.cpp",
+ ]
+}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/TextAPI/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/TextAPI/BUILD.gn
index 4c207d4..8e51943 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/TextAPI/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/TextAPI/BUILD.gn
@@ -9,5 +9,7 @@
"ELFYAMLTest.cpp",
"TextStubV1Tests.cpp",
"TextStubV2Tests.cpp",
+ "TextStubV3Tests.cpp",
+ "TextStubV4Tests.cpp",
]
}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/Transforms/Scalar/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/Transforms/Scalar/BUILD.gn
index eee435f..493a282 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/Transforms/Scalar/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/Transforms/Scalar/BUILD.gn
@@ -5,11 +5,14 @@
"//llvm/lib/Analysis",
"//llvm/lib/AsmParser",
"//llvm/lib/IR",
+ "//llvm/lib/Passes",
"//llvm/lib/Support",
+ "//llvm/lib/Testing/Support",
"//llvm/lib/Transforms/Scalar",
"//llvm/lib/Transforms/Utils",
]
sources = [
+ "LICMTest.cpp",
"LoopPassManagerTest.cpp",
]
}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/Transforms/Utils/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/Transforms/Utils/BUILD.gn
index e4585e2..ac69d73 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/Transforms/Utils/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/Transforms/Utils/BUILD.gn
@@ -13,11 +13,15 @@
"BasicBlockUtilsTest.cpp",
"CloningTest.cpp",
"CodeExtractorTest.cpp",
+ "CodeMoverUtilsTest.cpp",
"FunctionComparatorTest.cpp",
"IntegerDivisionTest.cpp",
"LocalTest.cpp",
+ "LoopUtilsTest.cpp",
"SSAUpdaterBulkTest.cpp",
+ "SizeOptsTest.cpp",
"UnrollLoopTest.cpp",
+ "VFABIUtils.cpp",
"ValueMapperTest.cpp",
]
}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/tools/llvm-exegesis/Mips/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/tools/llvm-exegesis/Mips/BUILD.gn
new file mode 100644
index 0000000..131c866
--- /dev/null
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/tools/llvm-exegesis/Mips/BUILD.gn
@@ -0,0 +1,27 @@
+import("//llvm/utils/unittest/unittest.gni")
+
+unittest("LLVMExegesisMipsTests") {
+ deps = [
+ "//llvm/lib/DebugInfo/Symbolize",
+ "//llvm/lib/MC",
+ "//llvm/lib/MC/MCParser",
+ "//llvm/lib/Object",
+ "//llvm/lib/Support",
+ "//llvm/lib/Target/Mips",
+
+ # Exegesis reaches inside the Target/Mips tablegen internals and must
+ # depend on these Target/Mips-internal build targets.
+ "//llvm/lib/Target/Mips/MCTargetDesc",
+ "//llvm/tools/llvm-exegesis/lib",
+ "//llvm/tools/llvm-exegesis/lib/Mips",
+ ]
+ include_dirs = [
+ "//llvm/lib/Target/Mips",
+ "//llvm/tools/llvm-exegesis/lib",
+ ]
+ sources = [
+ "BenchmarkResultTest.cpp",
+ "SnippetGeneratorTest.cpp",
+ "TargetTest.cpp",
+ ]
+}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/tools/llvm-exegesis/X86/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/tools/llvm-exegesis/X86/BUILD.gn
index 53c5e4c..9807b58 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/tools/llvm-exegesis/X86/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/unittests/tools/llvm-exegesis/X86/BUILD.gn
@@ -25,7 +25,9 @@
"BenchmarkResultTest.cpp",
"RegisterAliasingTest.cpp",
"SchedClassResolutionTest.cpp",
+ "SnippetFileTest.cpp",
"SnippetGeneratorTest.cpp",
+ "SnippetRepetitorTest.cpp",
"TargetTest.cpp",
]
}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/utils/TableGen/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/utils/TableGen/BUILD.gn
index 0121954..b390326 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/llvm/utils/TableGen/BUILD.gn
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/utils/TableGen/BUILD.gn
@@ -4,6 +4,7 @@
"//llvm/lib/MC",
"//llvm/lib/Support",
"//llvm/lib/TableGen",
+ "//llvm/utils/TableGen/GlobalISel",
]
sources = [
"AsmMatcherEmitter.cpp",
@@ -25,17 +26,21 @@
"DAGISelMatcherEmitter.cpp",
"DAGISelMatcherGen.cpp",
"DAGISelMatcherOpt.cpp",
+ "DFAEmitter.cpp",
"DFAPacketizerEmitter.cpp",
"DisassemblerEmitter.cpp",
"ExegesisEmitter.cpp",
"FastISelEmitter.cpp",
"FixedLenDecoderEmitter.cpp",
+ "GICombinerEmitter.cpp",
"GlobalISelEmitter.cpp",
"InfoByHwMode.cpp",
"InstrDocsEmitter.cpp",
"InstrInfoEmitter.cpp",
"IntrinsicEmitter.cpp",
+ "OptEmitter.cpp",
"OptParserEmitter.cpp",
+ "OptRSTEmitter.cpp",
"PredicateExpander.cpp",
"PseudoLoweringEmitter.cpp",
"RISCVCompressInstEmitter.cpp",
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/utils/TableGen/GlobalISel/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/utils/TableGen/GlobalISel/BUILD.gn
new file mode 100644
index 0000000..ece670b
--- /dev/null
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/utils/TableGen/GlobalISel/BUILD.gn
@@ -0,0 +1,15 @@
+static_library("GlobalISel") {
+ deps = [
+ "//llvm/lib/Support",
+ ]
+ sources = [
+ "CodeExpander.cpp",
+ "GIMatchDag.cpp",
+ "GIMatchDagEdge.cpp",
+ "GIMatchDagInstr.cpp",
+ "GIMatchDagOperands.cpp",
+ "GIMatchDagPredicate.cpp",
+ "GIMatchDagPredicateDependencyEdge.cpp",
+ "GIMatchTree.cpp",
+ ]
+}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/utils/TableGen/tablegen.gni b/src/llvm-project/llvm/utils/gn/secondary/llvm/utils/TableGen/tablegen.gni
index cb588ab..91863c0 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/llvm/utils/TableGen/tablegen.gni
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/utils/TableGen/tablegen.gni
@@ -66,6 +66,8 @@
args = [
rebase_path(tblgen_executable, root_build_dir),
+ "--write-if-changed",
+
"-I",
rebase_path("//llvm/include", root_build_dir),
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/utils/benchmark/BUILD.gn b/src/llvm-project/llvm/utils/gn/secondary/llvm/utils/benchmark/BUILD.gn
new file mode 100644
index 0000000..39f5a22
--- /dev/null
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/utils/benchmark/BUILD.gn
@@ -0,0 +1,25 @@
+static_library("benchmark") {
+ sources = [
+ "src/benchmark.cc",
+ "src/benchmark_register.cc",
+ "src/colorprint.cc",
+ "src/commandlineflags.cc",
+ "src/complexity.cc",
+ "src/console_reporter.cc",
+ "src/counter.cc",
+ "src/csv_reporter.cc",
+ "src/json_reporter.cc",
+ "src/reporter.cc",
+ "src/sleep.cc",
+ "src/statistics.cc",
+ "src/string_util.cc",
+ "src/sysinfo.cc",
+ "src/timers.cc",
+ ]
+ deps = [ "//llvm/utils/gn/build/libs/pthread" ]
+ public_configs = [ ":benchmark_config" ]
+}
+
+config("benchmark_config") {
+ include_dirs = [ "include" ]
+}
diff --git a/src/llvm-project/llvm/utils/gn/secondary/llvm/version.gni b/src/llvm-project/llvm/utils/gn/secondary/llvm/version.gni
index cf13c1b..184e96b 100644
--- a/src/llvm-project/llvm/utils/gn/secondary/llvm/version.gni
+++ b/src/llvm-project/llvm/utils/gn/secondary/llvm/version.gni
@@ -1,4 +1,4 @@
-llvm_version_major = 9
+llvm_version_major = 10
llvm_version_minor = 0
llvm_version_patch = 1
llvm_version = "$llvm_version_major.$llvm_version_minor.$llvm_version_patch"