summaryrefslogtreecommitdiff
path: root/xmake/modules/core/tools/gcc.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2025-11-12 23:02:15 +0800
committerruki <[email protected]>2025-11-12 23:02:15 +0800
commit0f072dca50a57d8cf8ec10557a48bd8abffd30dd (patch)
treed3352ff000a9758def9c1e54d71e629c6d282b05 /xmake/modules/core/tools/gcc.lua
parent7c26b0465fa364f901e97d024d4f3b2bbb17c1fc (diff)
fix file sourcekind in gcc #7015
Diffstat (limited to 'xmake/modules/core/tools/gcc.lua')
-rw-r--r--xmake/modules/core/tools/gcc.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/xmake/modules/core/tools/gcc.lua b/xmake/modules/core/tools/gcc.lua
index 6d5f59fac..4a920a233 100644
--- a/xmake/modules/core/tools/gcc.lua
+++ b/xmake/modules/core/tools/gcc.lua
@@ -901,7 +901,7 @@ function add_sourceflags(self, sourcefile, fileconfig, target, targetkind)
-- add_files("*.c", {sourcekind = "cxx"})
--
local sourcekind = fileconfig.sourcekind
- if sourcekind and sourcekind ~= language.sourcekind_of(sourcefile) then
+ if sourcekind then
local maps = {cc = "-x c", cxx = "-x c++"}
return maps[sourcekind]
end