[all-commits] [llvm/llvm-project] 6bf558: [clang][driver] Add basic --driver-mode=flang supp...
Peter Waller via All-commits
all-commits at lists.llvm.org
Wed Oct 30 03:43:24 PDT 2019
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 6bf55804924d5a1d902925ad080b1a2b57c5c75c
https://github.com/llvm/llvm-project/commit/6bf55804924d5a1d902925ad080b1a2b57c5c75c
Author: Peter Waller <peter.waller at arm.com>
Date: 2019-10-30 (Wed, 30 Oct 2019)
Changed paths:
M clang/include/clang/Driver/Driver.h
M clang/include/clang/Driver/ToolChain.h
M clang/include/clang/Driver/Types.h
M clang/lib/Driver/CMakeLists.txt
M clang/lib/Driver/Driver.cpp
M clang/lib/Driver/ToolChain.cpp
A clang/lib/Driver/ToolChains/Flang.cpp
A clang/lib/Driver/ToolChains/Flang.h
M clang/lib/Driver/Types.cpp
A clang/test/Driver/flang/Inputs/one.f90
A clang/test/Driver/flang/Inputs/other.c
A clang/test/Driver/flang/Inputs/two.f90
A clang/test/Driver/flang/flang.F90
A clang/test/Driver/flang/flang.f90
A clang/test/Driver/flang/multiple-inputs-mixed.f90
A clang/test/Driver/flang/multiple-inputs.f90
M clang/test/Driver/fortran.f95
M clang/test/Driver/lit.local.cfg
Log Message:
-----------
[clang][driver] Add basic --driver-mode=flang support for fortran
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
More information about the All-commits
mailing list