From 64102cce59a2b26908cb11964897a13add8cf2ce Mon Sep 17 00:00:00 2001 From: ruki Date: Mon, 15 Sep 2025 23:28:17 +0800 Subject: Change clang check to use startswith method --- xmake/modules/core/tools/gcc.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 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)} -- cgit v1.3.1