[all-commits] [llvm/llvm-project] 1c5d12: [flang] Handle Flang examples consistently with LLVM.
Slava Zakharin via All-commits
all-commits at lists.llvm.org
Tue Mar 14 13:09:13 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 1c5d12144058b4cfc3028401e8a16df933ff4dc6
https://github.com/llvm/llvm-project/commit/1c5d12144058b4cfc3028401e8a16df933ff4dc6
Author: Slava Zakharin <szakharin at nvidia.com>
Date: 2023-03-14 (Tue, 14 Mar 2023)
Changed paths:
M flang/CMakeLists.txt
M flang/cmake/modules/AddFlang.cmake
M flang/docs/FlangDriver.md
M flang/examples/CMakeLists.txt
M flang/examples/ExternalHelloWorld/CMakeLists.txt
M flang/examples/FlangOmpReport/CMakeLists.txt
M flang/examples/PrintFlangFunctionNames/CMakeLists.txt
M flang/test/CMakeLists.txt
M flang/test/Examples/print-fns-calls.f90
M flang/test/Examples/print-fns-definitions.f90
M flang/test/Examples/print-fns-interfaces.f90
M flang/test/lit.site.cfg.py.in
Log Message:
-----------
[flang] Handle Flang examples consistently with LLVM.
Without this change the problem is that flangOmpReport and
flangPrintFunctionNames libraries are not built under 'all',
but they are imported targets via LLVMExports.cmake so that
any out-of-tree build that configures upon LLVM+Flang package
will get this CMake error:
```
The imported target "flangPrintFunctionNames" references the file
".../lib/flangPrintFunctionNames.so"
but this file does not exist.
```
flang-aarch64-out-of-tree buildbot (https://lab.llvm.org/buildbot/#/builders/175)
does not catch this issue, because it does not enable Flang on the first stage.
This change gets rid of FLANG_BUILD_EXAMPLES in favor of LLVM_BUILD_EXAMPLES
and uses available LLVM CMake macros to add example executables/libraries.
Differential Revision: https://reviews.llvm.org/D145992
More information about the All-commits
mailing list