hanchenye-llvm-project/lld/test
Nico Weber 0bd2d304e6 lld-link: Set PDB GUID to hash of PDB contents instead of to a random byte sequence.
Previously, lld-link would use a random byte sequence as the PDB GUID. Instead,
use a hash of the PDB file contents.

To not disturb llvm-pdbutil pdb2yaml, the hash generation is an opt-in feature
on InfoStreamBuilder and ldb/COFF/PDB.cpp always sets it.

Since writing the PDB computes this ID which also goes in the exe, the PDB
writing code now must be called before writeBuildId(). writeBuildId() for that
reason is no longer included in the "Code Layout" timer.

Since the PDB GUID is now a function of the PDB contents, the PDB Age is always
set to 1. There was a long comment above loadExistingBuildId (now gone) about
how not changing the GUID and only incrementing the age was important, but
according to the discussion in PR35914 that comment was incorrect.

Differential Revision: https://reviews.llvm.org/D51956

llvm-svn: 342334
2018-09-15 18:37:22 +00:00
..
COFF lld-link: Set PDB GUID to hash of PDB contents instead of to a random byte sequence. 2018-09-15 18:37:22 +00:00
Driver/Inputs
ELF lld: add -z interpose support 2018-09-14 14:25:37 +00:00
MinGW [MinGW] Hook up the --require-defined option to -include: 2018-09-10 17:41:40 +00:00
Unit
darwin [Darwin] Do not error on '-lto_library' option 2018-06-13 18:59:14 +00:00
mach-o [lit, python] Always add quotes around the python path in lit 2018-08-06 22:37:49 +00:00
wasm [WebAssembly] Don't compress LEBs by default 2018-08-17 19:42:46 +00:00
CMakeLists.txt [CMake] Add an lld-test-depends target 2018-08-29 17:30:45 +00:00
lit.cfg.py Support RISC-V 2018-08-09 17:59:56 +00:00
lit.site.cfg.py.in Import lit.llvm after rLLD341134 2018-08-31 00:23:09 +00:00