Closed
Description
This issue is for tracking the overall progress of upstreaming our changes, please post here if you create any new PRs with our changes in the upstream repository:
- [stdlib] fix return type of getNumRuntimeFunctionCounters swiftlang/swift#24182
- [stdlib] Fix return type of swift_{uint64,int64,float*}ToString swiftlang/swift#24181
- [stdlib] fix prototype declaration in RuntimeShims.h swiftlang/swift#24054
- [WebAssembly] Add ifdefs for the WASI target swiftlang/swift#29530
- [WebAssembly] enable shims and stubs for WASI swiftlang/swift#29505
- [WebAssembly] Add no-op MutexWASI.h implementation swiftlang/swift#29459
- [WebAssembly] Add wasm32 support to stdlib String swiftlang/swift#29881
- [stdlib] [WebAssembly] Fix a few tests for WASI swiftlang/swift#29871
- [stdlib] WebAssembly: add WASI cases to POSIXErrorCode enum swiftlang/swift#39482
- [SwiftPM] Pass sdk option to Swift compiler for WASI triples swiftlang/swift-package-manager#2735
- [SwiftPM] Avoid searching for xctest with non-Darwin triples swiftlang/swift-package-manager#2731
- [SwiftPM] Use LinuxMain on all platforms except Darwin swiftlang/swift-package-manager#2734
- [SwiftPM] Use host triple in createIndexStoreAPI swiftlang/swift-package-manager#2780
- [SwiftPM] Fix
generateResourceAccessor
WASI regression swiftlang/swift-package-manager#3819 - [SwiftPM] Wasm/WASI: propagate PATH to UserToolchain to fix sysroot search swiftlang/swift-package-manager#2936
- [LLVM] Support Swift calling convention for WebAssembly targets. Status: merged.
- [LLVM] Support swiftself and swifterror for WebAssembly target. Status: merged.
- [LLVM] Support single-floating-point immediate value. Status: merged.
- [LLVM] Emit PCH __clang_ast in custom section. Status: merged.
- [Runtime] Define WASI MutexPThread macros as 0 swiftlang/swift#31678
- build: Add support for WASI in CMake files swiftlang/swift#31672
- Driver: link only static libraries for WebAssembly swiftlang/swift#31691 Status: rejected, reverted in our fork.
- test: enable WebAssembly/WASI in lit.cfg swiftlang/swift#31695
- [WebAssembly] Add SWIFT_ONCE_F implementation to Lazy.h swiftlang/swift#31674
- [Foundation] Add TARGET_{CPU_WASM32,OS_WASI} to TargetConditionals.h swiftlang/swift-corelibs-foundation#2864
- [Foundation] Add locking primitives for TARGET_OS_WASI in CFLocking.h swiftlang/swift-corelibs-foundation#2867
- [Foundation] Add support for WASI in CFInternal.h swiftlang/swift-corelibs-foundation#2872
- [Foundation] Add WASI support in CoreFoundation_Prefix.h swiftlang/swift-corelibs-foundation#2873
- [Foundation] Add support for WASI in CFDate.c swiftlang/swift-corelibs-foundation#2880
- [Foundation] WASI: use getentropy to get randomized bytes swiftlang/swift-corelibs-foundation#3025
- [Foundation] Add #if TARGET_OS_WASI to _CFReallocf definition swiftlang/swift-corelibs-foundation#3026
- [Foundation] Add
|| TARGET_OS_WASI
to ifdef inuuid.c
swiftlang/swift-corelibs-foundation#3027 - [Foundation] Add
#ifdef
conditions toCFPlatform.c
for WASI swiftlang/swift-corelibs-foundation#3028 - [Foundation] Allow disabling Dispatch and Networking in
CMakeLists.txt
swiftlang/swift-corelibs-foundation#3029 - [Foundation] Add support for wasm32 architecture in
SwiftSupport.cmake
swiftlang/swift-corelibs-foundation#3030 - [Foundation] Disable file/process-related code in CF for WASI swiftlang/swift-corelibs-foundation#3037
- [Foundation] WASI: Make some sources unavailable in CF CMake swiftlang/swift-corelibs-foundation#3038
- [Foundation] Add support for CF data structures/utils on WASI swiftlang/swift-corelibs-foundation#3039
- [Foundation] Enable String, URL and XML-related types for WASI swiftlang/swift-corelibs-foundation#3051
- [Foundation] Disable file/dispatch-related code in Foundation for WASI swiftlang/swift-corelibs-foundation#3050
- [Frontend] Wasm: add isOSWASI check for concurrency imports swiftlang/swift#38805
- [Build system] [Preset] Add linux crosscompile wasm preset swiftlang/swift#39183
- [Build system] CMake: clean up WASI SDK sysroot paths swiftlang/swift#39275
- [Build system] swift_build_support: Add WASI to StdlibDeploymentTarget swiftlang/swift#39244
- [Build system] CMake: disable libdispatch when targeting Wasm/WASI swiftlang/swift#39274
- [test] StdlibUnittest: import _Concurrency explicitly swiftlang/swift#39175
- [Tools] tools: disable ObjC for wasm in SILFunctionExtractor swiftlang/swift#31920
- IRGen: fix
swifterror
attribute mismatch for WebAssembly swiftlang/swift#39359 Status: in review. - Concurrency: fix inconsistent _asyncLet_get signatures swiftlang/swift#41487
- [Wasm][KeyPath] Resolve absolute function pointer as identity swiftlang/swift#42096
- [Swift+WASM] [IRGen] Disable COMDAT for reflection metadata swiftlang/swift#24133 Status: needs to be updated to emit each comdat in its own section.
- [IRGen] [WASM] Avoid to emit GOT for WASM swiftlang/swift#30071 Status: outdated.
- [Runtime] Disable exclusivity checking for WebAssembly Runtime: define get_return_address for WebAssembly swiftlang/swift#31693 Status: needs updates after review.
- [WebAssembly] Use absolute pointers swiftlang/swift#31676 Status: in review.
- DriverTool: add support for WebAssembly autolink entries swiftlang/swift#39502
- test: mark a few tests as unsupported on Wasm/WASI swiftlang/swift#39504
- [IRGen] Emit keypath thunk helpers with swiftcc to match with the caller cc swiftlang/swift#39546
- stdlib: add support for WebAssembly in VarArgs swiftlang/swift#39361
- test: disable
Concurrency/Runtime/exclusivity.swift
on WASI swiftlang/swift#39583 - runtime, WebAssembly: add ImageInspectionWasm.cpp swiftlang/swift#39483
- test: fix stdlib tests when targeting WebAssembly/WASI swiftlang/swift#39519
- [IRGen] Put 'ret void' instead of unreachable for non swiftasync cc swiftlang/swift#39680
- Driver: add support for the WebAssembly toolchain swiftlang/swift#39299
- [Wasm][IRGen] Add initial support for unconditional absolute function pointer swiftlang/swift#42094
- [Wasm][Runtime] Interpret absolute function pointer in runtime structures swiftlang/swift#42095
- [Wasm] Disable use of
returnaddress
in exclusivity diagnostics swiftlang/swift#42097 - [SILGen] Fix
swift_once
initializer signature for lazy global var swiftlang/swift#42155 - [Wasm] Specify the least valid pointer for wasm32 swiftlang/swift#39300
- [stdlib] Port SE-0329 Clock APIs to WASI swiftlang/swift#58514
- [stdlib] Fix cc mismatch violation on swift_isClassType swiftlang/swift#39119 Status: in review.
- [Driver] driver: add WebAssembly support in autolink_extract_main swiftlang/swift#31912 Status: needs updates after review
- [Runtime] Runtime: emulate TLS with a map for WASI target swiftlang/swift#31694 Status: needs updates after review.
- [ClangImporter] ClangImporter: support __isoc_va_list for WASI/musl swiftlang/swift#31692 Status: needs tests.
- [ClangImporter] ClangImporter: pass _WASI_EMULATED_MMAN when triple is WASI swiftlang/swift#31689 Status: needs to be reverted in the fork and tested end-to-end with at least a few projects (especially those that ship C code).
- [IRGen] [Swift+WASM] [IRGen] disable debugger tuning and atomics on WebAssembly swiftlang/swift#24119 Status: needs an update, atomics part probably can be upstreamed as a separate PR.
- [BuildScript] [WASM] [BuildScript] Initial Support for building WASI toolchain swiftlang/swift#29465 Status: needs conflicts resolved and potentially a different approach to this to be able to support Windows.
- [SILOptimizer] Status: needs a different approach that doesn't have as much impact on SIL.
- stdlib: add
wasi.modulemap.gyb
for WebAssembly support swiftlang/swift#39360 Status: in review.
I think these capture only about a half of our changes, maybe much less, so more upstreaming effort is needed and welcome 🙏
For upstreaming it's best to have a look at our umbrella PR swiftlang#24684 and its diff and pick a self-contained and a relatively small patch that doesn't overlap or conflict with the rest of open PRs in the list above.