[flang-commits] [clang] [flang] [RFC][flang][runtime] Add FortranFloat128Math wrapper library. (PR #81971)
via flang-commits
flang-commits at lists.llvm.org
Wed May 15 13:22:02 PDT 2024
dpalermo wrote:
I am seeing build errors on systems running cmake versions 3.22.1 and 3.24.3:
```
FAILED: tools/flang/unittests/Evaluate/CMakeFiles/uint128.test.dir/uint128.cpp.o
/usr/bin/c++ -D-DFLANG_RUNTIME_F128_MATH_LIB=\"libquadmath\" -DFLANG_INCLUDE_TESTS=1 -DFLANG_LITTLE_ENDIAN=1 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS ...
...
<command-line>: error: macro names must be identifiers
```
Systems running 3.28.1 build without problem.
The problem can be resolved by removing the stray '-D' in the call to add_compile_definitions:
```
diff --git a/flang/CMakeLists.txt b/flang/CMakeLists.txt
index c8e75024823f..af34366b3652 100644
--- a/flang/CMakeLists.txt
+++ b/flang/CMakeLists.txt
@@ -336,7 +336,7 @@ endif()
if (FLANG_RUNTIME_F128_MATH_LIB)
add_compile_definitions(
- -DFLANG_RUNTIME_F128_MATH_LIB="${FLANG_RUNTIME_F128_MATH_LIB}"
+ FLANG_RUNTIME_F128_MATH_LIB="${FLANG_RUNTIME_F128_MATH_LIB}"
)
endif()
```
https://github.com/llvm/llvm-project/pull/81971
More information about the flang-commits
mailing list