Doesn't targeting LLVM get you this kind of flexibility "for free"?
Yes and no. It can help with different target backends (including JavaScript, not sure about JVM or .NET) but you still have to do work to make sure that the calling conventions of your language and the target's match.
Sure, but AFAIK many/most of the "supports Javascript" languages out there rely on emscripten, so LLVM is involved anyway. By its nature, LLVM gives you more flexibility in the long term than VMs that were intended as a final destination.
> Sure, but AFAIK many/most of the "supports Javascript" languages out there rely on emscripten, so LLVM is involved anyway.
Yes, yes. LLVM definitely helps here. But it doesn't come "for free", which is what the GP post asked. You still need some "glue" code to make it work.
One of the selling points of Clojure is that it embraces the libraries of the targeted eco-system.
The Clojure community has some time ago discussed addeding conditional support, to be able to build common libraries across multiple runtimes. Similar to what Common Lisp offers.