summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2021-09-26 23:12:02 +0800
committerruki <[email protected]>2021-09-26 23:12:02 +0800
commitd00138d98064b84db0c76dde99587b5ea425fdf4 (patch)
tree6522190484e42bc8cc36afafb48c9c163c7717bd
parent57222b35a8c1ba36d5487345e4fb16b40d07fd0e (diff)
improve languages
-rw-r--r--xmake/modules/core/tools/clang_cl.lua10
-rw-r--r--xmake/modules/core/tools/nvcc.lua1
-rw-r--r--xmake/modules/core/tools/sdcc.lua2
3 files changed, 11 insertions, 2 deletions
diff --git a/xmake/modules/core/tools/clang_cl.lua b/xmake/modules/core/tools/clang_cl.lua
index 4e0046fe8..9c4236343 100644
--- a/xmake/modules/core/tools/clang_cl.lua
+++ b/xmake/modules/core/tools/clang_cl.lua
@@ -117,6 +117,10 @@ function nf_language(self, stdname)
, gnu99 = "-Xclang -std=gnu99"
, c11 = "-Xclang -std=c11"
, gnu11 = "-Xclang -std=gnu11"
+ , c17 = "-Xclang -std=c17"
+ , gnu17 = "-Xclang -std=gnu17"
+ , clatest = "-Xclang -std=c17"
+ , gnulatest = "-Xclang -std=gnu17"
}
end
@@ -134,10 +138,12 @@ function nf_language(self, stdname)
, gnuxx17 = "-Xclang -std=gnu++17"
, cxx1z = "-Xclang -std=c++1z"
, gnuxx1z = "-Xclang -std=gnu++1z"
- , cxx20 = "-Xclang -std=c++2a"
- , gnuxx20 = "-Xclang -std=gnu++2a"
+ , cxx20 = "-Xclang -std=c++20"
+ , gnuxx20 = "-Xclang -std=gnu++20"
, cxx2a = "-Xclang -std=c++2a"
, gnuxx2a = "-Xclang -std=gnu++2a"
+ , cxxlatest = "-Xclang -std=c++latest"
+ , gnuxxlatest = "-Xclang -std=gnu++latest"
}
local cxxmaps2 = {}
for k, v in pairs(_g.cxxmaps) do
diff --git a/xmake/modules/core/tools/nvcc.lua b/xmake/modules/core/tools/nvcc.lua
index 41093c502..b5e41367f 100644
--- a/xmake/modules/core/tools/nvcc.lua
+++ b/xmake/modules/core/tools/nvcc.lua
@@ -179,6 +179,7 @@ function nf_language(self, stdname)
, cxx11 = "--std c++11"
, cxx14 = "--std c++14"
, cxx17 = "--std c++17"
+ , cxxlatest = "--std c++17"
}
local cxxmaps2 = {}
for k, v in pairs(_g.cxxmaps) do
diff --git a/xmake/modules/core/tools/sdcc.lua b/xmake/modules/core/tools/sdcc.lua
index 00e081384..d2aece2e1 100644
--- a/xmake/modules/core/tools/sdcc.lua
+++ b/xmake/modules/core/tools/sdcc.lua
@@ -116,6 +116,8 @@ function nf_language(self, stdname)
, gnu11 = "--std-sdcc11"
, c20 = "--std-c2x"
, gnu20 = "--std-sdcc2x"
+ , clatest = "--std-c2x"
+ , gnulatest = "--std-sdcc2x"
}
end
return _g.cmaps[stdname]