Enable wasm LLVM backend
mko
me at mko.io
Mon Sep 16 15:27:08 UTC 2019
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
More information about the freebsd-current
mailing list