[m-rev.] for post-commit review: document status of clang support

Julien Fischer juliensf at csse.unimelb.edu.au
Mon Oct 3 17:10:41 AEDT 2011



On Mon, 3 Oct 2011, Zoltan Somogyi wrote:

> On 03-Oct-2011, Julien Fischer <juliensf at csse.unimelb.edu.au> wrote:
>> -        CFLAGS_FOR_OPT="-fomit-frame-pointer"
>> + +        # Disable C compiler optimizations for old versions of clang.
>> +        # (See above for details.) +        case "$C_COMPILER_TYPE" in
>> +            clang_0_*|clang_1_*|clang_2_*)
>> +                CFLAGS_FOR_OPT="-O0 -fomit-frame-pointer"
>> +            ;;
>> +            *)
>> +                CFLAGS_FOR_OPT="-O2 -fomit-frame-pointer"
>> +                OPT_FLAGS_FOR_CLANG="-O2"
>> +            ;;
>> +        esac
>>          CFLAGS_FOR_DEBUG="-g"
>>          CFLAGS_FOR_NO_STRICT_ALIASING="-fno-strict-aliasing"
>
> There may or may not be a problem with line breaks above.

That's just diff.

> Shouldn't there be
>
> 	OPT_FLAGS_FOR_CLANG="-O0"
>
> in the first branch above?

It's set at the beginning of this section.  We need a setting for it
regardless of the the value of --with-cc since otherwise there will be
unexpanded configuration variables in the mgnuc script and also so that
we get a safe default behaviour if the user chooses to set
MERCURY_C_COMPILER to clang after configuring it as something else.
(Although hopefuly that usage will be very rare.)

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