[cfe-dev] Odd piece of Clang 2.1 behaviour
Chris Lattner
clattner at apple.com
Fri Oct 7 11:10:07 PDT 2011
On Oct 7, 2011, at 9:40 AM, Eli Friedman wrote:
> On Fri, Oct 7, 2011 at 9:26 AM, Dallman, John <john.dallman at siemens.com> wrote:
>> I'm experimenting with Clang as a replacement for GCC in building my employers'
>> products, and liking it a great deal. It's the easiest new compiler I've dealt
>> with in 15 years of porting this code to a wide variety of platforms.
>>
>> I'm working on Mac OS X 10.7 with the Clang 2.1 from Xcode 4.1, and it's doing
>> something that I could believe was deliberate, but isn't helpful to me.
>>
>> Object files are created with permissions of "-rw-------". llvm-gcc-4.2 creates
>> them in the same setup with permissions of "-rw-rw-r--".
>>
>> This creates a problem for me, because we have a centralised build system,
>> running under a special account, and developers working against it need to
>> link against object files produced by the special account. They are members
>> of the same group, so permissions of "-rw-r-----" would work fine.
>>
>> This doesn't seem to be being caused by my umask. Obviously, I can change the
>> permissions on the .o files once they exist, so it isn't a big problem, but
>> I was curious if this was deliberate, and if so, why?
>
> It's a bug; IIRC, it's already fixed in clang trunk.
For what it's worth, Xcode 4.2 includes a vastly updated version of Clang (branded "Apple LLVM Compiler 3.0" instead of "2.1" by the apple marketing people). It recently came out of Beta. I recommend upgrading to it if you can.
-Chris
More information about the cfe-dev
mailing list