Building OpenJDK 9 on Mac OS X using Clang

At the time of writing, the OpenJDK 9 project was still quite similar to OpenJDK 8. So most of the information about building OpenJDK 9 can be found in Chapter 4, Building OpenJDK 8.

One point that differentiates OpenJDK 9 from OpenJDK 8 is the usage of the Clang compiler on Mac OS X. Starting with Xcode Version 5, Clang became the official compiler on Mac OS X instead of GCC. There were plans to use it as an official compiler for OpenJDK 8 on Mac OS X but that switch was postponed to OpenJDK 9.

In this recipe, we will build the current codebase of OpenJDK 9 using Xcode 5 and the Clang compiler.

Getting ready

For this recipe, we will need a clean Mac OS X 10.8 Mountain Lion or 10.9 Mavericks running with ...

Get OpenJDK Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.