Skip to content

Commit cbeae3e

Browse files
committed
[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.
1 parent 5da9044 commit cbeae3e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

flang/runtime/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,12 @@ elseif (CMAKE_CXX_COMPILER_ID MATCHES "XL")
132132
set(NO_RTTI_FLAGS "-qnoeh -qnortti")
133133
endif ()
134134

135+
# When compiling LLVM_ENABLE_RUNTIMES=flang-rt, the build system looks for the
136+
# full path of quadmath.h. In this non-runtimes build, preserve the old behavior
137+
# of just including <quadmath.h>.
138+
set(FLANG_RT_INCLUDE_QUADMATH_H "<quadmath.h>")
139+
configure_file("${FLANG_RT_SOURCE_DIR}/cmake/quadmath_wrapper.h.in" "quadmath_wrapper.h")
140+
135141
configure_file("${FLANG_RT_SOURCE_DIR}/cmake/config.h.cmake.in" config.h)
136142
# include_directories is used here instead of target_include_directories
137143
# because add_flang_library creates multiple objects (STATIC/SHARED, OBJECT)

0 commit comments

Comments
 (0)