Skip to content

[AIX] cxx_std_23 is currently not a known feature to ibm-clang #66952

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 21, 2023

Conversation

jakeegan
Copy link
Member

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"

@jakeegan jakeegan requested a review from daltenty September 20, 2023 21:03
@jakeegan jakeegan self-assigned this Sep 20, 2023
@jakeegan jakeegan requested a review from a team as a code owner September 20, 2023 21:03
@llvmbot llvmbot added the libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. label Sep 20, 2023
@llvmbot
Copy link
Member

llvmbot commented Sep 20, 2023

@llvm/pr-subscribers-libcxx

Changes

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

@ldionne
Copy link
Member

ldionne commented Sep 21, 2023

What version of Clang are you folks using on the AIX builders?

Copy link
Member

@ldionne ldionne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but we should figure out why cxx_std_23 doesn't work. I suspect that's a CMake problem if passing -std=c++23 actually works.

@jakeegan
Copy link
Member Author

What version of Clang are you folks using on the AIX builders?

For upstream, we use a version of clang 15. For downstream (where we see this issue), we use ibm-clang 17.1.2.

LGTM but we should figure out why cxx_std_23 doesn't work. I suspect that's a CMake problem if passing -std=c++23 actually works.

Thanks! Yes, this is just a temporary fix, but we plan on investigating further.

@jakeegan jakeegan merged commit 1abff08 into llvm:main Sep 21, 2023
@jakeegan jakeegan deleted the cxx_flag branch September 21, 2023 14:34
@ldionne
Copy link
Member

ldionne commented Sep 21, 2023

What version of Clang are you folks using on the AIX builders?

For upstream, we use a version of clang 15. For downstream (where we see this issue), we use ibm-clang 17.1.2.

LGTM but we should figure out why cxx_std_23 doesn't work. I suspect that's a CMake problem if passing -std=c++23 actually works.

Thanks! Yes, this is just a temporary fix, but we plan on investigating further.

Ok, great! Could you folks update your upstream compiler to 16? We're about to drop support for Clang 15 since Clang 17 has been released.

@jakeegan
Copy link
Member Author

What version of Clang are you folks using on the AIX builders?

For upstream, we use a version of clang 15. For downstream (where we see this issue), we use ibm-clang 17.1.2.

LGTM but we should figure out why cxx_std_23 doesn't work. I suspect that's a CMake problem if passing -std=c++23 actually works.

Thanks! Yes, this is just a temporary fix, but we plan on investigating further.

Ok, great! Could you folks update your upstream compiler to 16? We're about to drop support for Clang 15 since Clang 17 has been released.

Yes we have plans to update it soon. Thanks for the heads up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants