Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Sep 2019 15:27:08 -0000
From:      mko <me@mko.io>
To:        freebsd-current@freebsd.org
Subject:   Enable wasm LLVM backend
Message-ID:  <9CECC969-9B12-48B0-9039-D304C02A9EFB@mko.io>

next in thread | raw e-mail | index | archive | help

Hi list,
I’m trying the Freebsd 12.1 prerelease which comes with llvm 8.0. The webassembly (wasm) backend is no longer experimental and enabled by default in llvm 8.0 and also the coming 9.0 with riscv backend.

But I failed to use the wasm backend in the prerelease:

clang90 -Wall --target=wasm32 -nostdlib -c -o fib.wasm fib.c ;; output wasm file

error: no wasm32 backend

So i think freebsd 12.1 somehow disable wasm backend for some reason. 

I think we should include the wasm backend and also riscv backend in the official 12.1 release with llvm 9.0. With default wasm compiler in the base, all the existing c code can run on the modern browser, thus let freebsd gain some advantages for web developer  over linux which doesn’t support llvm by default.

It could be done to install llvm-devel package, but it’s required more steps and versioned binary like clang80 would confuse new comers.


mko


Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9CECC969-9B12-48B0-9039-D304C02A9EFB>