[cfe-commits] [patch] Fix -fno-exceptions for c++

Rafael Espindola espindola at google.com
Wed Sep 30 17:47:50 PDT 2009


2009/9/29 Chris Lattner <clattner at apple.com>:
>
> On Sep 29, 2009, at 11:52 AM, Rafael Espindola wrote:
>
>>> This sort of thing is best handled in the driver.  clang-cc should just
>>> have
>>> a single "exceptions is enabled" flag, and the driver should munge the
>>> combination of flag settings, default language stuff, etc into a single
>>> bool
>>> that it passes off to clang-cc.
>>
>> I have an updated patch that moves the logic to clang-cc.cpp. I can now
>> move it to the driver, but what should clang-cc do when no option is
>> given?
>> Just have a simple default (disabled)?
>
> Yep, I think that makes sense!  Thanks Rafael,

I was trying to move the "needs exception" to clang, but there is a
problem. What should we do when there is a C and a C++ file in the
same clang-cc invocation? Currently

clang-cc foo.c bar.cc

will compile bar.cc with exception and foo.c without.

Is the current patch (with the logic in clang-cc) ok?

> -Chris

Cheers,
-- 
Rafael Ávila de Espíndola




More information about the cfe-commits mailing list