Query: Is clang an "Apple product"?

Hi,

Recently someone referred to clang as an Apple product in a
discussion thread elsewhere and it seemed odd to me. I have always
thought of clang as an open source project with lots of contributions
by Apple, Google and plenty of others.

Is it accurate to call clang an Apple product, or does the clang team
feel that this is a misnomer?

Just curious :slight_smile:

Hi,

Recently someone referred to clang as an Apple product in a
discussion thread elsewhere and it seemed odd to me. I have always
thought of clang as an open source project with lots of contributions
by Apple, Google and plenty of others.

Yes.

Is it accurate to call clang an Apple product, or does the clang team

No.

feel that this is a misnomer?

Yes.

> Recently someone referred to clang as an Apple product in a
> discussion thread elsewhere and it seemed odd to me. I have always
> thought of clang as an open source project with lots of contributions
> by Apple, Google and plenty of others.
Yes.
>
> Is it accurate to call clang an Apple product, or does the clang team
No.
> feel that this is a misnomer?
Yes.
>
> Just curious :slight_smile:

In the interest of pedantic hair-splitting:

Apple delivers a version of clang (as part of Xcode?) and it's not unheard
of for a vendor to include proprietary changes (I don't know whether Apple
does this). In that sense the clang-that-Apple-delivers could be reasonably
considered an "Apple product."

However, clang-in-general is not an "Apple product."
--paulr

I agree, and I think this is an important distinction.

The Clang binaries that ship as part of XCode are Apple products supported
by Apple, but the open source releases are a product of the LLVM community.

This is visible on the command line on OS X:

$ clang -v
Apple LLVM version 6.0 (clang-600.0.51) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin13.4.0
Thread model: posix
$ /opt/llvm/bin/clang -v
clang version 3.5.0
Target: x86_64-apple-darwin13.4.0
Thread model: posix

The first of these is an Apple product. The latter is not. However, both are open source, with the code for the former being available from:

http://opensource.apple.com/source/clang/clang-503.0.38/

I've not looked at this version, but periodically Apple-clang releases contain patches that are not yet in the main tree (although they usually appear quite soon. The ARM64 back end was an example of one that took a little while to be merged).

Generally, the Apple product and the open source product converge and diverge over time, as the release cycles for the two don't quite line up.

David

In that sense, Sony, ARM and others also release LLVM based compilers.

Every time I heard the phrase "LLVM is an Apple product" was in a
pejorative way to diminish the community value, mainly due to the
license being more "corporate friendly" than GPLv3.

Ideals and licenses apart, LLVM is an Apple/Google product as much as
GCC is a RedHat product, Linux is a RedHat/Intel product, etc, i.e.
not at all.

cheers,
--renato

> Apple delivers a version of clang (as part of Xcode?) and it's not
unheard
> of for a vendor to include proprietary changes (I don't know whether
Apple
> does this). In that sense the clang-that-Apple-delivers could be
reasonably
> considered an "Apple product."

In that sense, Sony, ARM and others also release LLVM based compilers.

Every time I heard the phrase "LLVM is an Apple product" was in a
pejorative way to diminish the community value, mainly due to the
license being more "corporate friendly" than GPLv3.

The funny thing is that LLVM is sort of a "de facto copyleft" due to the
fast development pace and lack of compatibility: every patch that isn't in
the open source repo becomes a liability, eventually resulting in merge
pain. Unlike the GPL though, if you really need it, you have the
flexibility to keep it out-of-tree; but at a (not to be underestimated)
cost in developer resources.

-- Sean Silva

> Apple delivers a version of clang (as part of Xcode?) and it's not
unheard
> of for a vendor to include proprietary changes (I don't know whether
Apple
> does this). In that sense the clang-that-Apple-delivers could be
reasonably
> considered an "Apple product."

In that sense, Sony, ARM and others also release LLVM based compilers.

Every time I heard the phrase "LLVM is an Apple product" was in a
pejorative way to diminish the community value, mainly due to the
license being more "corporate friendly" than GPLv3.

The funny thing is that LLVM is sort of a "de facto copyleft" due to the
fast development pace and lack of compatibility: every patch that isn't in
the open source repo becomes a liability, eventually resulting in merge
pain. Unlike the GPL though, if you really need it, you have the
flexibility to keep it out-of-tree; but at a (not to be underestimated)
cost in developer resources.

In case it wasn't clear, I meant this in the sense of "this arrangement
seems to be a nice balance which has kept the community thriving while
allowing/promoting corporate adoption".

-- Sean Silva

From: Renato Golin [mailto:renato.golin@linaro.org]
> Apple delivers a version of clang (as part of Xcode?) and it's not
unheard
> of for a vendor to include proprietary changes (I don't know whether
Apple
> does this). In that sense the clang-that-Apple-delivers could be
reasonably
> considered an "Apple product."

In that sense, Sony, ARM and others also release LLVM based compilers.

That's quite true.

Every time I heard the phrase "LLVM is an Apple product" was in a
pejorative way to diminish the community value, mainly due to the
license being more "corporate friendly" than GPLv3.

Okay, I didn't follow that part (and probably I am just as happy
that way...)

Ideals and licenses apart, LLVM is an Apple/Google product as much as
GCC is a RedHat product, Linux is a RedHat/Intel product, etc, i.e.
not at all.

I think the best way to describe this particular relationship is that
Sony/Apple/ARM/etc. are OEMs of Clang/LLVM. Per standard commercial
terminology, we call our respective editions our "products" even though
it's obvious we didn't "produce" them from scratch.

As far as Sony's licensees are concerned, Sony is *responsible* for
the Sony product. This is different from claiming *ownership*;
obviously the community owns Clang/LLVM.
--paulr

I believe that's the same relationship Apple and ARM have, too, thus
the strong "LLVM" branding on their names, meaning: "we've only added
some tweaks to make it work out of the box, and possibly more
performing, in this use case".

cheers,
--renato