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