swiftlang / swift-package-manager

The Package Manager for the Swift Programming Language
Apache License 2.0
9.65k stars 1.31k forks source link

Fix build of host&target destination products with `--static-swift-stdlib` #7695

Closed kateinoigakukun closed 1 week ago

kateinoigakukun commented 1 week ago

Motivation:

Given the following conditions:

then the build randomly failed due to the race condition of the Objects.LinkFileList creation.

Reproducible project https://github.com/kateinoigakukun/swift-autolink-issue-repro

Modifications:

This commit fixes the issue by distinguishing the temporary link file list response file name by the -tool suffix.

I think it would be better to add assertions in LLBuildManifest to avoid such unintentional target overwrites later.

Result:

Fix the build for the above case.

kateinoigakukun commented 1 week ago

@swift-ci test

kateinoigakukun commented 1 week ago

@swift-ci test

kateinoigakukun commented 1 week ago

@swift-ci test

kateinoigakukun commented 1 week ago

@swift-ci test Windows

kateinoigakukun commented 1 week ago

@swift-ci test

kateinoigakukun commented 1 week ago

@swift-ci test

kateinoigakukun commented 1 week ago

@swift-ci test Windows

kateinoigakukun commented 1 week ago

@swift-ci test Windows

kateinoigakukun commented 1 week ago

@swift-ci test Windows