[Ur] Patches to compile Ur/Web with clang

Adam Chlipala adamc at impredicative.com
Fri Jun 17 16:34:00 EDT 2011


austin seipp wrote:
> I was also thinking about making it possible to compile the ur/web
> runtime as an LLVM bitcode file, and do similar for programs you
> compile with the compiler. Then  the final link step can merge the
> files and effectively do whole program optimization, before emitting a
> final executable. Alas, I don't know autoconf very well, nor do I know
> automake (I'd need to make automake generate LLVM bitcode archives or
> simply bitcode files instead of object file archives, which would
> require some infrastructure I think.)
>    

I'd be happy to add support for this, if you can tell me all of the 
appropriate changes that lie outside of Ur/Web's SML/C source code. :)

A good first step would be to demonstrate the sequence of commands used 
to build the final application from all of the C sources that go into 
it.  To get the C source for an individual Ur/Web application, you can 
run 'urweb' with the '-debug' flag, in which case the C source is left 
in /tmp/webapp.c.  The C-compilation command lines Ur/Web is presently 
using will also be printed in that mode.



More information about the Ur mailing list