DevelopmentBuilds - daudo/ojdkbuild GitHub Wiki

Goal

Build ojdkbuild allowing to choose different make targets and allowing to run fast partial builds repeatedly after adding changes to OpenJDK source code.

Outline:

Prerequisites

  • development setup on Windows 2012 that allows to run one-off builds using run.bat launcher (see Win2012DevSetup)

Process

Note: to build 32-bit binaries and/or jdk9 it may be convenient to checkout all modules using git submodule update --init

  1. In terminal emulator in ojdkbuild root directory run the following to setup the development environment for jdk8-x86_64 builds:

    call "resources/scripts/set-compile-env-vs10-x86_64.bat"
    
  2. Go to build directory and cleanup possible existing build artifacts:

    cd build    
    creset
    
  3. Configure overall CMake project (that contains OpenJDK and dependencies) specifying DEV_MODE option:

    cmake ../src/java-1.8.0-openjdk -Dopenjdk_DEV_MODE=ON
    
  4. Run default nmake target to build all the dependencies (FreeType, NSS etc):

    nmake
    
  5. Run openjdk target. In development mode this target will run configure for OpenJDK, but won't run make:

    nmake openjdk
    
  6. Now bash command line with configured OpenJDK build environment is provided to the user:

    uname -a
    > CYGWIN_NT-6.2-WOW64 WIN-QBOE15UKBPJ 1.7.17(0.262/5/3) 2012-10-19 14:39 i686 Cygwin
    

OpenJDK Build Targets

Following OpenJDK make targets can be run repeatably in configured shell:

  • make: default target that will build exploded-image in ojdkbuild/build/java-1.8.0-openjdk/windows-x86_64-normal-server-(release|debug)/jdk directory
  • make clean: cleans all OpenJDK build artifacts; OpenJDK build dependencies that were built by the nmake will be left intact
  • make images: build OpenJDK and bundle jdk image in ojdkbuild/build/java-1.8.0-openjdk/windows-x86_64-normal-server-(release|debug)/images/j2sdk-image directory
  • make all: build jdk image and additionally generate apidocs for it