"Undefined symbol: type metadata accessor" when accessing property of element of variadic tuple in release mode; works fine for debug builds #78734
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
triage needed
This issue needs more specific labels
Description
Note this issue is likely related to #78735, 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.
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. this seems (my guess) like it is maybe related to cross-file and cross-module optimizations (since it cannot be reproduced in a single file or a single module).
Expected behavior
since the code compiles fine in a debug build, it should also compile in a release build.
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
The text was updated successfully, but these errors were encountered: