This patch adds a new Flang mode. When in Flang mode, the driver will
invoke flang for fortran inputs instead of falling back to the GCC
toolchain as it would otherwise do.
The behaviour of other driver modes are left unmodified to preserve
backwards compatibility.
It is intended that a soon to be implemented binary in the flang project
will import libclangDriver and run the clang driver in the new flang
mode.
Please note that since the binary invoked by the driver is under
development, there will no doubt be further tweaks necessary in future
commits.
* Initial support is added for basic driver phases
* -E, -fsyntax-only, -emit-llvm -S, -emit-llvm, -S, (none specified)
* -### tests are added for all of the above
* This is more than is supported by f18 so far, which will emit errors
for those options which are unimplemented.
* A test is added that ensures that clang gives a reasonable error
message if flang is not available in the path (without -###).
* Test that the driver accepts multiple inputs in --driver-mode=flang.
* Test that a combination of C and Fortran inputs run both clang and
flang in --driver-mode=flang.
* clang/test/Driver/fortran.f95 is fixed to use the correct fortran
comment character.
Differential revision: https://reviews.llvm.org/D63607
Summary:
Add RenderScript language type and associate it with ".rs" extensions.
Test that the driver passes "-x renderscript" to the frontend for ".rs"
files.
(Also add '.rs' to the list of suffixes tested by lit).
Reviewers: rsmith
Subscribers: cfe-commits, srhines
Differential Revision: http://reviews.llvm.org/D21199
llvm-svn: 272317
Summary:
Remove some of dangerous environmental variables from clang/Driver tests.
Driver tests should not rely on preset value of these variables and may
actually fail because of them.
They cannot be removed in test/lit.cfg because we still need to support
relocatable SDKs and other overwrite for other clang tests.
Reviewers: bogner
Subscribers: rnk, cfe-commits
Differential Revision: http://reviews.llvm.org/D7135
llvm-svn: 240574
clang -cc1 skips the driver so it never made sense to include these with the
Driver tests.
Basic type tests and flag tests generally both go in Frontend.
Now that the final -cc1 tests have been moved out of test/Driver, add a
local substitution to enforce and detect future mistakes.
These miscategorized tests were probably the source of confusion in r194817.
llvm-svn: 194919
to GCC when asked to compile a fortran input.
This fixes a regression with essentially every Fortran compile since we
started rejecting unknown flags. Also moves a mis-classified gfortran
flag into the nicely documented set.
llvm-svn: 192867