commit | 94c429b15406d3fcad5b3904f4c14f2e6d38aafa | [log] [tgz] |
---|---|---|
author | Nico Weber <thakis@chromium.org> | Wed Oct 17 23:38:21 2018 |
committer | Nico Weber <thakis@chromium.org> | Wed Oct 17 23:38:21 2018 |
tree | 50a436a9939202a34eac124a694b5179df9b71b2 | |
parent | ca27e1827ddc420ae37764004a93bab0cda5eb1b [diff] |
win: Pass a fake fixed /pdbsourcepath: for (non-sanitizer) symbol_level=1 builds. /pdbsourcepath: before this change here was used to tell lld-link about the build directory. The setup was that the compiler can produce debug info with relative paths in its output (to make them build-dir independent, which helps goma cache obj files), and then at link time those relative paths were made absolute. In symbol_level=1 builds, the obj files don't contain any debug info, the linker just adds enough debug info at link time to get symbolized stacks (without line numbers). So we don't need to pass a real build directory in that case and can pass a fake fixed path. (sanitizer builds do pass -gline-tables-only and hence have some debug info in the obj files even with symbol_level=1, do don't do this there). After http://reviews.llvm.org/rL344061, /pdbsourcepath: is also used as the base path in all other places that contain absolute paths: - The "cwd" stored in the env block in the pdb is /pdbsourcepath: if present - The "exe" stored in the env block in the pdb is made absolute relative to /pdbsourcepath: instead of the cwd - The "pdb" stored in the env block in the pdb is made absolute relative to /pdbsourcepath: instead of the cwd - For making absolute paths to .obj files referenced from the pdb This makes PDBs independent of the build dir in symbol_level=1 builds, and since the hash of the PDB contents are copied as PDB UUID into the executable, it makes executables reproducibe in symbol_level=1 builds too. Bug: 330260 Change-Id: Iaf0bd9f8259b3c97b5c6cff497d31d6043faa807 Reviewed-on: https://chromium-review.googlesource.com/c/1273479 Reviewed-by: Bruce Dawson <brucedawson@chromium.org> Cr-Commit-Position: refs/heads/master@{#600599}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .