diff options
| author | ruki <[email protected]> | 2025-12-26 22:34:13 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2025-12-26 22:34:13 +0800 |
| commit | fd0512ecccfc30a82356747e106ed98db45ae0cf (patch) | |
| tree | 805cffab342e1d285ef0207da51301b1bf92a5d3 | |
| parent | 946aad1e5021fd07d70a109497ca064aa14bc8c6 (diff) | |
disable c++23preview for clang-cl
| -rw-r--r-- | xmake/modules/core/tools/cl.lua | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/xmake/modules/core/tools/cl.lua b/xmake/modules/core/tools/cl.lua index 240189e4c..e5f8f7eaf 100644 --- a/xmake/modules/core/tools/cl.lua +++ b/xmake/modules/core/tools/cl.lua @@ -267,6 +267,13 @@ function nf_language(self, stdname) -- the stdc++ maps if _g.cxxmaps == nil then + -- clang-cl with c++23preview does not work for c++ modules + -- https://github.com/xmake-io/xmake/issues/7169 + local cxx23 = {"-std:c++23", "-std:c++23preview", "-std:c++latest"} + if self:name() == "clang_cl" then + cxx23 = {"-std:c++23", "-std:c++latest"} + end + local cxx2b = cxx23 _g.cxxmaps = { cxx11 = "-std:c++11" @@ -281,10 +288,10 @@ function nf_language(self, stdname) , gnuxx20 = {"-std:c++20", "-std:c++latest"} , cxx2a = {"-std:c++20", "-std:c++latest"} , gnuxx2a = {"-std:c++20", "-std:c++latest"} - , cxx23 = {"-std:c++23", "-std:c++23preview", "-std:c++latest"} - , gnuxx23 = {"-std:c++23", "-std:c++23preview", "-std:c++latest"} - , cxx2b = {"-std:c++23", "-std:c++23preview", "-std:c++latest"} - , gnuxx2b = {"-std:c++23", "-std:c++23preview", "-std:c++latest"} + , cxx23 = cxx23 + , gnuxx23 = cxx23 + , cxx2b = cxx2b + , gnuxx2b = cxx2b , cxx26 = {"-std:c++26", "-std:c++latest"} , gnuxx26 = {"-std:c++26", "-std:c++latest"} , cxxlatest = "-std:c++latest" |
