Skip to content

Commit 64102cc

Browse files
authored
Change clang check to use startswith method
1 parent e65101c commit 64102cc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

xmake/modules/core/tools/gcc.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -841,7 +841,7 @@ function nf_pcheader(self, pcheaderfile, opt)
841841
if self:kind() == "cc" then
842842
local target = opt.target
843843
local pcoutputfile = target:pcoutputfile("c")
844-
if self:name() == "clang" then
844+
if self:name():startswith("clang") then
845845
return {"-include", pcheaderfile, "-include-pch", pcoutputfile}
846846
else
847847
return {"-I", path.directory(pcoutputfile), "-include", path.filename(pcheaderfile)}
@@ -854,7 +854,7 @@ function nf_pcxxheader(self, pcheaderfile, opt)
854854
if self:kind() == "cxx" then
855855
local target = opt.target
856856
local pcoutputfile = target:pcoutputfile("cxx")
857-
if self:name() == "clang" then
857+
if self:name():startswith("clang") then
858858
return {"-include", pcheaderfile, "-include-pch", pcoutputfile}
859859
else
860860
return {"-I", path.directory(pcoutputfile), "-include", path.filename(pcheaderfile)}

0 commit comments

Comments
 (0)