summaryrefslogtreecommitdiffstats
path: root/unittests/Driver
Commit message (Collapse)AuthorAgeFilesLines
* [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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@306822 91177308-0d34-0410-b5e6-96231b3b80d8
* 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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@303756 91177308-0d34-0410-b5e6-96231b3b80d8
* 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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@300570 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix shared library build after r291938 by adding missing dependency on libOptionDavid Blaikie2017-01-131-0/+1
| | | | | | Thanks to Reid Kleckner for the help reproducing/fixing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@291953 91177308-0d34-0410-b5e6-96231b3b80d8
* [Driver] Add unit tests for Distro detectionMichal Gorny2016-11-282-0/+306
| | | | | | | | | | | | | Add a set of unit tests for the distro detection code. The tests use an in-memory virtual filesystems resembling release files for various distributions supported. All release files are provided (not only the ones directly used) in order to guarantee that one of the rules will not mistakenly recognize the distribution incorrectly due to the additional files (e.g. Ubuntu as Debian). Differential Revision: https://reviews.llvm.org/D25869 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@288062 91177308-0d34-0410-b5e6-96231b3b80d8
* [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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@278535 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove autoconf supportChris Bieneman2016-01-261-16/+0
| | | | | | | | | | | | | | | | | Summary: This patch is provided in preparation for removing autoconf on 1/26. The proposal to remove autoconf on 1/26 was discussed on the llvm-dev thread here: http://lists.llvm.org/pipermail/llvm-dev/2016-January/093875.html "This is the way [autoconf] ends Not with a bang but a whimper." -T.S. Eliot Reviewers: chandlerc, grosbach, bob.wilson, echristo Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D16472 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@258862 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251459 91177308-0d34-0410-b5e6-96231b3b80d8
* [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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@250164 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix VFS GCC unittest on WindowsReid Kleckner2015-10-091-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@249846 91177308-0d34-0410-b5e6-96231b3b80d8
* [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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@249829 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a shared CMake build by linking with libclangBasic.Benjamin Kramer2015-10-071-0/+1
| | | | | | Patch by Jan Vesely! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@249608 91177308-0d34-0410-b5e6-96231b3b80d8
* [VFS] Port driver tool chains to VFS.Benjamin Kramer2015-10-072-0/+75
| | | | | | | There are still some loose ends here but it's sufficient so we can detect GCC headers that are inside of a VFS. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@249556 91177308-0d34-0410-b5e6-96231b3b80d8
* Update unit test for r232916.Benjamin Kramer2015-03-221-7/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@232918 91177308-0d34-0410-b5e6-96231b3b80d8
* [Driver] clang::driver::getARMCPUForMArch() moved to ↵Argyrios Kyrtzidis2014-07-112-32/+0
| | | | | | | | | llvm::Triple::getARMCPUForArch(). Depends on llvm r212846. Suggested by Eric Christopher. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212858 91177308-0d34-0410-b5e6-96231b3b80d8
* [Driver/Unittests] Follow up for r212666, add unit test for the newly ↵Argyrios Kyrtzidis2014-07-102-0/+32
| | | | | | exposed getARMCPUForMArch() function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212751 91177308-0d34-0410-b5e6-96231b3b80d8
* [cleanup] Re-sort includes with llvm/utils/sort_includes.py and fixChandler Carruth2014-03-041-2/+2
| | | | | | | | | | | | a missing include from CLog.h. CLog.h referenced most of the core libclang types but never directly included Index.h that provides them. Previously it got lucky and other headers were always included first but with the sorting it ended up first in one case and stopped compiling. Adding the Index.h include fixes it right up. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202810 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch all uses of LLVM_OVERRIDE to just use 'override' directly.Craig Topper2014-03-021-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202625 91177308-0d34-0410-b5e6-96231b3b80d8
* Add Multilib selection machineryJonathan Roelofs2014-02-123-0/+383
| | | | | | | | | | | | | | This patch improves the support for picking Multilibs from gcc installations. It also provides a better approximation for the flags '-print-multi-directory' and '-print-multi-lib'. This reverts r201203 (i.e. re-applying r201202 with small fixes in unittests/CMakeLists.txtto make the build bots happy). review: http://llvm-reviews.chandlerc.com/D2538 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201205 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert 201202Jonathan Roelofs2014-02-123-383/+0
| | | | | | | Breaks cmake configure of new unit tests directory git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201203 91177308-0d34-0410-b5e6-96231b3b80d8
* Add Multilib selection machineryJonathan Roelofs2014-02-123-0/+383
This patch improves the support for picking Multilibs from gcc installations. It also provides a better approximation for the flags '-print-multi-directory' and '-print-multi-lib'. review: http://llvm-reviews.chandlerc.com/D2538 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201202 91177308-0d34-0410-b5e6-96231b3b80d8