[libcxx-commits] [libcxx] [AIX] cxx_std_23 is currently not a known feature to ibm-clang (PR #66952)

via libcxx-commits libcxx-commits at lists.llvm.org
Wed Sep 20 14:04:27 PDT 2023


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libcxx

<details>
<summary>Changes</summary>

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"
```

---
Full diff: https://github.com/llvm/llvm-project/pull/66952.diff


1 Files Affected:

- (modified) libcxx/benchmarks/CMakeLists.txt (+3-1) 


``````````diff
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)

``````````

</details>


https://github.com/llvm/llvm-project/pull/66952


More information about the libcxx-commits mailing list