forked from swiftlang/swift-sdk-generator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
generator/linux: Use swiftResourcesPath to find framework headers
Building with a Swift 6.0 SDK fails because the new `_FoundationCShims` framework headers can't be found: <unknown>:0: error: missing required module '_FoundationCShims' The necessary files are present in `$PLATFORM.sdk/usr/lib/swift`, but are not part of the list which is copied to `$PLATFORM.sdk/usr/include`. The Static Linux SDK and WASM SDK generator don't copy these files into /usr/include; instead they set the `swiftResourcesPath` and `swiftStaticResourcesPath` fields in `swift-sdk.json`, which causes the build system to look in those paths for framework headers. We can do the same for Linux SDKs, however we must stop copying the files to `/usr/include`, otherwise the build will fail because the framework header definitions are duplicated: error: redefinition of module 'DispatchIntrospection' 6 | } 7 | 8 | module DispatchIntrospection [system] [extern_c] { | `- error: redefinition of module 'DispatchIntrospection' 9 | header "introspection.h" 10 | export * This change fixes issue swiftlang#152. Compared to swiftlang#153, the end-to-end tests now pass for all supported Swift versions, distributions and architectures. | SDK | Hello World | Foundation | | ----------------------------------------- | ----------- | ---------- | | ubuntu_aarch64_5.9.2-RELEASE | ok | ok | | ubuntu_aarch64_5.9.2-RELEASE_with-docker | ok | ok | | ubuntu_aarch64_5.10.1-RELEASE | ok | ok | | ubuntu_aarch64_5.10.1-RELEASE_with-docker | ok | ok | | ubuntu_aarch64_6.0.2-RELEASE | ok | ok | | ubuntu_aarch64_6.0.2-RELEASE_with-docker | ok | ok | | | | | | ubuntu_x86_64_5.9.2-RELEASE | ok | ok | | ubuntu_x86_64_5.9.2-RELEASE_with-docker | ok | ok | | ubuntu_x86_64_5.10.1-RELEASE | ok | ok | | ubuntu_x86_64_5.10.1-RELEASE_with-docker | ok | ok | | ubuntu_x86_64_6.0.2-RELEASE | ok | ok | | ubuntu_x86_64_6.0.2-RELEASE_with-docker | ok | ok | | | | | | rhel_aarch64_5.9.2-RELEASE_with-docker | ok | ok | | rhel_aarch64_5.10.1-RELEASE_with-docker | ok | ok | | rhel_aarch64_6.0.2-RELEASE_with-docker | ok | ok | | | | | | rhel_x86_64_5.9.2-RELEASE_with-docker | ok | ok | | rhel_x86_64_5.10.1-RELEASE_with-docker | ok | ok | | rhel_x86_64_6.0.2-RELEASE_with-docker | ok | ok | FAIL1: cannot find /lib/ld-linux-aarch64.so.1 (swiftlang#147) FAIL2: missing required module '_FoundationCShims' (swiftlang#152) Fixes: swiftlang#152 Depends on: swiftlang#153, swiftlang#154
- Loading branch information
Showing
5 changed files
with
20 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters