Clang is a compiler built on LLVM technology, so you often hear clang and LLVM used interchangeably. Clang is a just one component of the LLVM project.
Emscripten is a compiler that uses Clang for most of the heavy lifting of actually compiling to WebAssembly, but it also adds a lot of features and functionality on top of that, mostly related to seamless integration with JavaScript and the web and emulation of POSIX and other standards.
Emscripten runs Clang internally with --target=wasm32-unknown-emscripten
which has some very minor differences to the regular --target=wasm32
.
If you run Emscripten with -v
, it will print the full Clang command line it uses under the hood.