summaryrefslogtreecommitdiff
path: root/xmake/modules/core/tools/cl.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2017-07-31 09:16:31 +0800
committerruki <[email protected]>2017-07-31 09:16:31 +0800
commitfa9702bfcf4ba7ed2b599727913444cc3498bfda (patch)
tree444daea100eefb93a662529ebbc01e20d7e0ba50 /xmake/modules/core/tools/cl.lua
parent94f00ffc6d2e70316b8200f33ba6caeffce8674a (diff)
fix rebuild source file when compiling fails
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")