The flag is useful when wanting to create .o files that are independent
from the absolute path to the build directory. -fdebug-prefix-map= can
be used to the same effect, but it requires putting the absolute path
to the build directory on the build command line, so it still requires
the build command line to be dependent on the absolute path of the build
directory. With this flag, "-fdebug-compilation-dir ." makes it so that
both debug info and the compile command itself are independent of the
absolute path of the build directory, which is good for build
determinism (in the sense that the build is independent of which
directory it happens in) and for caching compile results.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
lgtm
clang/include/clang/Driver/Options.td | ||
---|---|---|
717 | Maybe mention in the commit message that it's not just a driver-level option, but also available in clang-cl (which makes sense I think). |
Maybe mention in the commit message that it's not just a driver-level option, but also available in clang-cl (which makes sense I think).