summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Driver/ToolChainTest.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Use class to pass information about executable nameSerge Pavlov2017-08-291-0/+96
| | | | | | | | | | | | | Information about clang executable name components, such as target and driver mode, was passes in std::pair. With this change it is passed in a special structure. It improves readability and makes access to this information more convenient. NFC. Differential Revision: https://reviews.llvm.org/D36057 llvm-svn: 311981
* [Driver] Actually report errors during parsing instead of stopping when ↵Benjamin Kramer2017-06-301-0/+11
| | | | | | | | | | | | | | there's an error somewhere. This is a more principled version of r303756. That change was both very brittle about the state of the Diags object going into the driver and also broke tooling in funny ways. In particular it prevented tools from capturing diagnostics properly and made the compilation database logic fail to provide arguments to the tool, falling back to scanning directories for JSON files. llvm-svn: 306822
* Driver must return non-zero code on errors in command lineSerge Pavlov2017-05-241-5/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is recommit of r302775, reverted in r302777 due to a fail in clang-tidy. Original mesage is below. Now if clang driver is given wrong arguments, in some cases it continues execution and returns zero code. This change fixes this behavior. The fix revealed some errors in clang test set. File test/Driver/gfortran.f90 added in r118203 checks forwarding gfortran flags to GCC. Now driver reports error on this file, because the option -working-directory implemented in clang differs from the option with the same name implemented in gfortran, in clang the option requires argument, in gfortran does not. In the file test/Driver/arm-darwin-builtin.c clang is called with options -fbuiltin-strcat and -fbuiltin-strcpy. These option were removed in r191435 and now clang reports error on this test. File arm-default-build-attributes.s uses option -verify, which is not supported by driver, it is cc1 option. Similarly, the file split-debug.h uses options -fmodules-embed-all-files and -fmodule-format=obj, which are not supported by driver. Other revealed errors are mainly mistypes. Differential Revision: https://reviews.llvm.org/D33013 llvm-svn: 303756
* Testing commit access.Manoj Gupta2017-04-181-1/+1
| | | | | | | | | | | | | | Summary: Test commit access. Reviewers: gbiv, george.burgess.iv Reviewed By: george.burgess.iv Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D32161 llvm-svn: 300570
* [Driver] Set the default driver mode based on the executable.Zachary Turner2016-08-121-0/+25
| | | | | | | | | | | | | | | | | | Currently, if --driver-mode is not passed at all, it will default to GCC style driver. This is never an issue for clang because it manually constructs a --driver-mode option and passes it. However, we should still try to do as good as we can even if no --driver-mode is passed. LibTooling, for example, does not pass a --driver-mode option and while it could, it seems like we should still fallback to the best possible default we can. This is one of two steps necessary to get clang-tidy working on Windows. Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D23454 llvm-svn: 278535
* Minor fix in ToolChainTest.cpp to allow user defined GCC toolchain.Samuel Antao2015-10-271-4/+4
| | | | | | | If the user configured clang with a custom GCC toolchain that will take precedence on what the ToolChainTest.cpp expects to evaluate. This is fixed here by passing --gcc-toolchain= to the driver, in order to override any user defined GCC toolchain. llvm-svn: 251459
* [Driver] Use the parent_path of the clang executable as the default InstalledDirBenjamin Kramer2015-10-131-2/+41
| | | | | | | | This is what most people want anyways. Clang -cc1's main() will override this but for other tools this is the most sensible default and avoids some work. llvm-svn: 250164
* Fix VFS GCC unittest on WindowsReid Kleckner2015-10-091-0/+3
| | | | llvm-svn: 249846
* [VFS] Wire up multilib toolchain code to the VFS.Benjamin Kramer2015-10-091-3/+7
| | | | | | This lets a VFSified driver actually validate the GCC paths. llvm-svn: 249829
* [VFS] Port driver tool chains to VFS.Benjamin Kramer2015-10-071-0/+74
There are still some loose ends here but it's sufficient so we can detect GCC headers that are inside of a VFS. llvm-svn: 249556
OpenPOWER on IntegriCloud