[all-commits] [llvm/llvm-project] 4d50b4: [libc++] Remap headers in the debug info when buil...
Louis Dionne via All-commits
all-commits at lists.llvm.org
Mon Jun 9 13:52:50 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 4d50b405f1585ce172f87cb5f8daf3c1b4145215
https://github.com/llvm/llvm-project/commit/4d50b405f1585ce172f87cb5f8daf3c1b4145215
Author: Louis Dionne <ldionne.2 at gmail.com>
Date: 2025-06-09 (Mon, 09 Jun 2025)
Changed paths:
M libcxx/include/CMakeLists.txt
Log Message:
-----------
[libc++] Remap headers in the debug info when building the library (#143004)
The libc++ build includes a step where headers are generated. This is
required in order to preprocess some files such as the assertion handler
and the __config_site header. As a result, the library is built against
headers located inside the build directory, and the path to those
headers is what's included in the debug information of the library.
However, these headers in the build directory are usually not
persistent, which means that the debug information might end up
referring to headers that don't exist anymore. To solve this problem,
this patch uses the -fdebug-prefix-map flag supported by Clang and GCC
to remap the generated headers to the original headers in the source
directory. This provides the illusion that the library was truly built
against the in-source version of the headers.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list