[m-rev.] for review: support using clang as a C compiler with Mercury
Julien Fischer
juliensf at csse.unimelb.edu.au
Fri Aug 26 00:18:13 AEST 2011
On Wed, 24 Aug 2011, Julien Fischer wrote:
> Branches: main, 11.07
>
> Support using clang as a C compiler with Mercury -- currently only
> tested on Mac OS X.
>
> Clean up the handling of C compilers in the configure script.
>
> configure.in:
> Improve this script's ability to distinguish between different
> types of C compiler. In particular, ensure that a clear
> distinction is maintained between clang and gcc.
>
> Fix an old XXX: don't rely on pattern matching on the value
> of $CC to determine the C compiler type. This is particularly
> error prone now since one compiler is named "clang" and another
> "cl".
>
> Set optimization and warning flags for clang.
> (XXX this is currently very conservative; we need to go through
> them and work out what good defaults might be.)
>
> Don't link against libgcc if we are using clang.
> (XXX I don't think this is really necessary for gcc either in
> the great majority of cases.)
>
> Mark spots that still need updating with "XXX CLANG"; I will
> look into these separately.
>
> aclocal.m4:
> Add a new macro that determines the C compiler type based
> on what builtin macros are defined -- unlike AC_PROG_CC
> this macro correctly distinguishes between gcc and clang.
>
> Add two new macros that determine version information for
> clang and for Visual C.
>
> scripts/mgnuc.in:
> scripts/ml.in:
> Handle clang as a C compiler.
>
> README.MacOS:
> Mention that clang can be used with Mercury on Mac OS X.
I've committed this one as I require it in order to work on other
changes - I will deal with any review comments separately.
Julien.
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to: mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions: mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------
More information about the reviews
mailing list