-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
swift build
fails when targeting Wasm Swift SDK on macOS
#7919
Labels
Comments
xedin
added a commit
to xedin/swift-package-manager
that referenced
this issue
Aug 26, 2024
…ting macOS Fixes a bug where swift and linker flags for swift-testing were injected into `extraFlags` of a toolchain that was targeting WASM but used macOS to build. Resolves: swiftlang#7919
xedin
added a commit
to xedin/swift-package-manager
that referenced
this issue
Aug 26, 2024
…ting macOS Fixes a bug where swift and linker flags for swift-testing were injected into `extraFlags` of a toolchain that was targeting WASM but used macOS to build. Resolves: swiftlang#7919 (cherry picked from commit d2141cd)
xedin
added a commit
to xedin/swift-package-manager
that referenced
this issue
Aug 26, 2024
…ting macOS Fixes a bug where swift and linker flags for swift-testing were injected into `extraFlags` of a toolchain that was targeting WASM but used macOS to build. Resolves: swiftlang#7919 (cherry picked from commit d2141cd) (cherry picked from commit db603e6)
xedin
added a commit
that referenced
this issue
Aug 26, 2024
… target… (#7922) - Explanation: Fixes a bug where swift and linker flags for swift-testing were injected into `extraFlags` of a toolchain that was targeting WASM but used macOS to build. - Main Branch PR: #7920 - 6.0 Branch PR: #7921 - Resolves: #7919 - Resolves: rdar://134714404 - Risk: Low (only affects cross-compilation to WASM). - Reviewed By: @bnbarham - Testing: Manual testing since this is not currently possible to test automatically.
xedin
added a commit
that referenced
this issue
Aug 26, 2024
…arget… (#7921) - Explanation: Fixes a bug where swift and linker flags for swift-testing were injected into `extraFlags` of a toolchain that was targeting WASM but used macOS to build. - Main Branch PR: #7920 - Resolves: #7919 - Resolves: rdar://134714404 - Risk: Low (only affects cross-compilation to WASM). - Reviewed By: @bnbarham - Testing: Manual testing since this is not currently possible to test automatically.
swift build
fails when targeting WASM Swift SDK on macOSswift build
fails when targeting Wasm Swift SDK on macOS
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is it reproducible with SwiftPM command-line tools:
swift build
,swift test
,swift package
etc?swift build
,swift test
,swift package
etc.Description
With
swift-DEVELOPMENT-SNAPSHOT-2024-08-20-a
, cross-compiling from macOS to WASM with the WASM Swift SDK fails:error: link command failed with exit code 1 (use -v to see invocation)
wasm-ld: error: unknown argument: -rpath
wasm-ld: error: cannot open /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2024-08-20-a.xctoolchain/usr/lib/swift/macosx/testing: Is a directory
Expected behavior
I'd expect this to link successfully since I just have a "Hello, world" program with no dependencies.
Actual behavior
Instead, it failed to link because
-rpath /Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2024-08-20-a.xctoolchain/usr/lib/swift/macosx/testing
is being passed towasm-ld
.Steps to reproduce
swift-DEVELOPMENT-SNAPSHOT-2024-08-20-a
)swift package init --executable
swift build --swift-sdk wasm32-unknown-wasi
Swift Package Manager version/commit hash
swift-DEVELOPMENT-SNAPSHOT-2024-08-20-a
Swift & OS version (output of
swift --version ; uname -a
)Apple Swift version 6.0-dev (LLVM 6c1a2ac10cabb71, Swift 2a04604247a93e7)
Target: arm64-apple-macosx15.0
The text was updated successfully, but these errors were encountered: