[libcxx-commits] [libcxx] [AIX] cxx_std_23 is currently not a known feature to ibm-clang (PR #66952)
Jake Egan via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Sep 20 14:03:16 PDT 2023
https://github.com/jakeegan created https://github.com/llvm/llvm-project/pull/66952
Temporary workaround for the following CMake error:
```
CMake Error in /llvm/libcxx/benchmarks/CMakeLists.txt:
The compiler feature "cxx_std_23" is not known to CXX compiler
"IBMClang"
```
>From 89affb705abe7d33a0e299c2080d6bcb4d4de884 Mon Sep 17 00:00:00 2001
From: Jake Egan <5326451+jakeegan at users.noreply.github.com>
Date: Wed, 20 Sep 2023 16:26:10 -0400
Subject: [PATCH] [AIX] cxx_std_23 is currently not a known feature to
ibm-clang
---
libcxx/benchmarks/CMakeLists.txt | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libcxx/benchmarks/CMakeLists.txt b/libcxx/benchmarks/CMakeLists.txt
index ccc98df638ae397..05467dca23e50dc 100644
--- a/libcxx/benchmarks/CMakeLists.txt
+++ b/libcxx/benchmarks/CMakeLists.txt
@@ -81,7 +81,9 @@ add_library( cxx-benchmarks-flags INTERFACE)
# requesting `cxx_std_23` results in an error -- somehow CMake fails to
# translate the `c++23` flag into `c++latest`, and the highest numbered C++
# version that MSVC flags support is C++20.
-if (MSVC)
+# ibm-clang does not recognize the cxx_std_32 flag, so use this as a temporary
+# workaround on AIX as well.
+if (MSVC OR ${CMAKE_SYSTEM_NAME} MATCHES "AIX")
add_compile_options(/std:c++latest)
else()
target_compile_features( cxx-benchmarks-flags INTERFACE cxx_std_23)
More information about the libcxx-commits
mailing list