diff options
| author | ruki <[email protected]> | 2020-12-25 22:50:47 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-12-25 22:50:47 +0800 |
| commit | 89376b4e876467909a809d622fea762885cc6040 (patch) | |
| tree | e2682fc01e6e6ab02da9577185e7d92ab0c013ae /xmake/modules/core/tools/ar.lua | |
| parent | f0b408a9ae6a72ad4ee8ced642cbdd77dbc1f588 (diff) | |
rewrite extractor
Diffstat (limited to 'xmake/modules/core/tools/ar.lua')
| -rw-r--r-- | xmake/modules/core/tools/ar.lua | 22 |
1 files changed, 0 insertions, 22 deletions
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 |
