summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2025-10-08 23:02:59 +0800
committerruki <[email protected]>2025-10-08 23:02:59 +0800
commit888f5c3b5452b2b8c6c47e89028c4449a238e31f (patch)
tree571a09cc0f74115f988435094cf88af17ad930f5
parentc806f76448f48e317c6ea91c02e50eaeee28f451 (diff)
improve sourceflags for cl #6898
-rw-r--r--xmake/modules/core/tools/cl.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/xmake/modules/core/tools/cl.lua b/xmake/modules/core/tools/cl.lua
index 25b5da339..0a6416ded 100644
--- a/xmake/modules/core/tools/cl.lua
+++ b/xmake/modules/core/tools/cl.lua
@@ -447,7 +447,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 = "-TC", cxx = "-TP"}
return maps[sourcekind]
end