About supporting EMScripten

Sebastiaan Koppe mail at skoppe.eu
Tue Sep 1 17:24:25 UTC 2020


On Tuesday, 1 September 2020 at 13:18:15 UTC, cbleser wrote:
> On Monday, 31 August 2020 at 08:31:11 UTC, Sebastiaan Koppe 
> wrote:
>> It seems you don't have the right version of 
>> ldc/druntime/phobos. Please checkout 
>> https://github.com/skoppe/ldc/commit/828926064c52eba905d9bbbf9d4d57f64a2cd267
>
> Hi Sebastiaan.
> Thank you for you input. But still run into another problem.
>
>
> I corrected the branch now it compiles but it does not link.
>
> [...]
>
> --- cut ---
> Error: unrecognized file extension obj
> make[2]: *** [CMakeFiles/druntime-ldc.dir/build.make:1292: 
> lib/libdruntime-ldc.a] Error 1
> make[2]: Leaving directory 
> '/tmp/wasm_druntime/ldc-build-runtime.tmp'
> make[1]: *** [CMakeFiles/Makefile2:265: 
> CMakeFiles/druntime-ldc.dir/all] Error 2
> make[1]: Leaving directory 
> '/tmp/wasm_druntime/ldc-build-runtime.tmp'
> make: *** [Makefile:130: all] Error 2
> --- cut --

Ah yes, I missed that step. You need to patch the toolchain.

See the CI
https://github.com/tagion/ldc/blob/828926064c52eba905d9bbbf9d4d57f64a2cd267/.azure-pipelines/posix.yml#L159

Essentially replace `Wasm` with `Linux` in 
$WASI_SDK_PREFIX/share/cmake/wasi-sdk.cmake


More information about the digitalmars-d-ldc mailing list