Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
17 lines (13 sloc) 834 Bytes
This file documents how to use clang as the C compiler with Mercury. Support
for Mercury with clang has been tested on Linux, Mac OS X and Windows. To use
clang as the C compiler for Mercury invoke Mercury's configure script with the
--with-cc option set as follows:
$ ./configure --with-cc=clang
Note that the asm_fast* and reg* grades are not usable with clang as they rely
on GNU C extensions that clang does not support.
Versions of LLVM (the underlying compiler infrastructure used by clang) before
about 2.9 contain bugs that require most C compiler optimizations to be
disabled when compiling Mercury generated C code with clang (i.e. the generated
C files have to be compiled at -O0). If you are using a more recent version of
LLVM then the configure script will automatically enable a higher level of
Jump to Line
Something went wrong with that request. Please try again.