About supporting EMScripten

Ferhat Kurtulmuş aferust at gmail.com
Fri Dec 18 19:19:00 UTC 2020


On Friday, 18 December 2020 at 17:53:39 UTC, Ferhat Kurtulmuş 
wrote:
> On Friday, 18 December 2020 at 13:29:17 UTC, kinke wrote:
>> On Friday, 18 December 2020 at 12:32:53 UTC, Ferhat Kurtulmuş 
>> wrote:
>>> import path[0] = D:\dlang\ldc\runtime\druntime\src>
>>> import path[1] = D:\dlang\ldc\runtime\phobos>
>>
>> Your ldc2.conf is wrong, get rid of the trailing `>` in the 
>> import and lib paths. You also don't need -mtriple in 
>> dub.json; that's added by dub with the `--arch` option.
>
> Yes, that was the problem. I didn't even know such a file 
> exists.
>
> Thank you again.

Just for records, in my case, I could compile the test code with 
some workarounds due to missing symbols although I switched back 
to wasm-sdk-8.

extern(C) void proc_exit(int exitcode){
     import core.stdc.stdlib;
     exit(exitcode);
}

extern(C) int __wasi_clock_res_get(uint32_t id, uint64_t* 
resolution);
extern(C) int clock_res_get(uint32_t id, uint64_t* resolution){
     return __wasi_clock_res_get(id, resolution);
}

extern(C) int __wasi_clock_time_get(uint32_t id, uint64_t 
precision, uint64_t* time);
extern(C) int clock_time_get(uint32_t id, uint64_t precision, 
uint64_t* time){
     return __wasi_clock_time_get(id, precision, time);
}


More information about the digitalmars-d-ldc mailing list