diff options
| -rw-r--r-- | xmake/modules/core/tools/gcc.lua | 4 | ||||
| -rw-r--r-- | xmake/toolchains/clang/xmake.lua | 4 | ||||
| -rw-r--r-- | xmake/toolchains/gcc/xmake.lua | 4 | ||||
| -rw-r--r-- | xmake/toolchains/llvm/xmake.lua | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/xmake/modules/core/tools/gcc.lua b/xmake/modules/core/tools/gcc.lua index e27fb3401..5824ae40d 100644 --- a/xmake/modules/core/tools/gcc.lua +++ b/xmake/modules/core/tools/gcc.lua @@ -841,7 +841,7 @@ function nf_pcheader(self, pcheaderfile, opt) if self:kind() == "cc" then local target = opt.target local pcoutputfile = target:pcoutputfile("c") - if self:name() == "clang" then + if self:name():startswith("clang") then return {"-include", pcheaderfile, "-include-pch", pcoutputfile} else return {"-I", path.directory(pcoutputfile), "-include", path.filename(pcheaderfile)} @@ -854,7 +854,7 @@ function nf_pcxxheader(self, pcheaderfile, opt) if self:kind() == "cxx" then local target = opt.target local pcoutputfile = target:pcoutputfile("cxx") - if self:name() == "clang" then + if self:name():startswith("clang") then return {"-include", pcheaderfile, "-include-pch", pcoutputfile} else return {"-I", path.directory(pcoutputfile), "-include", path.filename(pcheaderfile)} diff --git a/xmake/toolchains/clang/xmake.lua b/xmake/toolchains/clang/xmake.lua index 321a0a7dc..bafffd95d 100644 --- a/xmake/toolchains/clang/xmake.lua +++ b/xmake/toolchains/clang/xmake.lua @@ -31,7 +31,7 @@ toolchain("clang" .. suffix) set_runtimes("c++_static", "c++_shared", "stdc++_static", "stdc++_shared") set_toolset("cc", "clang" .. suffix) - set_toolset("cxx", "clang" .. suffix, "clang++" .. suffix) + set_toolset("cxx", "clang++" .. suffix, "clang" .. suffix) set_toolset("ld", "clang++" .. suffix, "clang" .. suffix) set_toolset("sh", "clang++" .. suffix, "clang" .. suffix) set_toolset("ar", "ar", "llvm-ar" .. suffix) @@ -39,7 +39,7 @@ toolchain("clang" .. suffix) set_toolset("ranlib", "ranlib", "llvm-ranlib" .. suffix) set_toolset("objcopy", "objcopy", "llvm-objcopy" .. suffix) set_toolset("mm", "clang" .. suffix) - set_toolset("mxx", "clang" .. suffix, "clang++" .. suffix) + set_toolset("mxx", "clang++" .. suffix, "clang" .. suffix) set_toolset("as", "clang" .. suffix) set_toolset("mrc", "llvm-rc" .. suffix) set_toolset("dlltool", "llvm-dlltool" .. suffix) diff --git a/xmake/toolchains/gcc/xmake.lua b/xmake/toolchains/gcc/xmake.lua index aa4688abb..31954ad79 100644 --- a/xmake/toolchains/gcc/xmake.lua +++ b/xmake/toolchains/gcc/xmake.lua @@ -31,7 +31,7 @@ toolchain("gcc" .. suffix) set_runtimes("stdc++_static", "stdc++_shared") set_toolset("cc", "gcc" .. suffix) - set_toolset("cxx", "gcc" .. suffix, "g++" .. suffix) + set_toolset("cxx", "g++" .. suffix, "gcc" .. suffix) set_toolset("ld", "g++" .. suffix, "gcc" .. suffix) set_toolset("sh", "g++" .. suffix, "gcc" .. suffix) set_toolset("ar", "ar") @@ -39,7 +39,7 @@ toolchain("gcc" .. suffix) set_toolset("objcopy", "objcopy") set_toolset("ranlib", "ranlib") set_toolset("mm", "gcc" .. suffix) - set_toolset("mxx", "gcc" .. suffix, "g++" .. suffix) + set_toolset("mxx", "g++" .. suffix, "gcc" .. suffix) set_toolset("as", "gcc" .. suffix) on_check(function (toolchain) diff --git a/xmake/toolchains/llvm/xmake.lua b/xmake/toolchains/llvm/xmake.lua index 2a4643ec6..de2e775d7 100644 --- a/xmake/toolchains/llvm/xmake.lua +++ b/xmake/toolchains/llvm/xmake.lua @@ -25,8 +25,8 @@ toolchain("llvm") set_runtimes("c++_static", "c++_shared", "stdc++_static", "stdc++_shared") set_toolset("cc", "clang") - set_toolset("cxx", "clang", "clang++") - set_toolset("mxx", "clang", "clang++") + set_toolset("cxx", "clang++", "clang") + set_toolset("mxx", "clang++", "clang") set_toolset("mm", "clang") set_toolset("cpp", "clang -E") set_toolset("as", "clang") |
