diff options
| author | ruki <[email protected]> | 2024-12-04 23:37:51 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2024-12-04 23:37:51 +0800 |
| commit | 3237e43498d1650426be1df79c63a71a7f5ca266 (patch) | |
| tree | 9ed4030b753c735bacfb45cfb5e72dfbf7bfdf3e /xmake/modules/utils/archive/merge_staticlib.lua | |
| parent | f2557f754fd0204c4549ac3b985938329c42cd12 (diff) | |
merge staticlibs for package
Diffstat (limited to 'xmake/modules/utils/archive/merge_staticlib.lua')
| -rw-r--r-- | xmake/modules/utils/archive/merge_staticlib.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xmake/modules/utils/archive/merge_staticlib.lua b/xmake/modules/utils/archive/merge_staticlib.lua index fb9c65c06..f02fcd981 100644 --- a/xmake/modules/utils/archive/merge_staticlib.lua +++ b/xmake/modules/utils/archive/merge_staticlib.lua @@ -32,7 +32,7 @@ function _merge_for_ar(target, program, outputfile, libraryfiles, opt) -- because on windows/ndk, llvm-ar.exe may fail to write with no permission, even though it's a writable temp file. -- -- @see https://github.com/xmake-io/xmake/issues/1973 - local archivefile = target:autogenfile((hash.uuid(outputfile):gsub("%-", ""))) .. ".a" + local archivefile = target.autogenfile and target:autogenfile((hash.uuid(outputfile):gsub("%-", ""))) .. ".a" or (os.tmpfile() .. ".a") os.mkdir(path.directory(archivefile)) local tmpfile = os.tmpfile() local mrifile = io.open(tmpfile, "w") @@ -56,7 +56,7 @@ function _merge_for_msvclib(target, program, outputfile, libraryfiles, opt) vstool.runv(program, table.join("-nologo", "-out:" .. outputfile, libraryfiles), {envs = opt.runenvs}) end --- merge *.a archive libraries +-- merge *.a archive libraries, @note target may be package. function main(target, outputfile, libraryfiles) local program, toolname = target:tool("ar") if program and toolname then |
