summaryrefslogtreecommitdiffstats
path: root/clang/test/Driver/compilation_database.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix the 'directory' field in DumpCompilationDatabase and add testHans Wennborg2019-09-271-2/+2
| | | | | | | This broke in r371027 due to a missing negation (llvm::sys::fs::current_path returns false on success). llvm-svn: 373049
* [clang] Get rid of "%T" expansionsKuba Mracek2017-08-151-1/+1
| | | | | | | | | | The %T lit expansion expands to a common directory shared between all the tests in the same directory, which is unexpected and unintuitive, and more importantly, it's been a source of subtle race conditions and flaky tests. In https://reviews.llvm.org/D35396, it was agreed that it would be best to simply ban %T and only keep %t, which is unique to each test. When a test needs a temporary directory, it can just create one using mkdir %t. This patch removes %T in clang. Differential Revision: https://reviews.llvm.org/D36437 llvm-svn: 310950
* Compilation database test: don't try to output to CWDSam McCall2016-12-071-4/+5
| | | | | | | | | | | | | | | Summary: Write output from compilation database test to %T rather than the working dir. Sometimes CWD isn't writable! Also specify no-canonical-prefixes so that clang has 'clang' in the name. Reviewers: bkramer Subscribers: joerg, cfe-commits Differential Revision: https://reviews.llvm.org/D27504 llvm-svn: 288892
* Fix FileCheck pattern.Joerg Sonnenberger2016-12-061-2/+2
| | | | llvm-svn: 288828
* Allow additional output since e.g. OSX appends flags likeJoerg Sonnenberger2016-12-061-2/+2
| | | | | | | | "-mlinker-version=264.3.102" automatically. Wiring down a target on the other hand is problematic as this actually needs to run codegen and doesn't work with -###. llvm-svn: 288827
* Make test case slightly more robust by explicitly passing --sysroot.Joerg Sonnenberger2016-12-061-3/+3
| | | | | | Otherwise it would change when DEFAULT_SYSROOT is provided. llvm-svn: 288823
* Allow clang to write compilation database records.Joerg Sonnenberger2016-12-061-0/+10
When integrating compilation database output into existing build systems, two approaches dominate so far. Ad-hoc implementation of the JSON output rules or using compiler wrappers. This patch adds a new option "-MJ foo.json" which gives a slightly cleaned up compilation record. The output is a fragment, i.e. you still need to add the array markers, but it allows multiple files to be easy merged. This way the only change in a build system is adding the option with potentially a per-target output file and merging the files with something like (echo '['; cat *.o.json; echo ']' > compilation_database.json or some additional filtering to remove the trailing comma for strict JSON compliance. Differential Revision: https://reviews.llvm.org/D27140 llvm-svn: 288821
OpenPOWER on IntegriCloud