Skip to content
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

SwiftWasm 5.4 release #3040

Closed
5 of 7 tasks
MaxDesiatov opened this issue Apr 27, 2021 · 16 comments
Closed
5 of 7 tasks

SwiftWasm 5.4 release #3040

MaxDesiatov opened this issue Apr 27, 2021 · 16 comments
Labels
release Issues with the release version

Comments

@MaxDesiatov
Copy link

MaxDesiatov commented Apr 27, 2021

This is a tracking issue for everything that could block the 5.4 release of SwiftWasm.

@MaxDesiatov MaxDesiatov added the release Issues with the release version label Apr 27, 2021
@MaxDesiatov MaxDesiatov changed the title 5.4 release SwiftWasm 5.4 release Apr 27, 2021
@MaxDesiatov
Copy link
Author

@kateinoigakukun could you clarify what's the status of LTO in the 5.4 branch?

@kateinoigakukun
Copy link
Member

LTO is already available in 5.4 branch but not tested well.

@SDGGiesbrecht
Copy link

A month has passed. Is there still an intention to release for 5.4?

@MaxDesiatov
Copy link
Author

MaxDesiatov commented Jun 2, 2021

Yes, of course that's still the intention. I haven't been able to fix the regression we see with our 5.4 snapshots though, specifically #2851. If anyone can help, I would greatly appreciate it.

@SDGGiesbrecht
Copy link

Unfortunately it looks over my head. But my gut tells me the implementation of SE‐0284—which was added between 5.3.1 and 5.4—may have something to do with it.

@MaxDesiatov
Copy link
Author

The regression is fixed now. I'm thinking of tagging swift-wasm-5.4-SNAPSHOT-2021-08-08-a as 5.4.0. Any objections?

@MaxDesiatov
Copy link
Author

MaxDesiatov commented Aug 24, 2021

I'm seeing issues with linking Foundation when building with SwiftPM with 5.4.0, I removed the 5.4.0-RELEASE tag for now

wasm-ld: error: /Library/Developer/Toolchains/swift-wasm-5.4.0-RELEASE.xctoolchain
/usr/lib/swift_static/wasi/libFoundation.a(Data.swift.obj): undefined symbol: _NSConcreteStackBlock
wasm-ld: error: /Library/Developer/Toolchains/swift-wasm-5.4.0-RELEASE.xctoolchain
/usr/lib/swift_static/wasi/libFoundation.a(Data.swift.obj): undefined symbol: _Block_copy
wasm-ld: error: /Library/Developer/Toolchains/swift-wasm-5.4.0-RELEASE.xctoolchain
/usr/lib/swift_static/wasi/libFoundation.a(Data.swift.obj): undefined symbol: _Block_release
wasm-ld: error: /Library/Developer/Toolchains/swift-wasm-5.4.0-RELEASE.xctoolchain
/usr/lib/swift_static/wasi/libFoundation.a(Date.swift.obj): undefined symbol: CFAbsoluteTimeGetCurrent
wasm-ld: error: /Library/Developer/Toolchains/swift-wasm-5.4.0-RELEASE.xctoolchain
/usr/lib/swift_static/wasi/libFoundation.a(Date.swift.obj): undefined symbol: CFAbsoluteTimeGetCurrent
wasm-ld: error: /Library/Developer/Toolchains/swift-wasm-5.4.0-RELEASE.xctoolchain
/usr/lib/swift_static/wasi/libFoundation.a(Date.swift.obj): undefined symbol: CFAbsoluteTimeGetCurrent
wasm-ld: error: /Library/Developer/Toolchains/swift-wasm-5.4.0-RELEASE.xctoolchain
/usr/lib/swift_static/wasi/libFoundation.a(Date.swift.obj): undefined symbol: CFAbsoluteTimeGetCurrent
...

@kateinoigakukun could this be caused by autolinking changes applied to the toolchain, but not Foundation, or vice versa?

As far as I understand, the issue can also be seen in swift-wasm-5.4-SNAPSHOT-2021-08-08-a, from which I've tagged that broken 5.4.0 I removed.

@kateinoigakukun
Copy link
Member

kateinoigakukun commented Aug 25, 2021

@MaxDesiatov My auto-linking stuff is not included in 5.4 at all. So users still need to explicitly import CoreFoundation.
If we include them in 5.4, it would make the diff from the upstream bigger, so I want to avoid cherry-pick in our fork.

@MaxDesiatov
Copy link
Author

That would only make the diff of swiftwasm-release/5.4 against upstream release/5.4 bigger, right? I thought we only cared about the size of swiftwasm against main, or am I missing something?

@kateinoigakukun
Copy link
Member

kateinoigakukun commented Aug 25, 2021

That would only make the diff of swiftwasm-release/5.4 against upstream release/5.4 bigger, right?

Yes, -public-autolink option can be used by toolchain users, so it introduces an incompatibility with swiftwasm-release/5.4 and release/5.4. I'm worried about not source code diff but feature diff.

@MaxDesiatov
Copy link
Author

Would a simple @_exported import CoreFoundation in the 5.4 branch of our fork of Foundation fix the issue? Or is this not enough for the linker to infer things correctly?

@kateinoigakukun
Copy link
Member

No need @_exported but just import CoreFoundation is enough as a short-term solution, I think.

@MaxDesiatov
Copy link
Author

MaxDesiatov commented Aug 25, 2021

No need @_exported but just import CoreFoundation is enough as a short-term solution, I think.

Should import CoreFoundation be put in the app that's linking with Foundation, or would it be enough to add it to the Foundation source code itself? I'm surprised that the latter hasn't been done yet. Or is @_implementationOnly in Foundation preventing that from working?

@kateinoigakukun
Copy link
Member

Putting import CoreFoundation in Foundation is enough in theory.

@MaxDesiatov
Copy link
Author

@MaxDesiatov
Copy link
Author

Closing this as resolved. SwiftWasm 5.4.0 is now available either as a standalone package, or via carton 0.11.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release Issues with the release version
Projects
None yet
Development

No branches or pull requests

3 participants