[llvm] Allow flang-new binary to be specified for omp fortran modules (PR #101438)
Daniel Martinez via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 26 13:01:39 PST 2024
https://github.com/Calandracas606 updated https://github.com/llvm/llvm-project/pull/101438
>From a372a27c58624fdcc28194ce3f718ad80351ae5c Mon Sep 17 00:00:00 2001
From: Daniel Martinez <danielmartinez at cock.li>
Date: Wed, 31 Jul 2024 21:14:52 -0400
Subject: [PATCH] Allow flang binary to be specified for omp modules
This allows the path of the flang binary to be specified as a
cmake configuration.
This is useful when cross compiling, as flang-new may exist
on the build machine, which should be used instead of the host.
For example, by passing "-DLIBOMP_FORTRAN_MODULES_COMPILER=/usr/bin/flang",
that binary will be used instead of just built host compiler.
---
llvm/runtimes/CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/llvm/runtimes/CMakeLists.txt b/llvm/runtimes/CMakeLists.txt
index 57a56c6a604153..460243b072c67c 100644
--- a/llvm/runtimes/CMakeLists.txt
+++ b/llvm/runtimes/CMakeLists.txt
@@ -505,7 +505,7 @@ if(build_runtimes)
if("openmp" IN_LIST LLVM_ENABLE_RUNTIMES)
if (${LLVM_TOOL_FLANG_BUILD})
message(STATUS "Configuring build of omp_lib.mod and omp_lib_kinds.mod via flang")
- set(LIBOMP_FORTRAN_MODULES_COMPILER "${CMAKE_BINARY_DIR}/bin/flang")
+ set(LIBOMP_FORTRAN_MODULES_COMPILER "${CMAKE_BINARY_DIR}/bin/flang" CACHE INTERNAL "")
set(LIBOMP_MODULES_INSTALL_PATH "${CMAKE_INSTALL_INCLUDEDIR}/flang")
# TODO: This is a workaround until flang becomes a first-class project
# in llvm/CMakeList.txt. Until then, this line ensures that flang is
More information about the llvm-commits
mailing list