Files
swift-mirror/test/IRGen/wasm-absolute-func-ptr.swift
Yuta Saito a0bb0d8ec8 [wasm] Use __main_argc_argv as entry point name
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
2023-10-12 21:05:06 +00:00

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