< prev index next >

doc/building.html

Print this page
rev 47445 : 8171853: Remove Shark compiler


 446 <p><code>configure</code> will try to figure out what system you are running on and where all necessary build components are. If you have all prerequisites for building installed, it should find everything. If it fails to detect any component automatically, it will exit and inform you about the problem.</p>
 447 <p>Some command line examples:</p>
 448 <ul>
 449 <li><p>Create a 32-bit build for Windows with FreeType2 in <code>C:\freetype-i586</code>:</p>
 450 <pre><code>bash configure --with-freetype=/cygdrive/c/freetype-i586 --with-target-bits=32</code></pre></li>
 451 <li><p>Create a debug build with the <code>server</code> JVM and DTrace enabled:</p>
 452 <pre><code>bash configure --enable-debug --with-jvm-variants=server --enable-dtrace</code></pre></li>
 453 </ul>
 454 <h3 id="common-configure-arguments">Common Configure Arguments</h3>
 455 <p>Here follows some of the most common and important <code>configure</code> argument.</p>
 456 <p>To get up-to-date information on <em>all</em> available <code>configure</code> argument, please run:</p>
 457 <pre><code>bash configure --help</code></pre>
 458 <p>(Note that this help text also include general autoconf options, like <code>--dvidir</code>, that is not relevant to OpenJDK. To list only OpenJDK specific features, use <code>bash configure --help=short</code> instead.)</p>
 459 <h4 id="configure-arguments-for-tailoring-the-build">Configure Arguments for Tailoring the Build</h4>
 460 <ul>
 461 <li><code>--enable-debug</code> - Set the debug level to <code>fastdebug</code> (this is a shorthand for <code>--with-debug-level=fastdebug</code>)</li>
 462 <li><code>--with-debug-level=&lt;level&gt;</code> - Set the debug level, which can be <code>release</code>, <code>fastdebug</code>, <code>slowdebug</code> or <code>optimized</code>. Default is <code>release</code>. <code>optimized</code> is variant of <code>release</code> with additional Hotspot debug code.</li>
 463 <li><code>--with-native-debug-symbols=&lt;method&gt;</code> - Specify if and how native debug symbols should be built. Available methods are <code>none</code>, <code>internal</code>, <code>external</code>, <code>zipped</code>. Default behavior depends on platform. See <a href="#native-debug-symbols">Native Debug Symbols</a> for more details.</li>
 464 <li><code>--with-version-string=&lt;string&gt;</code> - Specify the version string this build will be identified with.</li>
 465 <li><code>--with-version-&lt;part&gt;=&lt;value&gt;</code> - A group of options, where <code>&lt;part&gt;</code> can be any of <code>pre</code>, <code>opt</code>, <code>build</code>, <code>major</code>, <code>minor</code>, <code>security</code> or <code>patch</code>. Use these options to modify just the corresponding part of the version string from the default, or the value provided by <code>--with-version-string</code>.</li>
 466 <li><code>--with-jvm-variants=&lt;variant&gt;[,&lt;variant&gt;...]</code> - Build the specified variant (or variants) of Hotspot. Valid variants are: <code>server</code>, <code>client</code>, <code>minimal</code>, <code>core</code>, <code>zero</code>, <code>zeroshark</code>, <code>custom</code>. Note that not all variants are possible to combine in a single build.</li>
 467 <li><code>--with-jvm-features=&lt;feature&gt;[,&lt;feature&gt;...]</code> - Use the specified JVM features when building Hotspot. The list of features will be enabled on top of the default list. For the <code>custom</code> JVM variant, this default list is empty. A complete list of available JVM features can be found using <code>bash configure --help</code>.</li>
 468 <li><code>--with-target-bits=&lt;bits&gt;</code> - Create a target binary suitable for running on a <code>&lt;bits&gt;</code> platform. Use this to create 32-bit output on a 64-bit build platform, instead of doing a full cross-compile. (This is known as a <em>reduced</em> build.)</li>
 469 </ul>
 470 <h4 id="configure-arguments-for-native-compilation">Configure Arguments for Native Compilation</h4>
 471 <ul>
 472 <li><code>--with-devkit=&lt;path&gt;</code> - Use this devkit for compilers, tools and resources</li>
 473 <li><code>--with-sysroot=&lt;path&gt;</code> - Use this directory as sysroot</li>
 474 <li><code>--with-extra-path=&lt;path&gt;[;&lt;path&gt;]</code> - Prepend these directories to the default path when searching for all kinds of binaries</li>
 475 <li><code>--with-toolchain-path=&lt;path&gt;[;&lt;path&gt;]</code> - Prepend these directories when searching for toolchain binaries (compilers etc)</li>
 476 <li><code>--with-extra-cflags=&lt;flags&gt;</code> - Append these flags when compiling JDK C files</li>
 477 <li><code>--with-extra-cxxflags=&lt;flags&gt;</code> - Append these flags when compiling JDK C++ files</li>
 478 <li><code>--with-extra-ldflags=&lt;flags&gt;</code> - Append these flags when linking JDK libraries</li>
 479 </ul>
 480 <h4 id="configure-arguments-for-external-dependencies">Configure Arguments for External Dependencies</h4>
 481 <ul>
 482 <li><code>--with-boot-jdk=&lt;path&gt;</code> - Set the path to the <a href="#boot-jdk-requirements">Boot JDK</a></li>
 483 <li><code>--with-freetype=&lt;path&gt;</code> - Set the path to <a href="#freetype">FreeType</a></li>
 484 <li><code>--with-cups=&lt;path&gt;</code> - Set the path to <a href="#cups">CUPS</a></li>
 485 <li><code>--with-x=&lt;path&gt;</code> - Set the path to <a href="#x11">X11</a></li>
 486 <li><code>--with-alsa=&lt;path&gt;</code> - Set the path to <a href="#alsa">ALSA</a></li>




 446 <p><code>configure</code> will try to figure out what system you are running on and where all necessary build components are. If you have all prerequisites for building installed, it should find everything. If it fails to detect any component automatically, it will exit and inform you about the problem.</p>
 447 <p>Some command line examples:</p>
 448 <ul>
 449 <li><p>Create a 32-bit build for Windows with FreeType2 in <code>C:\freetype-i586</code>:</p>
 450 <pre><code>bash configure --with-freetype=/cygdrive/c/freetype-i586 --with-target-bits=32</code></pre></li>
 451 <li><p>Create a debug build with the <code>server</code> JVM and DTrace enabled:</p>
 452 <pre><code>bash configure --enable-debug --with-jvm-variants=server --enable-dtrace</code></pre></li>
 453 </ul>
 454 <h3 id="common-configure-arguments">Common Configure Arguments</h3>
 455 <p>Here follows some of the most common and important <code>configure</code> argument.</p>
 456 <p>To get up-to-date information on <em>all</em> available <code>configure</code> argument, please run:</p>
 457 <pre><code>bash configure --help</code></pre>
 458 <p>(Note that this help text also include general autoconf options, like <code>--dvidir</code>, that is not relevant to OpenJDK. To list only OpenJDK specific features, use <code>bash configure --help=short</code> instead.)</p>
 459 <h4 id="configure-arguments-for-tailoring-the-build">Configure Arguments for Tailoring the Build</h4>
 460 <ul>
 461 <li><code>--enable-debug</code> - Set the debug level to <code>fastdebug</code> (this is a shorthand for <code>--with-debug-level=fastdebug</code>)</li>
 462 <li><code>--with-debug-level=&lt;level&gt;</code> - Set the debug level, which can be <code>release</code>, <code>fastdebug</code>, <code>slowdebug</code> or <code>optimized</code>. Default is <code>release</code>. <code>optimized</code> is variant of <code>release</code> with additional Hotspot debug code.</li>
 463 <li><code>--with-native-debug-symbols=&lt;method&gt;</code> - Specify if and how native debug symbols should be built. Available methods are <code>none</code>, <code>internal</code>, <code>external</code>, <code>zipped</code>. Default behavior depends on platform. See <a href="#native-debug-symbols">Native Debug Symbols</a> for more details.</li>
 464 <li><code>--with-version-string=&lt;string&gt;</code> - Specify the version string this build will be identified with.</li>
 465 <li><code>--with-version-&lt;part&gt;=&lt;value&gt;</code> - A group of options, where <code>&lt;part&gt;</code> can be any of <code>pre</code>, <code>opt</code>, <code>build</code>, <code>major</code>, <code>minor</code>, <code>security</code> or <code>patch</code>. Use these options to modify just the corresponding part of the version string from the default, or the value provided by <code>--with-version-string</code>.</li>
 466 <li><code>--with-jvm-variants=&lt;variant&gt;[,&lt;variant&gt;...]</code> - Build the specified variant (or variants) of Hotspot. Valid variants are: <code>server</code>, <code>client</code>, <code>minimal</code>, <code>core</code>, <code>zero</code>, <code>custom</code>. Note that not all variants are possible to combine in a single build.</li>
 467 <li><code>--with-jvm-features=&lt;feature&gt;[,&lt;feature&gt;...]</code> - Use the specified JVM features when building Hotspot. The list of features will be enabled on top of the default list. For the <code>custom</code> JVM variant, this default list is empty. A complete list of available JVM features can be found using <code>bash configure --help</code>.</li>
 468 <li><code>--with-target-bits=&lt;bits&gt;</code> - Create a target binary suitable for running on a <code>&lt;bits&gt;</code> platform. Use this to create 32-bit output on a 64-bit build platform, instead of doing a full cross-compile. (This is known as a <em>reduced</em> build.)</li>
 469 </ul>
 470 <h4 id="configure-arguments-for-native-compilation">Configure Arguments for Native Compilation</h4>
 471 <ul>
 472 <li><code>--with-devkit=&lt;path&gt;</code> - Use this devkit for compilers, tools and resources</li>
 473 <li><code>--with-sysroot=&lt;path&gt;</code> - Use this directory as sysroot</li>
 474 <li><code>--with-extra-path=&lt;path&gt;[;&lt;path&gt;]</code> - Prepend these directories to the default path when searching for all kinds of binaries</li>
 475 <li><code>--with-toolchain-path=&lt;path&gt;[;&lt;path&gt;]</code> - Prepend these directories when searching for toolchain binaries (compilers etc)</li>
 476 <li><code>--with-extra-cflags=&lt;flags&gt;</code> - Append these flags when compiling JDK C files</li>
 477 <li><code>--with-extra-cxxflags=&lt;flags&gt;</code> - Append these flags when compiling JDK C++ files</li>
 478 <li><code>--with-extra-ldflags=&lt;flags&gt;</code> - Append these flags when linking JDK libraries</li>
 479 </ul>
 480 <h4 id="configure-arguments-for-external-dependencies">Configure Arguments for External Dependencies</h4>
 481 <ul>
 482 <li><code>--with-boot-jdk=&lt;path&gt;</code> - Set the path to the <a href="#boot-jdk-requirements">Boot JDK</a></li>
 483 <li><code>--with-freetype=&lt;path&gt;</code> - Set the path to <a href="#freetype">FreeType</a></li>
 484 <li><code>--with-cups=&lt;path&gt;</code> - Set the path to <a href="#cups">CUPS</a></li>
 485 <li><code>--with-x=&lt;path&gt;</code> - Set the path to <a href="#x11">X11</a></li>
 486 <li><code>--with-alsa=&lt;path&gt;</code> - Set the path to <a href="#alsa">ALSA</a></li>


< prev index next >