summaryrefslogtreecommitdiff
path: root/xmake/modules/core/tools/gcc.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/gcc.lua
parent94f00ffc6d2e70316b8200f33ba6caeffce8674a (diff)
fix rebuild source file when compiling fails
Diffstat (limited to 'xmake/modules/core/tools/gcc.lua')
-rw-r--r--xmake/modules/core/tools/gcc.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/xmake/modules/core/tools/gcc.lua b/xmake/modules/core/tools/gcc.lua
index 254f3301a..20192cf85 100644
--- a/xmake/modules/core/tools/gcc.lua
+++ b/xmake/modules/core/tools/gcc.lua
@@ -397,7 +397,10 @@ function _compile1(self, sourcefile, objectfile, incdepfile, flags)
{
function (errors)
- -- compiling errors
+ -- try removing the old object file for forcing to rebuild this source file
+ os.tryrm(objectfile)
+
+ -- raise compiling errors
os.raise(errors)
end
},