swift build
failed when macro and target depend on the same C target
#8436
Labels
swift build
failed when macro and target depend on the same C target
#8436
Is it reproducible with SwiftPM command-line tools:
swift build
,swift test
,swift package
etc?swift build
,swift test
,swift package
etc.Description
When
marco
andtarget
depend on the same C target, runningswift build
will produce aredefinition of module
error.A minimal example can be found here. The project structure is as follows:
MyLib and MyMacro only import CLib and have no other code.
Expected behavior
Compiled successfully.
Actual behavior
Steps to reproduce
git clone https://github.com/qazyn951230/MacroTest.git
cd MacroTest
swift build
Swift Package Manager version/commit hash
6.1.0
Swift & OS version (output of
swift --version ; uname -a
)Swift 6.1 from Xcode 16.3
The text was updated successfully, but these errors were encountered: