diff options
| author | ruki <[email protected]> | 2025-09-16 09:59:13 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-09-16 09:59:13 +0800 |
| commit | d0b58de6f97b93a877365ca19912fbcd94a965b2 (patch) | |
| tree | 0efa0d3bea00ef05378eb721f1c9019da40522cb /xmake/modules | |
| parent | a4b5e5682b0260c497844c3b37b1f8adbb771f78 (diff) | |
| parent | 64102cce59a2b26908cb11964897a13add8cf2ce (diff) | |
Merge pull request #6801 from bugsnotabunny/bugsnotabunny/fix-compilers-priority
Change compilers priority for gcc and clang
Diffstat (limited to 'xmake/modules')
| -rw-r--r-- | xmake/modules/core/tools/gcc.lua | 4 |
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)} |
