Skip to content

Copy experimentalWindowsDLL artifact bundle variants to the target build directory#1384

Closed
daveinglis wants to merge 1 commit into
swiftlang:release/6.4.xfrom
daveinglis:experimental-windows-dll
Closed

Copy experimentalWindowsDLL artifact bundle variants to the target build directory#1384
daveinglis wants to merge 1 commit into
swiftlang:release/6.4.xfrom
daveinglis:experimental-windows-dll

Conversation

@daveinglis

Copy link
Copy Markdown
Contributor

Artifact bundles with experimentalWindowsDLL entries now have their matching variant copied to $(TARGET_BUILD_DIR) alongside the built product, using a workspace-level producer that guarantees deterministic, duplicate-free task generation regardless of how many targets transitively reference the same bundle.

Architecture (mirrors XCFrameworkTaskProducer):

  • WindowsDLLCopyContext (new) — holds a [destinationPath: CopyRequirement] map on GlobalProductPlan. First registration per destination wins.

  • WindowsDLLCopyTaskProducer (new) — workspace-level producer registered alongside XCFrameworkTaskProducer in ProductPlanner. Its prepare() iterates target contexts sequentially, triple-matches DLL variants per arch, and registers (source, destination) pairs. Because iteration is sequential the winner is always the same target across incremental builds, eliminating the stale-file-removal warnings that a concurrent first-come-first-served approach would produce. generateTasks() emits one Copy task per registered destination.

Tests:

  • artifactBundleWithWindowsDLLs: correct variant copied, non-matching skipped
  • artifactBundleWithWindowsDLLsNoMatchWarning: warning + no copy when no variant matches

…ild directory

Artifact bundles with `experimentalWindowsDLL` entries now have their matching
variant copied to `$(TARGET_BUILD_DIR)` alongside the built product, using a
workspace-level producer that guarantees deterministic, duplicate-free task
generation regardless of how many targets transitively reference the same bundle.

Architecture (mirrors XCFrameworkTaskProducer):

- WindowsDLLCopyContext (new) — holds a [destinationPath: CopyRequirement] map
  on GlobalProductPlan. First registration per destination wins.

- WindowsDLLCopyTaskProducer (new) — workspace-level producer registered
  alongside XCFrameworkTaskProducer in ProductPlanner. Its prepare() iterates
  target contexts *sequentially*, triple-matches DLL variants per arch, and
  registers (source, destination) pairs. Because iteration is sequential the
  winner is always the same target across incremental builds, eliminating the
  stale-file-removal warnings that a concurrent first-come-first-served approach
  would produce. generateTasks() emits one Copy task per registered
  destination.

Tests:
- artifactBundleWithWindowsDLLs: correct variant copied, non-matching skipped
- artifactBundleWithWindowsDLLsNoMatchWarning: warning + no copy when no variant matches
@daveinglis

Copy link
Copy Markdown
Contributor Author

@swift-ci test

@daveinglis

Copy link
Copy Markdown
Contributor Author

doesn't look like we need this in 6.4

@daveinglis daveinglis closed this Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant