[all-commits] [llvm/llvm-project] e6e908: [flang] Put ISO_Fortran_binding.h where it can be ...
Pete Steinfeld via All-commits
all-commits at lists.llvm.org
Thu Oct 19 07:43:24 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: e6e90840708099425b7b69dd053634ff25d4907f
https://github.com/llvm/llvm-project/commit/e6e90840708099425b7b69dd053634ff25d4907f
Author: Pete Steinfeld <47540744+psteinfeld at users.noreply.github.com>
Date: 2023-10-19 (Thu, 19 Oct 2023)
Changed paths:
M flang/CMakeLists.txt
A flang/test/Examples/ctofortran.f90
Log Message:
-----------
[flang] Put ISO_Fortran_binding.h where it can be easily used (#69121)
The update stems from the discussion in
https://discourse.llvm.org/t/adding-flang-specific-header-files-to-clang/72442
This is my second attempt at this. My first attempt was in pull request
#68756.
I decided to put ISO_Fortran_binding.h in a place where it would be
accessible with the include: "#include<ISO_Fortran_binding.h>" rather
than "#include<fortran/ISO_Fortran_binding.h>" because this is what
gfortran implements.
Note that the file is also installed into ".../include/flang", so if a
user wanted to access the file from a compiler other than clang, it
would be available.
I added a test in ".../flang/test/Examples". To make the test work, I
also needed to put ISO_Fortran_binding.h into the build area.
Although the flang project depends on clang, clang may not always be
available in a flang build. For example, when building just the
"check-flang" target, the "clang" executable may not be available at the
time the new test gets run. To account for this, I made the test's
script check for the existence of the "clang" executable. If "clang" is
not available, it simply prints "PASS". If it is available, it fully
builds and executes the test. On success, this will also print "PASS"
More information about the All-commits
mailing list