wizer icon indicating copy to clipboard operation
wizer copied to clipboard

__original_main no longer in WASI

Open guregu opened this issue 2 years ago • 3 comments

As of WASI SDK 16, __original_main is no longer added, breaking this: https://github.com/bytecodealliance/wizer/blob/65e345fb2bd5b5177d4be55af747edc28035c35c/include/wizer.h#L87-L90 https://github.com/WebAssembly/wasi-sdk/releases/tag/wasi-sdk-16 I am not sure what issue #295 is referring to there.

guregu avatar Sep 18 '22 02:09 guregu

https://github.com/WebAssembly/wasi-libc/pull/295

srenatus avatar Sep 18 '22 05:09 srenatus

Replace __origin_main() with __main_argc_argv() manually could be a workaround?

Zzzode avatar Sep 19 '22 07:09 Zzzode

Thanks @Zzzode, adding this seems to work:

#ifndef __original_main
#define __original_main __main_argc_argv
#endif

guregu avatar Oct 06 '22 11:10 guregu