This is an archive of the discontinued LLVM Phabricator instance.

Allow forwarding -fdebug-compilation-dir to cc1as
ClosedPublic

Authored by thakis on Dec 6 2018, 10:34 AM.

Details

Summary

The flag -fdebug-compilation-dir is useful to make generated .o files independent of the path of the build directory, without making the compile command-line dependent on the path of the build directory, like -fdebug-prefix-map requires. This change makes it so that the driver can forward the flag to -cc1as, like it already can for -cc1. We might want to consider making -fdebug-compilation-dir a driver flag in a follow-up.

(Since -fdebug-compilation-dir defaults to PWD, it's already possible to get this effect by setting PWD, but explicit compiler flags are better than env vars, because e.g. ninja tracks command lines and reruns commands that change.)

Somewhat related to PR14625.

Diff Detail

Repository
rL LLVM

Event Timeline

thakis created this revision.Dec 6 2018, 10:34 AM
hans accepted this revision.Dec 6 2018, 10:50 AM
hans added a subscriber: hans.

lgtm

This revision is now accepted and ready to land.Dec 6 2018, 10:50 AM
This revision was automatically updated to reflect the committed changes.