Review Request: Build-infra M1

Fredrik Öhrström fredrik.ohrstrom at oracle.com
Mon Mar 26 11:09:58 UTC 2012


2012-03-26 12:05, Michael McMahon skrev:
> Thanks. It looks like the first of the three options above is most 
> similar to the verbosity
> level of the old build. Is all of this documented anywhere?

Well, I have so far really tried to comment in the makefiles. So the
"make VERBOSE="
trick is the first thing that is written in the root Makefile. :-)

However, I agree that reading the makefiles really, is not an option for
most people.
Thus here is a first cheat sheet of the options that are of OpenJDK
builder interest.
(The list will change and also be expanded with more configuration
options.)
It is in fact the output from "configure --help" where I have removed
options of
more generic interest and that are not really used yet. For example
detailed install locations
and such.

The configure script tries to figure everything out for you. The goal is
that you should
not have to configure the number of cores, where the boot jdk is etc etc.

For example, the configure script does try to find your boot jdk on
Windows by looking
in the default installation locations. It does so only partially on the
Mac.  (Please add
that code to configure.ac if you like!) So you specify
--with-boot-jdk=....jdk7
only when want to override, or if you have a special installation.

The same is true for most other options, number of cores, amount of
memory etc etc.

On Windows, you have to specify the path to the freetype dlls and header
files.
Since they have no default location. But the configure script will find
your visual
studio installation!

Typical configure examples:

# Plain and simple, build a release version.
../autoconf/configure

# You want to debug?
../autoconf/configure --enable-debug

# A windows build.
../autoconf/configure --with-freetype=/cygdrive/c/downloads/myfreetype
--with-boot-jdk=/cygdrive/c/javas/jdk7

# Build using incremental build for java. Ie rebuild only the package
and its dependent packages when a single
# Java source file is changed.
../autoconf/configure --enable-javac-server --enable-javac-deps
--enable-javac-multi-core

# Cross compiling to 32 bit, and build only the server jvm.
../autoconf/configure --host=i686-unknown-linux-gnu
--with-sys-root=/home/sysroots/for32bitlinux --with-jvm-variants=server

# Plain and simple.
make

# Debug the build process.
make VERBOSE=

# If you have run configure twice from the makefiles directory.
# (For example you have normal configure and a cross configure)
# This make command will build all configurations.
make ALL

---------------------------------------------------------------------------------------

  --build=BUILD     configure for building on BUILD [guessed] But it is
recommended that you set it.

  --host=HOST       cross-compile to build programs to run on HOST [BUILD]

  --disable-head          Should support for a head (graphical UI
support) be
                          compiled into the jdk/jvm? [default=enabled]

  --enable-debug          Enable the debug level=fastdebug, ie asserts,
-g and
                          optimizations.

  --disable-ccache        Should ccache be used to speed up recompilations?
                          [default=enabled]

  --disable-precompiled-headers
                          Should precompiled headers be used by the C++
                          compiler [default=enabled]

  --enable-javac-server  Disable the shared javac server during the build
                          process, which is enabled by default.

  --enable-javac-deps     Enable the dependency tracking between Java
                          packages.

  --enable-javac-multi-core
                          Compile Java packages concurrently instead of
doing
                          a batch compile of each source root.

  --disable-macosx-runtime-support
                          Disable use of the MacOSX Java runtime support
                          framework.

  --disable-docs          Disable generation of documentation
                          [default=disabled] (Should be enabled, but
                          we really need to fix the speed of javadoc!)

  --disable-nimbus        Disable nimbus L&F [default=enabled]

  --disable-static-link-stdc++
                          Use only dynamic linking to the c++ runtime on
Linux.
                          The default is to static link.

  --enable-hotspot-test-in-build
                          Enable running of Queens test after Hotspot build.
                          Automatically disabled when cross compiling.

  --with-num-cores=32     specify the number of cores in the build system.

  --with-memorysize=1024  specify the number MB of memory in the build
system.
                                                 Used to limit number of
concurrent javacs.

  --with-jdk-variant      Choose jdk variant to build: normal,embedded.
                          [default=normal]

  --with-jvm-variants     Choose jvm variants, separated by commas, to
build:
                          server,client,kernel,zero,zeroshark.
                          [default=server] (only client,server and
kernel works right now)

  --with-debug-level      Set the debug level: release, fastdebug,
slowdebug.

  --with-msvcr100dll=      copy this msvcr100.dll into the built jdk,
instead of the automatically found one.

  --with-builddeps-conf   use this configuration file for the builddeps
and no
                          other!

  --with-builddeps-server download and use build dependencies from this
server
                          url, eg ftp://aserver.atld/adir

  --with-builddeps-dir    store downloaded build dependencies here
                          [default=/localhome/builddeps]

  --with-builddeps-group  chgrp the downloaded build dependencies to
this group

  --with-sys-root         pass --sys-root=the_sys_root to the compilers
and linker.

  --with-ccache-dir       Store ccache files here. Defaults to your
.ccache in
                          your home directory.

  --with-boot-jdk         specify which boot jdk to use to build.

  --with-add-source-root  For each and every source directory, look in this
                          additional source root for the same directory,
if it
                          exists and have files in it, include them in the
                          build.
 
 --with-override-source-root
                          For each and every source directory, look in this
                          override source root for the same directory, if it
                          exists, use that directory instead and ignore the
                          directory in the original source root.

  --with-override-langtools  Use this langtools dir for the build.

  --with-override-corba   Use this corba dir for the build.

  --with-override-jaxp    Use this jaxp dir for the build.

  --with-override-jaxws   Use this jaxws dir for the build.

  --with-override-hotspot Use this hotspot dir for the build.

  --with-override-jdk     Use this jdk dir for the build. (Though is is
probably better to clone a new forest instead.)

  --with-boot-jdk-jvmargs specify a standard set of jvmargs to passed to all
                          invocations of the boot jdk, ie -Xmx8G
                          -enableassertions. This overrides the default
                          values.

  --with-server-java      Use this java binary for running the javac
                          background server and other long running java
tasks
                          in the build process, ie
                          --with-server-java="/jrockit/bin/java -server"

  --with-javac-server-cores
                          Use at most this number of concurrent threads
on the
                          javac server. Defaults to the number of cores in
                          your build system.

  --with-x                use the X Window System

  --with-cups=PATH        specify prefix directory for installed cups
package.
                          Equivalent to --with-cups-include=PATH/include
                          plus --with-cups-lib=PATH/lib

  --with-freetype=PATH        specify prefix directory for installed
freetype2 package.
                          Expects the libraries under PATH/lib and the
headers under PATH/include

  --with-alsa=PATH        specify prefix directory for installed alsa.
                          Equivalent to --with-alsa-include=PATH/include
                          plus --with-alsa-lib=PATH/lib

  --with-pulse=PATH        specify prefix directory for installed pulse.
                          Equivalent to --with-pulse-include=PATH/include
                          plus --with-pulse-lib=PATH/lib





More information about the build-dev mailing list