2015-02-11 05:17:52 +08:00
|
|
|
macro(add_pdb_impl_folder group)
|
|
|
|
list(APPEND PDB_IMPL_SOURCES ${ARGN})
|
|
|
|
source_group(${group} FILES ${ARGN})
|
|
|
|
endmacro()
|
|
|
|
|
2017-01-03 02:19:35 +08:00
|
|
|
if(LLVM_ENABLE_DIA_SDK)
|
2015-02-11 05:17:52 +08:00
|
|
|
include_directories(${MSVC_DIA_SDK_DIR}/include)
|
|
|
|
set(LIBPDB_LINK_FOLDERS "${MSVC_DIA_SDK_DIR}\\lib")
|
|
|
|
if (CMAKE_SIZEOF_VOID_P EQUAL 8)
|
|
|
|
set(LIBPDB_LINK_FOLDERS "${LIBPDB_LINK_FOLDERS}\\amd64")
|
|
|
|
endif()
|
2015-06-20 05:50:27 +08:00
|
|
|
file(TO_CMAKE_PATH "${LIBPDB_LINK_FOLDERS}\\diaguids.lib" LIBPDB_ADDITIONAL_LIBRARIES)
|
2015-02-11 05:17:52 +08:00
|
|
|
|
|
|
|
add_pdb_impl_folder(DIA
|
|
|
|
DIA/DIADataStream.cpp
|
|
|
|
DIA/DIAEnumDebugStreams.cpp
|
2018-10-23 16:14:53 +08:00
|
|
|
DIA/DIAEnumFrameData.cpp
|
2018-03-14 01:46:06 +08:00
|
|
|
DIA/DIAEnumInjectedSources.cpp
|
2015-02-11 05:17:52 +08:00
|
|
|
DIA/DIAEnumLineNumbers.cpp
|
2018-03-22 12:08:15 +08:00
|
|
|
DIA/DIAEnumSectionContribs.cpp
|
2015-02-11 05:17:52 +08:00
|
|
|
DIA/DIAEnumSourceFiles.cpp
|
|
|
|
DIA/DIAEnumSymbols.cpp
|
2017-11-16 22:33:09 +08:00
|
|
|
DIA/DIAEnumTables.cpp
|
2016-05-07 04:51:57 +08:00
|
|
|
DIA/DIAError.cpp
|
2018-10-23 16:14:53 +08:00
|
|
|
DIA/DIAFrameData.cpp
|
2018-03-14 01:46:06 +08:00
|
|
|
DIA/DIAInjectedSource.cpp
|
2015-02-11 05:17:52 +08:00
|
|
|
DIA/DIALineNumber.cpp
|
|
|
|
DIA/DIARawSymbol.cpp
|
2018-03-22 12:08:15 +08:00
|
|
|
DIA/DIASectionContrib.cpp
|
2015-02-11 05:17:52 +08:00
|
|
|
DIA/DIASession.cpp
|
|
|
|
DIA/DIASourceFile.cpp
|
2017-11-16 22:33:09 +08:00
|
|
|
DIA/DIATable.cpp
|
2015-02-11 05:17:52 +08:00
|
|
|
)
|
|
|
|
|
2015-02-11 11:28:02 +08:00
|
|
|
set(LIBPDB_ADDITIONAL_HEADER_DIRS "${LLVM_MAIN_INCLUDE_DIR}/llvm/DebugInfo/PDB/DIA")
|
2016-04-22 20:04:42 +08:00
|
|
|
endif()
|
2016-04-22 04:58:35 +08:00
|
|
|
|
2017-01-26 06:38:55 +08:00
|
|
|
add_pdb_impl_folder(Native
|
2017-04-28 00:11:19 +08:00
|
|
|
Native/DbiModuleDescriptor.cpp
|
|
|
|
Native/DbiModuleDescriptorBuilder.cpp
|
2017-05-05 07:53:29 +08:00
|
|
|
Native/DbiModuleList.cpp
|
2017-01-26 06:38:55 +08:00
|
|
|
Native/DbiStream.cpp
|
|
|
|
Native/DbiStreamBuilder.cpp
|
|
|
|
Native/EnumTables.cpp
|
|
|
|
Native/GlobalsStream.cpp
|
|
|
|
Native/Hash.cpp
|
|
|
|
Native/HashTable.cpp
|
|
|
|
Native/InfoStream.cpp
|
|
|
|
Native/InfoStreamBuilder.cpp
|
2019-07-17 02:04:26 +08:00
|
|
|
Native/InjectedSourceStream.cpp
|
2017-04-28 00:11:19 +08:00
|
|
|
Native/ModuleDebugStream.cpp
|
2017-03-16 04:17:58 +08:00
|
|
|
Native/NativeCompilandSymbol.cpp
|
2018-10-02 01:55:38 +08:00
|
|
|
Native/NativeEnumGlobals.cpp
|
2019-07-17 02:04:26 +08:00
|
|
|
Native/NativeEnumInjectedSources.cpp
|
2017-03-16 04:17:58 +08:00
|
|
|
Native/NativeEnumModules.cpp
|
2017-08-05 06:37:58 +08:00
|
|
|
Native/NativeEnumTypes.cpp
|
2017-03-30 03:27:08 +08:00
|
|
|
Native/NativeExeSymbol.cpp
|
2017-02-10 05:51:19 +08:00
|
|
|
Native/NativeRawSymbol.cpp
|
2018-09-18 05:08:11 +08:00
|
|
|
Native/NativeSymbolEnumerator.cpp
|
2018-10-01 00:19:18 +08:00
|
|
|
Native/NativeTypeArray.cpp
|
2018-09-07 08:12:56 +08:00
|
|
|
Native/NativeTypeBuiltin.cpp
|
|
|
|
Native/NativeTypeEnum.cpp
|
2018-09-22 06:36:28 +08:00
|
|
|
Native/NativeTypeFunctionSig.cpp
|
2018-09-08 07:21:33 +08:00
|
|
|
Native/NativeTypePointer.cpp
|
2018-10-02 01:55:38 +08:00
|
|
|
Native/NativeTypeTypedef.cpp
|
2018-09-22 06:36:04 +08:00
|
|
|
Native/NativeTypeUDT.cpp
|
2018-10-02 01:55:16 +08:00
|
|
|
Native/NativeTypeVTShape.cpp
|
2017-01-26 06:38:55 +08:00
|
|
|
Native/NamedStreamMap.cpp
|
|
|
|
Native/NativeSession.cpp
|
|
|
|
Native/PDBFile.cpp
|
|
|
|
Native/PDBFileBuilder.cpp
|
2017-05-03 02:00:13 +08:00
|
|
|
Native/PDBStringTable.cpp
|
|
|
|
Native/PDBStringTableBuilder.cpp
|
2017-01-26 06:38:55 +08:00
|
|
|
Native/PublicsStream.cpp
|
2017-08-09 12:23:25 +08:00
|
|
|
Native/GSIStreamBuilder.cpp
|
2017-01-26 06:38:55 +08:00
|
|
|
Native/RawError.cpp
|
2018-09-07 08:12:34 +08:00
|
|
|
Native/SymbolCache.cpp
|
2017-01-26 06:38:55 +08:00
|
|
|
Native/SymbolStream.cpp
|
|
|
|
Native/TpiHashing.cpp
|
|
|
|
Native/TpiStream.cpp
|
2018-04-04 08:50:22 +08:00
|
|
|
Native/TpiStreamBuilder.cpp
|
|
|
|
)
|
2016-04-26 01:38:08 +08:00
|
|
|
|
2017-01-26 06:38:55 +08:00
|
|
|
list(APPEND LIBPDB_ADDITIONAL_HEADER_DIRS "${LLVM_MAIN_INCLUDE_DIR}/llvm/DebugInfo/PDB/Native")
|
2015-02-11 11:28:02 +08:00
|
|
|
list(APPEND LIBPDB_ADDITIONAL_HEADER_DIRS "${LLVM_MAIN_INCLUDE_DIR}/llvm/DebugInfo/PDB")
|
2015-02-11 05:17:52 +08:00
|
|
|
|
[cmake] Explicitly mark libraries defined in lib/ as "Component Libraries"
Summary:
Most libraries are defined in the lib/ directory but there are also a
few libraries defined in tools/ e.g. libLLVM, libLTO. I'm defining
"Component Libraries" as libraries defined in lib/ that may be included in
libLLVM.so. Explicitly marking the libraries in lib/ as component
libraries allows us to remove some fragile checks that attempt to
differentiate between lib/ libraries and tools/ libraires:
1. In tools/llvm-shlib, because
llvm_map_components_to_libnames(LIB_NAMES "all") returned a list of
all libraries defined in the whole project, there was custom code
needed to filter out libraries defined in tools/, none of which should
be included in libLLVM.so. This code assumed that any library
defined as static was from lib/ and everything else should be
excluded.
With this change, llvm_map_components_to_libnames(LIB_NAMES, "all")
only returns libraries that have been added to the LLVM_COMPONENT_LIBS
global cmake property, so this custom filtering logic can be removed.
Doing this also fixes the build with BUILD_SHARED_LIBS=ON
and LLVM_BUILD_LLVM_DYLIB=ON.
2. There was some code in llvm_add_library that assumed that
libraries defined in lib/ would not have LLVM_LINK_COMPONENTS or
ARG_LINK_COMPONENTS set. This is only true because libraries
defined lib lib/ use LLVMBuild.txt and don't set these values.
This code has been fixed now to check if the library has been
explicitly marked as a component library, which should now make it
easier to remove LLVMBuild at some point in the future.
I have tested this patch on Windows, MacOS and Linux with release builds
and the following combinations of CMake options:
- "" (No options)
- -DLLVM_BUILD_LLVM_DYLIB=ON
- -DLLVM_LINK_LLVM_DYLIB=ON
- -DBUILD_SHARED_LIBS=ON
- -DBUILD_SHARED_LIBS=ON -DLLVM_BUILD_LLVM_DYLIB=ON
- -DBUILD_SHARED_LIBS=ON -DLLVM_LINK_LLVM_DYLIB=ON
Reviewers: beanz, smeenai, compnerd, phosek
Reviewed By: beanz
Subscribers: wuzish, jholewinski, arsenm, dschuff, jyknight, dylanmckay, sdardis, nemanjai, jvesely, nhaehnle, mgorny, mehdi_amini, sbc100, jgravelle-google, hiraditya, aheejin, fedor.sergeev, asb, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, jrtc27, MaskRay, zzheng, edward-jones, atanasyan, steven_wu, rogfer01, MartinMosbeck, brucehoult, the_o, dexonsmith, PkmX, jocewei, jsji, dang, Jim, lenary, s.egerton, pzheng, sameer.abuasal, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70179
2019-11-14 13:39:58 +08:00
|
|
|
add_llvm_component_library(LLVMDebugInfoPDB
|
2016-05-07 04:51:57 +08:00
|
|
|
GenericError.cpp
|
2015-02-11 06:43:25 +08:00
|
|
|
IPDBSourceFile.cpp
|
2015-02-07 04:30:52 +08:00
|
|
|
PDB.cpp
|
2015-04-28 01:19:51 +08:00
|
|
|
PDBContext.cpp
|
2015-02-11 06:43:25 +08:00
|
|
|
PDBExtras.cpp
|
2015-02-07 04:30:52 +08:00
|
|
|
PDBInterfaceAnchors.cpp
|
|
|
|
PDBSymbol.cpp
|
2015-02-08 08:29:29 +08:00
|
|
|
PDBSymbolAnnotation.cpp
|
|
|
|
PDBSymbolBlock.cpp
|
|
|
|
PDBSymbolCompiland.cpp
|
|
|
|
PDBSymbolCompilandDetails.cpp
|
2015-02-07 04:30:52 +08:00
|
|
|
PDBSymbolCompilandEnv.cpp
|
|
|
|
PDBSymbolCustom.cpp
|
2015-02-08 08:29:29 +08:00
|
|
|
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
|
2015-02-23 06:03:38 +08:00
|
|
|
PDBSymDumper.cpp
|
[llvm-pdbdump] More advanced class definition dumping.
Previously the dumping of class definitions was very primitive,
and it made it hard to do more than the most trivial of output
formats when dumping. As such, we would only dump one line for
each field, and then dump non-layout items like nested types
and enums.
With this patch, we do a complete analysis of the object
hierarchy including aggregate types, bases, virtual bases,
vftable analysis, etc. The only immediately visible effects
of this are that a) we can now dump a line for the vfptr where
before we would treat that as padding, and b) we now don't
treat virtual bases that come at the end of a class as padding
since we have a more detailed analysis of the class's storage
usage.
In subsequent patches, we should be able to use this analysis
to display a complete graphical view of a class's layout including
recursing arbitrarily deep into an object's base class / aggregate
member hierarchy.
llvm-svn: 300133
2017-04-13 07:18:21 +08:00
|
|
|
UDTLayout.cpp
|
2015-02-11 05:17:52 +08:00
|
|
|
${PDB_IMPL_SOURCES}
|
|
|
|
|
|
|
|
ADDITIONAL_HEADER_DIRS
|
|
|
|
${LIBPDB_ADDITIONAL_HEADER_DIRS}
|
2015-02-07 04:30:52 +08:00
|
|
|
)
|
2015-02-11 05:17:52 +08:00
|
|
|
|
2015-03-24 04:03:57 +08:00
|
|
|
target_link_libraries(LLVMDebugInfoPDB INTERFACE "${LIBPDB_ADDITIONAL_LIBRARIES}")
|