Wed, 19 Nov 2014 14:21:09 -0800
8064667: Add -XX:+CheckEndorsedAndExtDirs flag to JDK 8
Reviewed-by: coleenp, ccheung
duke@435 | 1 | @echo off |
duke@435 | 2 | REM |
zgu@4492 | 3 | REM Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. |
duke@435 | 4 | REM DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
duke@435 | 5 | REM |
duke@435 | 6 | REM This code is free software; you can redistribute it and/or modify it |
duke@435 | 7 | REM under the terms of the GNU General Public License version 2 only, as |
duke@435 | 8 | REM published by the Free Software Foundation. |
duke@435 | 9 | REM |
duke@435 | 10 | REM This code is distributed in the hope that it will be useful, but WITHOUT |
duke@435 | 11 | REM ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
duke@435 | 12 | REM FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
duke@435 | 13 | REM version 2 for more details (a copy is included in the LICENSE file that |
duke@435 | 14 | REM accompanied this code). |
duke@435 | 15 | REM |
duke@435 | 16 | REM You should have received a copy of the GNU General Public License version |
duke@435 | 17 | REM 2 along with this work; if not, write to the Free Software Foundation, |
duke@435 | 18 | REM Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
duke@435 | 19 | REM |
trims@1907 | 20 | REM Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
trims@1907 | 21 | REM or visit www.oracle.com if you need additional information or have any |
trims@1907 | 22 | REM questions. |
duke@435 | 23 | REM |
duke@435 | 24 | REM |
duke@435 | 25 | |
duke@435 | 26 | |
duke@435 | 27 | REM |
duke@435 | 28 | REM Since we don't have uname and we could be cross-compiling, |
duke@435 | 29 | REM Use the compiler to determine which ARCH we are building |
duke@435 | 30 | REM |
dcubed@1763 | 31 | REM Note: Running this batch file from the Windows command shell requires |
dcubed@1763 | 32 | REM that "grep" be accessible on the PATH. An MKS install does this. |
dcubed@1763 | 33 | REM |
duke@435 | 34 | cl 2>&1 | grep "IA-64" >NUL |
duke@435 | 35 | if %errorlevel% == 0 goto isia64 |
duke@435 | 36 | cl 2>&1 | grep "AMD64" >NUL |
duke@435 | 37 | if %errorlevel% == 0 goto amd64 |
phh@3427 | 38 | cl 2>&1 | grep "x64" >NUL |
phh@3427 | 39 | if %errorlevel% == 0 goto amd64 |
duke@435 | 40 | set ARCH=x86 |
duke@435 | 41 | set BUILDARCH=i486 |
duke@435 | 42 | set Platform_arch=x86 |
duke@435 | 43 | set Platform_arch_model=x86_32 |
duke@435 | 44 | goto end |
duke@435 | 45 | :amd64 |
duke@435 | 46 | set LP64=1 |
duke@435 | 47 | set ARCH=x86 |
duke@435 | 48 | set BUILDARCH=amd64 |
duke@435 | 49 | set Platform_arch=x86 |
duke@435 | 50 | set Platform_arch_model=x86_64 |
duke@435 | 51 | goto end |
duke@435 | 52 | :isia64 |
duke@435 | 53 | set LP64=1 |
duke@435 | 54 | set ARCH=ia64 |
duke@435 | 55 | set Platform_arch=ia64 |
duke@435 | 56 | set Platform_arch_model=ia64 |
duke@435 | 57 | :end |
duke@435 | 58 | |
duke@435 | 59 | if "%4" == "" goto usage |
duke@435 | 60 | if not "%7" == "" goto usage |
duke@435 | 61 | |
duke@435 | 62 | if "%1" == "product" goto test1 |
duke@435 | 63 | if "%1" == "debug" goto test1 |
duke@435 | 64 | if "%1" == "fastdebug" goto test1 |
dcubed@1757 | 65 | if "%1" == "tree" goto test1 |
duke@435 | 66 | goto usage |
duke@435 | 67 | |
duke@435 | 68 | :test1 |
duke@435 | 69 | if "%2" == "core" goto test2 |
duke@435 | 70 | if "%2" == "compiler1" goto test2 |
duke@435 | 71 | if "%2" == "compiler2" goto test2 |
duke@435 | 72 | if "%2" == "tiered" goto test2 |
duke@435 | 73 | if "%2" == "adlc" goto build_adlc |
duke@435 | 74 | |
duke@435 | 75 | goto usage |
duke@435 | 76 | |
duke@435 | 77 | :test2 |
dcubed@1757 | 78 | if "%1" == "tree" goto build_tree |
duke@435 | 79 | REM check_j2se_version |
duke@435 | 80 | REM jvmti.make requires J2SE 1.4.x or newer. |
duke@435 | 81 | REM If not found then fail fast. |
duke@435 | 82 | %4\bin\javap javax.xml.transform.TransformerFactory >NUL |
duke@435 | 83 | if %errorlevel% == 0 goto build |
duke@435 | 84 | echo. |
duke@435 | 85 | echo J2SE version found at %4\bin\java: |
duke@435 | 86 | %4\bin\java -version |
duke@435 | 87 | echo. |
duke@435 | 88 | echo An XSLT processor (J2SE 1.4.x or newer) is required to |
duke@435 | 89 | echo bootstrap this build |
duke@435 | 90 | echo. |
duke@435 | 91 | |
duke@435 | 92 | goto usage |
duke@435 | 93 | |
duke@435 | 94 | :build |
kamg@526 | 95 | nmake -f %3/make/windows/build.make Variant=%2 WorkSpace=%3 BootStrapDir=%4 BuildUser="%USERNAME%" HOTSPOT_BUILD_VERSION="%5" %1 |
duke@435 | 96 | goto end |
duke@435 | 97 | |
duke@435 | 98 | :build_adlc |
kamg@526 | 99 | nmake -f %3/make/windows/build.make Variant=compiler2 WorkSpace=%3 BootStrapDir=%4 BuildUser="%USERNAME%" HOTSPOT_BUILD_VERSION=%5 ADLC_ONLY=1 %1 |
duke@435 | 100 | goto end |
duke@435 | 101 | |
dcubed@1757 | 102 | :build_tree |
dcubed@1757 | 103 | nmake -f %3/make/windows/build.make Variant=%2 WorkSpace=%3 BootStrapDir=%4 BuildUser="%USERNAME%" HOTSPOT_BUILD_VERSION="%5" %1 |
dcubed@1757 | 104 | goto end |
dcubed@1757 | 105 | |
duke@435 | 106 | :usage |
duke@435 | 107 | echo Usage: build flavor version workspace bootstrap_dir [build_id] [windbg_home] |
duke@435 | 108 | echo. |
duke@435 | 109 | echo where: |
duke@435 | 110 | echo flavor is "product", "debug" or "fastdebug", |
zgu@4492 | 111 | echo version is "core", "compiler1", "compiler2", or "tiered", |
duke@435 | 112 | echo workspace is source directory without trailing slash, |
dcubed@1757 | 113 | echo bootstrap_dir is a full path to a JDK in which bin/java |
dcubed@1757 | 114 | echo and bin/javac are present and working, and build_id is an |
duke@435 | 115 | echo optional build identifier displayed by java -version |
dcubed@1763 | 116 | exit /b 1 |
duke@435 | 117 | |
duke@435 | 118 | :end |
dcubed@1763 | 119 | exit /b %errorlevel% |