[llvm] r348908 - [gn build] Add build files for DebugInfo/{DWARF, PDB}, Option, ToolDrivers/llvm-lib, and WindowsManifest
Nico Weber via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 11 19:05:59 PST 2018
Author: nico
Date: Tue Dec 11 19:05:59 2018
New Revision: 348908
URL: http://llvm.org/viewvc/llvm-project?rev=348908&view=rev
Log:
[gn build] Add build files for DebugInfo/{DWARF,PDB}, Option, ToolDrivers/llvm-lib, and WindowsManifest
The diff in targets.gni is due to me running `gn format` on all .gn and .gni
files.
llvm_enable_dia_sdk is in a gni file because I'm going to have to read it when
writing the lit invocations for check-llvm and check-lld. I've never had the
DIA sdk installed locally so I never tested building with it enabled -- it
probably doesn't Just Work and needs some path to diaguids.lib. We can finish
that once somebody needs it.
Differential Revision: https://reviews.llvm.org/D55591
Added:
llvm/trunk/utils/gn/secondary/llvm/lib/DebugInfo/DWARF/
llvm/trunk/utils/gn/secondary/llvm/lib/DebugInfo/DWARF/BUILD.gn
llvm/trunk/utils/gn/secondary/llvm/lib/DebugInfo/PDB/
llvm/trunk/utils/gn/secondary/llvm/lib/DebugInfo/PDB/BUILD.gn
llvm/trunk/utils/gn/secondary/llvm/lib/DebugInfo/PDB/enable_dia.gni
llvm/trunk/utils/gn/secondary/llvm/lib/Option/
llvm/trunk/utils/gn/secondary/llvm/lib/Option/BUILD.gn
llvm/trunk/utils/gn/secondary/llvm/lib/ToolDrivers/
llvm/trunk/utils/gn/secondary/llvm/lib/ToolDrivers/llvm-lib/
llvm/trunk/utils/gn/secondary/llvm/lib/ToolDrivers/llvm-lib/BUILD.gn
llvm/trunk/utils/gn/secondary/llvm/lib/WindowsManifest/
llvm/trunk/utils/gn/secondary/llvm/lib/WindowsManifest/BUILD.gn
Modified:
llvm/trunk/utils/gn/secondary/llvm/lib/Target/targets.gni
Added: llvm/trunk/utils/gn/secondary/llvm/lib/DebugInfo/DWARF/BUILD.gn
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/gn/secondary/llvm/lib/DebugInfo/DWARF/BUILD.gn?rev=348908&view=auto
==============================================================================
--- llvm/trunk/utils/gn/secondary/llvm/lib/DebugInfo/DWARF/BUILD.gn (added)
+++ llvm/trunk/utils/gn/secondary/llvm/lib/DebugInfo/DWARF/BUILD.gn Tue Dec 11 19:05:59 2018
@@ -0,0 +1,38 @@
+static_library("DWARF") {
+ output_name = "LLVMDebugInfoDWARF"
+ deps = [
+ "//llvm/lib/BinaryFormat",
+ "//llvm/lib/MC",
+ "//llvm/lib/Object",
+ "//llvm/lib/Support",
+ ]
+ sources = [
+ "DWARFAbbreviationDeclaration.cpp",
+ "DWARFAcceleratorTable.cpp",
+ "DWARFAddressRange.cpp",
+ "DWARFCompileUnit.cpp",
+ "DWARFContext.cpp",
+ "DWARFDataExtractor.cpp",
+ "DWARFDebugAbbrev.cpp",
+ "DWARFDebugAddr.cpp",
+ "DWARFDebugArangeSet.cpp",
+ "DWARFDebugAranges.cpp",
+ "DWARFDebugFrame.cpp",
+ "DWARFDebugInfoEntry.cpp",
+ "DWARFDebugLine.cpp",
+ "DWARFDebugLoc.cpp",
+ "DWARFDebugMacro.cpp",
+ "DWARFDebugPubTable.cpp",
+ "DWARFDebugRangeList.cpp",
+ "DWARFDebugRnglists.cpp",
+ "DWARFDie.cpp",
+ "DWARFExpression.cpp",
+ "DWARFFormValue.cpp",
+ "DWARFGdbIndex.cpp",
+ "DWARFListTable.cpp",
+ "DWARFTypeUnit.cpp",
+ "DWARFUnit.cpp",
+ "DWARFUnitIndex.cpp",
+ "DWARFVerifier.cpp",
+ ]
+}
Added: llvm/trunk/utils/gn/secondary/llvm/lib/DebugInfo/PDB/BUILD.gn
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/gn/secondary/llvm/lib/DebugInfo/PDB/BUILD.gn?rev=348908&view=auto
==============================================================================
--- llvm/trunk/utils/gn/secondary/llvm/lib/DebugInfo/PDB/BUILD.gn (added)
+++ llvm/trunk/utils/gn/secondary/llvm/lib/DebugInfo/PDB/BUILD.gn Tue Dec 11 19:05:59 2018
@@ -0,0 +1,118 @@
+import("//llvm/lib/DebugInfo/PDB/enable_dia.gni")
+
+static_library("PDB") {
+ output_name = "LLVMDebugInfoPDB"
+ deps = [
+ "//llvm/include/llvm/Config:config",
+ "//llvm/lib/DebugInfo/CodeView",
+ "//llvm/lib/DebugInfo/MSF",
+ "//llvm/lib/Object",
+ "//llvm/lib/Support",
+ ]
+ sources = [
+ "GenericError.cpp",
+ "IPDBSourceFile.cpp",
+ "Native/DbiModuleDescriptor.cpp",
+ "Native/DbiModuleDescriptorBuilder.cpp",
+ "Native/DbiModuleList.cpp",
+ "Native/DbiStream.cpp",
+ "Native/DbiStreamBuilder.cpp",
+ "Native/EnumTables.cpp",
+ "Native/GSIStreamBuilder.cpp",
+ "Native/GlobalsStream.cpp",
+ "Native/Hash.cpp",
+ "Native/HashTable.cpp",
+ "Native/InfoStream.cpp",
+ "Native/InfoStreamBuilder.cpp",
+ "Native/ModuleDebugStream.cpp",
+ "Native/NamedStreamMap.cpp",
+ "Native/NativeCompilandSymbol.cpp",
+ "Native/NativeEnumGlobals.cpp",
+ "Native/NativeEnumModules.cpp",
+ "Native/NativeEnumTypes.cpp",
+ "Native/NativeExeSymbol.cpp",
+ "Native/NativeRawSymbol.cpp",
+ "Native/NativeSession.cpp",
+ "Native/NativeSymbolEnumerator.cpp",
+ "Native/NativeTypeArray.cpp",
+ "Native/NativeTypeBuiltin.cpp",
+ "Native/NativeTypeEnum.cpp",
+ "Native/NativeTypeFunctionSig.cpp",
+ "Native/NativeTypePointer.cpp",
+ "Native/NativeTypeTypedef.cpp",
+ "Native/NativeTypeUDT.cpp",
+ "Native/NativeTypeVTShape.cpp",
+ "Native/PDBFile.cpp",
+ "Native/PDBFileBuilder.cpp",
+ "Native/PDBStringTable.cpp",
+ "Native/PDBStringTableBuilder.cpp",
+ "Native/PublicsStream.cpp",
+ "Native/RawError.cpp",
+ "Native/SymbolCache.cpp",
+ "Native/SymbolStream.cpp",
+ "Native/TpiHashing.cpp",
+ "Native/TpiStream.cpp",
+ "Native/TpiStreamBuilder.cpp",
+ "PDB.cpp",
+ "PDBContext.cpp",
+ "PDBExtras.cpp",
+ "PDBInterfaceAnchors.cpp",
+ "PDBSymDumper.cpp",
+ "PDBSymbol.cpp",
+ "PDBSymbolAnnotation.cpp",
+ "PDBSymbolBlock.cpp",
+ "PDBSymbolCompiland.cpp",
+ "PDBSymbolCompilandDetails.cpp",
+ "PDBSymbolCompilandEnv.cpp",
+ "PDBSymbolCustom.cpp",
+ "PDBSymbolData.cpp",
+ "PDBSymbolExe.cpp",
+ "PDBSymbolFunc.cpp",
+ "PDBSymbolFuncDebugEnd.cpp",
+ "PDBSymbolFuncDebugStart.cpp",
+ "PDBSymbolLabel.cpp",
+ "PDBSymbolPublicSymbol.cpp",
+ "PDBSymbolThunk.cpp",
+ "PDBSymbolTypeArray.cpp",
+ "PDBSymbolTypeBaseClass.cpp",
+ "PDBSymbolTypeBuiltin.cpp",
+ "PDBSymbolTypeCustom.cpp",
+ "PDBSymbolTypeDimension.cpp",
+ "PDBSymbolTypeEnum.cpp",
+ "PDBSymbolTypeFriend.cpp",
+ "PDBSymbolTypeFunctionArg.cpp",
+ "PDBSymbolTypeFunctionSig.cpp",
+ "PDBSymbolTypeManaged.cpp",
+ "PDBSymbolTypePointer.cpp",
+ "PDBSymbolTypeTypedef.cpp",
+ "PDBSymbolTypeUDT.cpp",
+ "PDBSymbolTypeVTable.cpp",
+ "PDBSymbolTypeVTableShape.cpp",
+ "PDBSymbolUnknown.cpp",
+ "PDBSymbolUsingNamespace.cpp",
+ "UDTLayout.cpp",
+ ]
+ if (llvm_enable_dia_sdk) {
+ sources += [
+ "DIA/DIADataStream.cpp",
+ "DIA/DIAEnumDebugStreams.cpp",
+ "DIA/DIAEnumFrameData.cpp",
+ "DIA/DIAEnumInjectedSources.cpp",
+ "DIA/DIAEnumLineNumbers.cpp",
+ "DIA/DIAEnumSectionContribs.cpp",
+ "DIA/DIAEnumSourceFiles.cpp",
+ "DIA/DIAEnumSymbols.cpp",
+ "DIA/DIAEnumTables.cpp",
+ "DIA/DIAError.cpp",
+ "DIA/DIAFrameData.cpp",
+ "DIA/DIAInjectedSource.cpp",
+ "DIA/DIALineNumber.cpp",
+ "DIA/DIARawSymbol.cpp",
+ "DIA/DIASectionContrib.cpp",
+ "DIA/DIASession.cpp",
+ "DIA/DIASourceFile.cpp",
+ "DIA/DIATable.cpp",
+ ]
+ # FIXME: Link against the right diaguids.lib too.
+ }
+}
Added: llvm/trunk/utils/gn/secondary/llvm/lib/DebugInfo/PDB/enable_dia.gni
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/gn/secondary/llvm/lib/DebugInfo/PDB/enable_dia.gni?rev=348908&view=auto
==============================================================================
--- llvm/trunk/utils/gn/secondary/llvm/lib/DebugInfo/PDB/enable_dia.gni (added)
+++ llvm/trunk/utils/gn/secondary/llvm/lib/DebugInfo/PDB/enable_dia.gni Tue Dec 11 19:05:59 2018
@@ -0,0 +1,4 @@
+declare_args() {
+ # Whether to build code that requires the Microsoft DIA SDK.
+ llvm_enable_dia_sdk = false
+}
Added: llvm/trunk/utils/gn/secondary/llvm/lib/Option/BUILD.gn
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/gn/secondary/llvm/lib/Option/BUILD.gn?rev=348908&view=auto
==============================================================================
--- llvm/trunk/utils/gn/secondary/llvm/lib/Option/BUILD.gn (added)
+++ llvm/trunk/utils/gn/secondary/llvm/lib/Option/BUILD.gn Tue Dec 11 19:05:59 2018
@@ -0,0 +1,12 @@
+static_library("Option") {
+ output_name = "LLVMOption"
+ deps = [
+ "//llvm/lib/Support",
+ ]
+ sources = [
+ "Arg.cpp",
+ "ArgList.cpp",
+ "OptTable.cpp",
+ "Option.cpp",
+ ]
+}
Modified: llvm/trunk/utils/gn/secondary/llvm/lib/Target/targets.gni
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/gn/secondary/llvm/lib/Target/targets.gni?rev=348908&r1=348907&r2=348908&view=diff
==============================================================================
--- llvm/trunk/utils/gn/secondary/llvm/lib/Target/targets.gni (original)
+++ llvm/trunk/utils/gn/secondary/llvm/lib/Target/targets.gni Tue Dec 11 19:05:59 2018
@@ -13,9 +13,7 @@ if (llvm_targets_to_build == "host") {
}
} else if (llvm_targets_to_build == "all") {
# FIXME: Port the remaining targets.
- llvm_targets_to_build = [
- "X86",
- ]
+ llvm_targets_to_build = [ "X86" ]
}
# Validate that llvm_targets_to_build is set to a list of valid targets,
Added: llvm/trunk/utils/gn/secondary/llvm/lib/ToolDrivers/llvm-lib/BUILD.gn
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/gn/secondary/llvm/lib/ToolDrivers/llvm-lib/BUILD.gn?rev=348908&view=auto
==============================================================================
--- llvm/trunk/utils/gn/secondary/llvm/lib/ToolDrivers/llvm-lib/BUILD.gn (added)
+++ llvm/trunk/utils/gn/secondary/llvm/lib/ToolDrivers/llvm-lib/BUILD.gn Tue Dec 11 19:05:59 2018
@@ -0,0 +1,20 @@
+import("//llvm/utils/TableGen/tablegen.gni")
+
+tablegen("Options") {
+ visibility = [ ":LibDriver" ]
+ args = [ "-gen-opt-parser-defs" ]
+}
+
+static_library("LibDriver") {
+ output_name = "LLVMLibDriver"
+ deps = [
+ ":Options",
+ "//llvm/lib/BinaryFormat",
+ "//llvm/lib/Object",
+ "//llvm/lib/Option",
+ "//llvm/lib/Support",
+ ]
+ sources = [
+ "LibDriver.cpp",
+ ]
+}
Added: llvm/trunk/utils/gn/secondary/llvm/lib/WindowsManifest/BUILD.gn
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/gn/secondary/llvm/lib/WindowsManifest/BUILD.gn?rev=348908&view=auto
==============================================================================
--- llvm/trunk/utils/gn/secondary/llvm/lib/WindowsManifest/BUILD.gn (added)
+++ llvm/trunk/utils/gn/secondary/llvm/lib/WindowsManifest/BUILD.gn Tue Dec 11 19:05:59 2018
@@ -0,0 +1,11 @@
+static_library("WindowsManifest") {
+ output_name = "LLVMWindowsManifest"
+ deps = [
+ "//llvm/include/llvm/Config:config",
+ "//llvm/lib/Support",
+ "//llvm/utils/gn/build/libs/xml",
+ ]
+ sources = [
+ "WindowsManifestMerger.cpp",
+ ]
+}
More information about the llvm-commits
mailing list