diff options
| author | ruki <[email protected]> | 2021-09-04 23:46:20 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2021-09-04 23:46:20 +0800 |
| commit | 1e4cd9f26fdae27e8253f5b214260830d719953b (patch) | |
| tree | 0a32922e28f31d51c7eb2474c12dd9d4a03a85ea | |
| parent | b54c309384c334c265072e15a23692e52f11b0b7 (diff) | |
mergelib for lib.exe
| -rw-r--r-- | xmake/modules/utils/archive/merge_staticlib.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/xmake/modules/utils/archive/merge_staticlib.lua b/xmake/modules/utils/archive/merge_staticlib.lua index cbafa4bdb..dc0130219 100644 --- a/xmake/modules/utils/archive/merge_staticlib.lua +++ b/xmake/modules/utils/archive/merge_staticlib.lua @@ -20,6 +20,7 @@ -- imports import("core.base.option") +import("private.tools.vstool") -- merge *.a archive libraries for ar function _merge_for_ar(target, program, outputfile, libraryfiles, opt) @@ -44,6 +45,7 @@ end -- merge *.a archive libraries for msvc/lib.exe function _merge_for_msvclib(target, program, outputfile, libraryfiles, opt) opt = opt or {} + vstool.runv(program, table.join("-nologo", "-out:" .. outputfile, libraryfiles), {envs = opt.runenvs}) end -- merge *.a archive libraries @@ -60,7 +62,7 @@ function main(target, outputfile, libraryfiles) break end end - _merge_for_msvclib(target, (program:gsub("link%.exe", "lib.exe")), outputfile, libraryfiles, {envs = msvc and msvc:runenvs()}) + _merge_for_msvclib(target, (program:gsub("link%.exe", "lib.exe")), outputfile, libraryfiles, {runenvs = msvc and msvc:runenvs()}) else raise("cannot merge (%s): unknown ar tool %s!", table.concat(libraryfiles, ", "), toolname) end |
