summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2023-11-07 23:07:31 +0800
committerruki <[email protected]>2023-11-07 23:07:31 +0800
commitbbbd20b8fa3e7153addba88cf9c46f72b599ae38 (patch)
tree196de5e93bb6c229601f12c3f895c6a7fb0fbe31
parent5e6d94f24963e246d8c231c8ecb49ad86c370d4d (diff)
use cl flags
-rw-r--r--xmake/modules/core/tools/clang_cl.lua70
1 files changed, 0 insertions, 70 deletions
diff --git a/xmake/modules/core/tools/clang_cl.lua b/xmake/modules/core/tools/clang_cl.lua
index 62bbb7f4d..69459ad3e 100644
--- a/xmake/modules/core/tools/clang_cl.lua
+++ b/xmake/modules/core/tools/clang_cl.lua
@@ -69,76 +69,6 @@ function init(self)
})
end
--- make the language flag
--- @see https://github.com/xmake-io/xmake/issues/2211#issuecomment-1083322178
--- https://github.com/xmake-io/xmake/issues/4353
-function nf_language(self, stdname)
-
- -- the stdc maps
- if _g.cmaps == nil then
- _g.cmaps =
- {
- -- stdc
- ansi = "-Xclang -ansi"
- , c89 = "-Xclang -std=c89"
- , gnu89 = "-Xclang -std=gnu89"
- , c99 = "-Xclang -std=c99"
- , 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
-
- -- the stdc++ maps
- if _g.cxxmaps == nil then
- _g.cxxmaps =
- {
- cxx98 = "-Xclang -std=c++98"
- , gnuxx98 = "-Xclang -std=gnu++98"
- , cxx11 = "-Xclang -std=c++11"
- , gnuxx11 = "-Xclang -std=gnu++11"
- , cxx14 = "-Xclang -std=c++14"
- , gnuxx14 = "-Xclang -std=gnu++14"
- , cxx17 = "-Xclang -std=c++17"
- , gnuxx17 = "-Xclang -std=gnu++17"
- , cxx1z = "-Xclang -std=c++1z"
- , gnuxx1z = "-Xclang -std=gnu++1z"
- , 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
- cxxmaps2[k:gsub("xx", "++")] = v
- end
- table.join2(_g.cxxmaps, cxxmaps2)
- end
-
- -- select maps
- local maps = _g.cmaps
- if self:kind() == "cxx" or self:kind() == "mxx" then
- maps = _g.cxxmaps
- end
-
- -- we select it from msvc/flags first, then select -Xclang flags
- local flags = _super.nf_language(self, stdname)
- if flags then
- flags = table.wrap(flags)
- local clang_flag = maps[stdname]
- if clang_flag then
- table.insert(flags, 2, clang_flag)
- end
- end
- return flags
-end
-
-- has color diagnostics?
function _has_color_diagnostics(self)
local colors_diagnostics = _g._HAS_COLOR_DIAGNOSTICS