Need reviewer - jdk7u-osx Mac sanity check fixes
Mike Swingler
swingler at apple.com
Tue Dec 20 11:34:43 PST 2011
On Dec 20, 2011, at 9:50 AM, Kelly O'Hair wrote:
> On Dec 20, 2011, at 9:38 AM, Mike Swingler wrote:
>
>> On Dec 20, 2011, at 8:43 AM, Kelly O'Hair wrote:
>>
>>> On Dec 19, 2011, at 11:39 PM, Alex Strange wrote:
>>>
>>>>> If you are restricting your builders to Mac OS X 10.7 now, you can actually cut over to using clang soon, since it has no known bugs compiling the JDK (right Alex? I'm not completely hallucinating this right?)
>>>>>
>>>>> Regards,
>>>>> Mike Swingler
>>>>> Apple Inc.
>>>> Clang works fine to compile jdk. However, the build for hotspot is very unclean and prints thousands of warnings, because clang enables more warnings by default than gcc. I resorted to building with "clang -w" as printing all the warnings actually resulted in a slower compile time than using llvm-gcc.
>>>>
>>>> Cleaning the build up will take some work, but you should look into it as Clang is a much faster compiler and uses a newer version of the compiler backend.
>>>
>>> Please don't fall into the trap of 'it compiles fine'. I'm all for using the latest and greatest compilers,
>>> but when it comes to building something like hotspot, just be very very careful.
>>> The fact that clang uses a newer compiler backend make me even more nervous for hotspot and everyone's
>>> code generation playing well together at runtime.
>>
>> Of course, it needs to be tested - but Apple has a demonstrated history of not letting any legacy technologies live on for long, and I want to ensure that JDK8 is on a supported compiler when it comes time to ship. Changing compilers mid-product cycle is never fun.
>
> Agree completely, we need to move soon on this soon, just makes me paranoid.
> Many people are unaware of the interactions of compiler generated code with hotspot generated code, and the nasty things it can uncover. :^(
We found that out very early in LLVM's lifetime when we started compiling HotSpot with it many years ago. There are a few compiler engineers in our building who still tell war stories about the bugs we've sent them. ;-)
The backend in llvm-gcc is fairly mature, however the risk to moving to the current backend in clang is not without some risk. We have found the benefit of clang's very sophisticated warnings and excellent static analyzer to be helpful in tracking down ambiguous or otherwise skanky things in the Java SE 6 codebase, and fixing up the worst of them.
Is there an existing Bugster ID for moving the JDK8 build to clang on the Mac (obviously blocked on the introduction of the Mac port to JDK8)?
Cheers,
Mike Swingler
Apple Inc.
More information about the jdk7u-dev
mailing list