"Global is external, but doesn't have external or weak linkage!" when accessing property of element of variadic tuple in release mode; works fine for debug #78735
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
crash
Bug: A crash, i.e., an abnormal termination of software
triage needed
This issue needs more specific labels
Description
Note this issue is likely related to #78734, since the repoduction code is essentially the same, with just small changes to the file structure.
Compiling the Xcode project in this repo in a release configuration results in a compiler error.
The Xcode project consists of an empty SwiftUI multiplatform app (not relevant) and an embedded SPM package with 2 targets, one of which depends on the other.
One target defines a function which uses, as part of a variadic-generic tuple, a type defined in the other target.
This type has a private enum carrying some data, which somehow seems to cause an issue with the compiler/linker.
Adding a second file (even if it's empty) changes the issue here from a compiler crash to a linker error (see #78734).
Moving all files from the second target in the embedded SPM package into the first seems to make it compile fine.
Reproduction
see the Xcode project linked above
Stack dump
Expected behavior
It should work
Environment
swift-driver version: 1.115.1 Apple Swift version 6.0.3 (swiftlang-6.0.3.1.10 clang-1600.0.30.1)
Target: arm64-apple-macosx15.0
(Xcode 16.2)
Additional information
No response
The text was updated successfully, but these errors were encountered: