summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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