mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Wasm C ABI now uses `int __main_argc_argv(int argc, char *argv[])` as
entry point signature[^1], and wasi-libc has removed backward compatibility
with legacy "main"[^2], so we need to support the new name in compiler side.
[^1]: https://github.com/WebAssembly/tool-conventions/blob/main/BasicCABI.md
[^2]: d8d00bcd5a
7 lines
280 B
Swift
7 lines
280 B
Swift
// RUN: %swift -target wasm32-unknown-wasi -parse-stdlib -emit-ir -o - %s | %FileCheck %s
|
|
|
|
// REQUIRES: CODEGENERATOR=WebAssembly
|
|
|
|
// CHECK: @"\01l_entry_point" = private constant { i32{{.*}} { i32 ptrtoint (ptr @__main_argc_argv to i32){{.*}} }, section "swift5_entry", align 4
|
|
|