summaryrefslogtreecommitdiff
path: root/xmake/modules/core/tools/ar.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2017-11-10 00:55:02 +0800
committerruki <[email protected]>2017-11-09 23:30:16 +0800
commitfffaaa614f5c3098f309fce4e7e6342659e5817f (patch)
treef7d9fa7bfc37ca3e906c9696a7abbe9e5cf2f783 /xmake/modules/core/tools/ar.lua
parentaa332adff92a4d51ec02b884276cded3ba9ec83c (diff)
add del_files() api
Diffstat (limited to 'xmake/modules/core/tools/ar.lua')
-rw-r--r--xmake/modules/core/tools/ar.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/xmake/modules/core/tools/ar.lua b/xmake/modules/core/tools/ar.lua
index 57e16c9a2..650ca7b27 100644
--- a/xmake/modules/core/tools/ar.lua
+++ b/xmake/modules/core/tools/ar.lua
@@ -68,6 +68,9 @@ function link(self, objectfiles, targetkind, targetfile, flags)
-- ensure the target directory
os.mkdir(path.directory(targetfile))
+ -- @note remove the previous archived file first to force recreating a new file
+ os.tryrm(targetfile)
+
-- link it
os.runv(linkargv(self, objectfiles, targetkind, targetfile, flags))
end