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
+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(