[all-commits] [llvm/llvm-project] dda366: [flang][cmake] Make CMake copy "omp_lib.h" into th...
Andrzej Warzyński via All-commits
all-commits at lists.llvm.org
Tue Apr 5 01:25:54 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: dda366ed37cec7b2f7c96a47b1b32391b514d969
https://github.com/llvm/llvm-project/commit/dda366ed37cec7b2f7c96a47b1b32391b514d969
Author: Andrzej Warzynski <andrzej.warzynski at arm.com>
Date: 2022-04-05 (Tue, 05 Apr 2022)
Changed paths:
M flang/lib/Frontend/CompilerInvocation.cpp
A flang/test/Driver/include-omp-header.f90
M flang/tools/f18/CMakeLists.txt
Log Message:
-----------
[flang][cmake] Make CMake copy "omp_lib.h" into the build directory
Any header or module file in the Flang source directory is of no use to
the compiler unless it is copied into the build directory. Indeed, all
compiler search paths are relative to the compiler executable (flang-new
in our case). Hence, "omp_lib.h" should be copied into the build
directory alongside other compiler-provided files that can be "included"
(header files) or "used" (module files).
For now, "omp_lib.h" is copied into "<build-dir>/include/flang/OpenMP".
We may decide to change this in future. For example, Clang copies a
bunch of runtime headers into “<build-dir>/lib/clang/<version-number>”.
We could also consider using a similar header from a different
sub-project.
Flang's driver search path is updated accordingly. A rule for
"installing" the "omp_lib.h" header is _yet to be added_ (we will also
need to determine the suitable location for this).
Differential Revision: https://reviews.llvm.org/D122015
More information about the All-commits
mailing list