From 89376b4e876467909a809d622fea762885cc6040 Mon Sep 17 00:00:00 2001 From: ruki Date: Fri, 25 Dec 2020 22:50:47 +0800 Subject: rewrite extractor --- xmake/modules/core/tools/ar.lua | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'xmake/modules/core/tools/ar.lua') diff --git a/xmake/modules/core/tools/ar.lua b/xmake/modules/core/tools/ar.lua index 31d498a57..868b4eae1 100644 --- a/xmake/modules/core/tools/ar.lua +++ b/xmake/modules/core/tools/ar.lua @@ -76,26 +76,4 @@ function link(self, objectfiles, targetkind, targetfile, flags) os.runv(program, argv, {envs = self:runenvs()}) end --- extract the static library to object directory -function extract(self, libraryfile, objectdir) - - -- make the object directory first - os.mkdir(objectdir) - - -- get the absolute path of this library - libraryfile = path.absolute(libraryfile) - - -- extract it - os.runv(self:program(), {"-x", libraryfile}, {curdir = objectdir}) - - -- check repeat object name - local repeats = {} - local objectfiles = os.iorunv(self:program(), {"-t", libraryfile}) - for _, objectfile in ipairs(objectfiles:split('\n')) do - if repeats[objectfile] then - raise("object name(%s) conflicts in library: %s", objectfile, libraryfile) - end - repeats[objectfile] = true - end -end -- cgit v1.3.1