[flang-commits] [flang] cbeae3e - [Flang] Fix libquadmath in non-LLVM_ENABLE_RUNTIMES build.
Michael Kruse via flang-commits
flang-commits at lists.llvm.org
Wed Mar 12 06:55:43 PDT 2025
Author: Michael Kruse
Date: 2025-03-12T14:55:09+01:00
New Revision: cbeae3e117b8fb78e61ad7b49702a7d8033a529d
URL: https://github.com/llvm/llvm-project/commit/cbeae3e117b8fb78e61ad7b49702a7d8033a529d
DIFF: https://github.com/llvm/llvm-project/commit/cbeae3e117b8fb78e61ad7b49702a7d8033a529d.diff
LOG: [Flang] Fix libquadmath in non-LLVM_ENABLE_RUNTIMES build.
The LLVM_ENABLE_RUNTIMES build introduced a new configure-time header
quadmath_wrapper.h. Also create the header in non-LLVM_ENABLE_RUNTIMES
builds.
Added:
Modified:
flang/runtime/CMakeLists.txt
Removed:
################################################################################
diff --git a/flang/runtime/CMakeLists.txt b/flang/runtime/CMakeLists.txt
index fbd1e1e2cc56e..f9378d4ed4312 100644
--- a/flang/runtime/CMakeLists.txt
+++ b/flang/runtime/CMakeLists.txt
@@ -132,6 +132,12 @@ elseif (CMAKE_CXX_COMPILER_ID MATCHES "XL")
set(NO_RTTI_FLAGS "-qnoeh -qnortti")
endif ()
+# When compiling LLVM_ENABLE_RUNTIMES=flang-rt, the build system looks for the
+# full path of quadmath.h. In this non-runtimes build, preserve the old behavior
+# of just including <quadmath.h>.
+set(FLANG_RT_INCLUDE_QUADMATH_H "<quadmath.h>")
+configure_file("${FLANG_RT_SOURCE_DIR}/cmake/quadmath_wrapper.h.in" "quadmath_wrapper.h")
+
configure_file("${FLANG_RT_SOURCE_DIR}/cmake/config.h.cmake.in" config.h)
# include_directories is used here instead of target_include_directories
# because add_flang_library creates multiple objects (STATIC/SHARED, OBJECT)
More information about the flang-commits
mailing list