diff options
| author | SineStriker <[email protected]> | 2025-04-21 23:37:35 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2025-04-23 11:30:30 +0800 |
| commit | 1beccbbd6b5d9472c786837f2e53c8721adc48f1 (patch) | |
| tree | a36f8ae478483ca7b612a3da49a34b16fdf2cd89 | |
| parent | e16400105330feffae48c766eafc743717436ae1 (diff) | |
Rename `byproduct` to `artifactfile`
| -rw-r--r-- | xmake/actions/package/oldpkg/main.lua | 2 | ||||
| -rw-r--r-- | xmake/core/project/target.lua | 6 | ||||
| -rw-r--r-- | xmake/modules/private/action/build/link_objects.lua | 4 | ||||
| -rw-r--r-- | xmake/modules/target/action/clean/main.lua | 4 | ||||
| -rw-r--r-- | xmake/modules/target/action/install/main.lua | 2 | ||||
| -rw-r--r-- | xmake/plugins/pack/batchcmds.lua | 2 | ||||
| -rw-r--r-- | xmake/rules/utils/inherit_links/inherit_links.lua | 2 |
7 files changed, 11 insertions, 11 deletions
diff --git a/xmake/actions/package/oldpkg/main.lua b/xmake/actions/package/oldpkg/main.lua index 1ce78ca7b..0f094ff2f 100644 --- a/xmake/actions/package/oldpkg/main.lua +++ b/xmake/actions/package/oldpkg/main.lua @@ -48,7 +48,7 @@ function _package_library(target) -- copy *.lib for shared/windows (*.dll) target -- @see https://github.com/xmake-io/xmake/issues/787 - local target_implib = target:byproduct("implib") + local target_implib = target:artifactfile("implib") if target_implib and os.isfile(target_implib) then os.vcp(target_implib, format("%s/%s.pkg/$(plat)/$(arch)/lib/$(mode)/", outputdir, targetname)) end diff --git a/xmake/core/project/target.lua b/xmake/core/project/target.lua index 5a6da9a12..75d3da92b 100644 --- a/xmake/core/project/target.lua +++ b/xmake/core/project/target.lua @@ -1644,14 +1644,14 @@ function _instance:_targetdir_extra(kind) return targetdir end --- get the build byproduct file +-- get the extra build artifact file -- --- supported byproduct kinds: +-- supported artifact kinds: -- 1. implib: windows DLL implib(.lib, .dll.a) -- -- otherwise returns nil -- -function _instance:byproduct(kind) +function _instance:artifactfile(kind) if kind == "implib" then if self:is_shared() and self:is_plat("windows", "mingw") then return path.join(self:_targetdir_extra("libdir"), path.basename(self:filename()) .. (self:is_plat("mingw") and ".dll.a" or ".lib")) diff --git a/xmake/modules/private/action/build/link_objects.lua b/xmake/modules/private/action/build/link_objects.lua index d10ae1ef4..4ed1a0a41 100644 --- a/xmake/modules/private/action/build/link_objects.lua +++ b/xmake/modules/private/action/build/link_objects.lua @@ -49,11 +49,11 @@ function _do_link_target(target, opt) if verbose then -- show the full link command with raw arguments, it will expand @xxx.args for msvc/link on windows - print(linkinst:linkcmd(objectfiles, targetfile, {linkflags = linkflags, implib = target:byproduct("implib"), rawargs = true})) + print(linkinst:linkcmd(objectfiles, targetfile, {linkflags = linkflags, implib = target:artifactfile("implib"), rawargs = true})) end if not dryrun then - assert(linkinst:link(objectfiles, targetfile, {linkflags = linkflags, implib = target:byproduct("implib")})) + assert(linkinst:link(objectfiles, targetfile, {linkflags = linkflags, implib = target:artifactfile("implib")})) end end, {dependfile = target:dependfile(), lastmtime = os.mtime(target:targetfile()), diff --git a/xmake/modules/target/action/clean/main.lua b/xmake/modules/target/action/clean/main.lua index 8d828248d..ed7aeaafb 100644 --- a/xmake/modules/target/action/clean/main.lua +++ b/xmake/modules/target/action/clean/main.lua @@ -39,7 +39,7 @@ function main(target) -- @see https://github.com/xmake-io/xmake/issues/3052 if target:is_shared() then if target:is_plat("windows") then - local libfile = target:byproduct("implib") + local libfile = target:artifactfile("implib") local expfile = path.join(path.directory(libfile), path.basename(targetfile) .. ".exp") if os.isfile(libfile) then remove_files(libfile) @@ -50,7 +50,7 @@ function main(target) end if target:is_plat("mingw") then - local libfile = target:byproduct("implib") + local libfile = target:artifactfile("implib") if os.isfile(libfile) then remove_files(libfile) end diff --git a/xmake/modules/target/action/install/main.lua b/xmake/modules/target/action/install/main.lua index fa598b20c..7fef0d59c 100644 --- a/xmake/modules/target/action/install/main.lua +++ b/xmake/modules/target/action/install/main.lua @@ -237,7 +237,7 @@ function _install_shared(target, opt) -- @see https://github.com/xmake-io/xmake/issues/714 os.vcp(target:targetfile(), bindir) local libdir = _get_target_libdir(target, opt) - local target_implib = target:byproduct("implib") + local target_implib = target:artifactfile("implib") if os.isfile(target_implib) then os.mkdir(libdir) os.vcp(target_implib, libdir) diff --git a/xmake/plugins/pack/batchcmds.lua b/xmake/plugins/pack/batchcmds.lua index ab5a33aa0..d933a3372 100644 --- a/xmake/plugins/pack/batchcmds.lua +++ b/xmake/plugins/pack/batchcmds.lua @@ -303,7 +303,7 @@ function _on_target_installcmd_shared(target, batchcmds_, opt) -- install *.lib for shared/windows (*.dll) target -- @see https://github.com/xmake-io/xmake/issues/714 - local target_implib = target:byproduct("implib") + local target_implib = target:artifactfile("implib") if target_implib and os.isfile(target_implib) then batchcmds_:mkdir(libdir) batchcmds_:cp(target_implib, path.join(libdir, path.filename(target_implib))) diff --git a/xmake/rules/utils/inherit_links/inherit_links.lua b/xmake/rules/utils/inherit_links/inherit_links.lua index 74d63495c..a9acd3c0e 100644 --- a/xmake/rules/utils/inherit_links/inherit_links.lua +++ b/xmake/rules/utils/inherit_links/inherit_links.lua @@ -80,7 +80,7 @@ function main(target) end end - local target_implib = target:byproduct("implib") + local target_implib = target:artifactfile("implib") if target_implib then _add_export_value(target, "linkdirs", path.directory(target_implib)) else |
