summaryrefslogtreecommitdiff
path: root/xmake/modules/core/tools/cl.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/modules/core/tools/cl.lua')
-rw-r--r--xmake/modules/core/tools/cl.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/xmake/modules/core/tools/cl.lua b/xmake/modules/core/tools/cl.lua
index 636bac50c..e9a3682bf 100644
--- a/xmake/modules/core/tools/cl.lua
+++ b/xmake/modules/core/tools/cl.lua
@@ -310,6 +310,9 @@ function _compile1(self, sourcefile, objectfile, incdepfile, flags)
{
function (errors)
+ -- try removing the old object file for forcing to rebuild this source file
+ os.tryrm(objectfile)
+
-- get prefix: "Note: including file:", @note maybe not english language
local including_file = errors:match("\n(.-: .-:)%s*.-\r*\n")