forked from OSchip/llvm-project
[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 llvm-svn: 348908
This commit is contained in:
parent
f3b0046ba9
commit
f237836fd1
|
@ -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",
|
||||
]
|
||||
}
|
|
@ -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.
|
||||
}
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
declare_args() {
|
||||
# Whether to build code that requires the Microsoft DIA SDK.
|
||||
llvm_enable_dia_sdk = false
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
static_library("Option") {
|
||||
output_name = "LLVMOption"
|
||||
deps = [
|
||||
"//llvm/lib/Support",
|
||||
]
|
||||
sources = [
|
||||
"Arg.cpp",
|
||||
"ArgList.cpp",
|
||||
"OptTable.cpp",
|
||||
"Option.cpp",
|
||||
]
|
||||
}
|
|
@ -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,
|
||||
|
|
|
@ -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",
|
||||
]
|
||||
}
|
|
@ -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",
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue