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/sdar.lua | |
| parent | f0b408a9ae6a72ad4ee8ced642cbdd77dbc1f588 (diff) | |
rewrite extractor
Diffstat (limited to 'xmake/modules/core/tools/sdar.lua')
| -rw-r--r-- | xmake/modules/core/tools/sdar.lua | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/xmake/modules/core/tools/sdar.lua b/xmake/modules/core/tools/sdar.lua index c975b3608..056ca32d3 100644 --- a/xmake/modules/core/tools/sdar.lua +++ b/xmake/modules/core/tools/sdar.lua @@ -75,32 +75,3 @@ function link(self, objectfiles, targetkind, targetfile, flags) os.runv(linkargv(self, objectfiles, targetkind, targetfile, flags)) 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) - - -- enter the object directory - local oldir = os.cd(objectdir) - - -- extract it - os.runv(self:program(), {"-x", libraryfile}) - - -- 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 - - -- leave the object directory - os.cd(oldir) -end - |
