summaryrefslogtreecommitdiff
path: root/xmake/modules/core/tools/gcc.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2025-09-15 23:28:17 +0800
committerGitHub <[email protected]>2025-09-15 23:28:17 +0800
commit64102cce59a2b26908cb11964897a13add8cf2ce (patch)
treed14b63ac85998b3b5be26bbb0e065d038ae9ca2a /xmake/modules/core/tools/gcc.lua
parente65101c6c6a4a26f2c6188816008ee4993062dea (diff)
Change clang check to use startswith method
Diffstat (limited to 'xmake/modules/core/tools/gcc.lua')
-rw-r--r--xmake/modules/core/tools/gcc.lua4
1 files 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)}