[[bad mustMatch:]]: error while compiling to wasm

Seb seb at wilzba.ch
Sat Jul 7 09:03:38 UTC 2018


On Saturday, 7 July 2018 at 07:55:59 UTC, Hüseyin Akbaş wrote:
> Hi I was trying to build wasm code via ldc and binaryen. I saw 
> how to do it in a c++ tutorial.
>
> My source code is:
>
> import std.stdio;
>
> extern(C) int main()
> {
> 	writeln("Edit source/app.d to start your project.");
>   return 0;
> }
>
>
> I compile with the following:
> ldc2 app.d -output-s
> s2wasm app.s > app.wast
>
> While compiling to s, everyhing is fine but s2wasm it gives 
> this error:
> << set >>
> [[bad mustMatch:]]:
> ==========
> _main:
> 	.cfi_startproc
> 	pushq	%rbp
> Lcfi0:
> 	.cfi_def_cfa_offs
> ==========
>
> It is something related to the D structure? How can I fix this?
>
> Thanks

Did you try -betterC? IIRC the full druntime doesn't work with 
wasm yet.


More information about the digitalmars-d-ldc mailing list