summaryrefslogtreecommitdiffstats
path: root/clang/test/Driver/cl-options.c
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2019-06-17 12:10:40 +0000
committerNico Weber <nicolasweber@gmx.de>2019-06-17 12:10:40 +0000
commit37b753368238cd25868632960f477d25f973b977 (patch)
tree3e53c6db11008c0e6e6d2d418deb2084b383f9da /clang/test/Driver/cl-options.c
parent83773b77a5a45592426a2e8011a36dc1fa19aedc (diff)
downloadbcm5719-llvm-37b753368238cd25868632960f477d25f973b977.tar.gz
bcm5719-llvm-37b753368238cd25868632960f477d25f973b977.zip
Promote -fdebug-compilation-dir from a cc1 flag to clang and clang-cl driver flags
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. (The tradeoff is that the debugger needs explicit configuration to know the build directory. See also http://dwarfstd.org/ShowIssue.php?issue=171130.2) Differential Revision: https://reviews.llvm.org/D63387 llvm-svn: 363548
Diffstat (limited to 'clang/test/Driver/cl-options.c')
-rw-r--r--clang/test/Driver/cl-options.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/test/Driver/cl-options.c b/clang/test/Driver/cl-options.c
index 4b41720441a..2b71bd044b6 100644
--- a/clang/test/Driver/cl-options.c
+++ b/clang/test/Driver/cl-options.c
@@ -619,6 +619,7 @@
// RUN: -fno-coverage-mapping \
// RUN: -fdiagnostics-color \
// RUN: -fno-diagnostics-color \
+// RUN: -fdebug-compilation-dir . \
// RUN: -fdiagnostics-parseable-fixits \
// RUN: -fdiagnostics-absolute-paths \
// RUN: -ferror-limit=10 \
OpenPOWER on IntegriCloud