fix: fix lib artifact path issue

This commit is contained in:
2026-08-06 09:36:38 +08:00
parent dbec1b4fca
commit 7527d3763f
2 changed files with 7 additions and 1 deletions
+1
View File
@@ -56,3 +56,4 @@ description = "a brown fox jumps over a lazy dog."
## Environment Variables
- `OMRF_PACKER_CARGO`: Path to the `cargo` executable used to collect project metadata. When unset, the packer invokes `cargo` as resolved from `PATH`.
- `OMRF_PACKER_RUSTC`: Path to the `rustc` executable used to resolve the host toolchain triple. When unset, the packer invokes `rustc` as resolved from `PATH`.
+6 -1
View File
@@ -165,7 +165,6 @@ def _generate_lib_artifact_name(name: str, _: Triple) -> str:
def resolve_lib_copy(ctx: ArtifactContext) -> Iterator[FileCopyInfo]:
"""Yield :class:`FileCopyInfo` for the built dynamic library (and, on Windows, the import library)."""
extractor = ctx.extractor
target_directory = extractor.get_target_directory() / "release"
target_name = extractor.get_target_name()
# get triple info
@@ -173,6 +172,12 @@ def resolve_lib_copy(ctx: ArtifactContext) -> Iterator[FileCopyInfo]:
if ctx.options.target is not None:
target_triple = ctx.options.target
# compute target directory
target_directory = extractor.get_target_directory()
if ctx.options.target is not None:
target_directory /= str(ctx.options.target)
target_directory /= "release"
# copy artifact for redist
dll_artifact_filename = _generate_dll_artifact_name(target_name, target_triple)
yield FileCopyInfo(