diff options
| author | Arthur LAURENT <[email protected]> | 2024-05-04 01:09:37 +0200 |
|---|---|---|
| committer | Arthur LAURENT <[email protected]> | 2024-05-04 01:09:37 +0200 |
| commit | 25a84c6d90c7851342f3a5ec60497f1a3304861d (patch) | |
| tree | d66b3970652a6f75cb0431ce6a84ad3c206288fc /xmake/modules/core/tools/gcc.lua | |
| parent | 9481201c2a5ee55975af0108c2da26ed681ca781 (diff) | |
improve c23 and add c++26 flags support
Diffstat (limited to 'xmake/modules/core/tools/gcc.lua')
| -rw-r--r-- | xmake/modules/core/tools/gcc.lua | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/xmake/modules/core/tools/gcc.lua b/xmake/modules/core/tools/gcc.lua index e3fa97a27..ffd3ff895 100644 --- a/xmake/modules/core/tools/gcc.lua +++ b/xmake/modules/core/tools/gcc.lua @@ -235,8 +235,10 @@ function nf_language(self, stdname) , gnu11 = "-std=gnu11" , c17 = "-std=c17" , gnu17 = "-std=gnu17" - , clatest = {"-std=c2x", "-std=c17", "-std=c11", "-std=c99", "-std=c89", "-ansi"} - , gnulatest = {"-std=c2x", "-std=gnu17", "-std=gnu11", "-std=gnu99", "-std=gnu89", "-ansi"} + , c23 = {"-std=c23", "-std=c2x"} + , gnu23 = {"-std=gnu23", "-std=gnu2x"} + , clatest = {"-std=c23", "-std=c2x", "-std=c17", "-std=c11", "-std=c99", "-std=c89", "-ansi"} + , gnulatest = {"-std=gnu23", "-std=gnu2x", "-std=gnu17", "-std=gnu11", "-std=gnu99", "-std=gnu89", "-ansi"} } end @@ -263,8 +265,12 @@ function nf_language(self, stdname) , gnuxx23 = {"-std=gnu++23", "-std=c++2b"} , cxx2b = "-std=c++2b" , gnuxx2b = "-std=gnu++2b" - , cxxlatest = {"-std=c++23", "-std=c++2b", "-std=c++20", "-std=c++2a", "-std=c++17", "-std=c++14", "-std=c++11", "-std=c++1z", "-std=c++98"} - , gnuxxlatest = {"-std=gnu++23", "-std=gnu++2b", "-std=gnu++20", "-std=gnu++2a", "-std=gnu++17", "-std=gnu++14", "-std=gnu++11", "-std=c++1z", "-std=gnu++98"} + , cxx2c = "-std=c++2c" + , gnuxx2c = "-std=gnu++2c" + , cxx26 = {"-std=c++26", "-std=c++2c"} + , gnuxx26 = {"-std=gnu++26", "-std=gnu++2c"} + , cxxlatest = {"-std=c++26", "-std=c++2c", "-std=c++23", "-std=c++2b", "-std=c++20", "-std=c++2a", "-std=c++17", "-std=c++14", "-std=c++11", "-std=c++1z", "-std=c++98"} + , gnuxxlatest = {"-std=gnu++26", "-std=gnu++2c", "-std=gnu++23", "-std=gnu++2", "-std=gnu++20", "-std=gnu++2a", "-std=gnu++17", "-std=gnu++14", "-std=gnu++11", "-std=c++1z", "-std=gnu++98"} } local cxxmaps2 = {} for k, v in pairs(_g.cxxmaps) do |
