Skip to content

Conversation

jinge90
Copy link
Contributor

@jinge90 jinge90 commented Sep 11, 2025

Compiler warning reported when building imf libdevice on Windows:
imf_rounding_op.hpp: warning: constexpr if is a C++17 extension [-Wc++17-extensions]

This PR fixes it.

Signed-off-by: jinge90 <ge.jin@intel.com>
@@ -73,6 +73,7 @@ if(LLVM_LIBCXX_USED)
endif()

if (WIN32)
list(APPEND compile_opts "-std=c++17")
Copy link
Contributor

Choose a reason for hiding this comment

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

I vaguely remember there being some compilers (especially on Windows) that don't like -std= and prefer /std: instead. Maybe using CXX_STANDARD could address the issue?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi, @steffenlarsen
The libdevice is built with fresh built clang during the compiler building process, so it seems to be OK to use "-std=c++" ?
Thanks very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants