-
Notifications
You must be signed in to change notification settings - Fork 56
Open
Labels
enhancementNew feature or requestNew feature or request
Description
In static library swift file, on attempt to import Atomics I'm getting Missing required module '_AtomicsShims' error.
This is structure of project in a nutshell:
- StaticLibA // has
Atomicsstatic SPM library as dependency (but NOT as "Link Binary with Libraries" phase)
- foo.swift // needs atomic stuff, so does
import Atomicswhich fails with the above error
- FrameworkB // links with StaticLibA
- has some swift files which depend on StaticLibA types
- ExecutableC // links with StaticLibA, FrameworkB & Atomics
- uses both the static lib and dynamic framework
The very same import Atomics works well and without errors when it's in a final executable swift files, so problem is specific for static library target only.
Note also that StaticLibA deliberately is NOT linked with Atomics - if I did so then step # 1 succeeds but then step # 3 fails with "ld: 465 duplicate symbols for architecture arm64". I believe it's b/c the very same symbols of Atomic lib comes to final executable from both StaticLibA and FrameworkB.
Could you please advice what could be wrong or missing? OR, is it just not supported yet configuration? Thanks!
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request