hotspot/make/windows/build.bat
author phh
Wed, 11 Jan 2012 17:34:02 -0500
changeset 11480 1bf714e8adb4
parent 7662 5f31baaff55b
child 13963 e5b53c306fb5
permissions -rw-r--r--
7115199: Add event tracing hooks and Java Flight Recorder infrastructure Summary: Added a nop tracing infrastructure, JFR makefile changes and other infrastructure used only by JFR. Reviewed-by: acorn, sspitsyn Contributed-by: markus.gronlund@oracle.com
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     1
@echo off
489c9b5090e2 Initial load
duke
parents:
diff changeset
     2
REM
7662
5f31baaff55b 7010068: Update all 2010 Oracle-changed OpenJDK files to have the proper copyright dates - first pass
trims
parents: 5547
diff changeset
     3
REM Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     4
REM DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     5
REM
489c9b5090e2 Initial load
duke
parents:
diff changeset
     6
REM This code is free software; you can redistribute it and/or modify it
489c9b5090e2 Initial load
duke
parents:
diff changeset
     7
REM under the terms of the GNU General Public License version 2 only, as
489c9b5090e2 Initial load
duke
parents:
diff changeset
     8
REM published by the Free Software Foundation.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     9
REM
489c9b5090e2 Initial load
duke
parents:
diff changeset
    10
REM This code is distributed in the hope that it will be useful, but WITHOUT
489c9b5090e2 Initial load
duke
parents:
diff changeset
    11
REM ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
489c9b5090e2 Initial load
duke
parents:
diff changeset
    12
REM FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
489c9b5090e2 Initial load
duke
parents:
diff changeset
    13
REM version 2 for more details (a copy is included in the LICENSE file that
489c9b5090e2 Initial load
duke
parents:
diff changeset
    14
REM accompanied this code).
489c9b5090e2 Initial load
duke
parents:
diff changeset
    15
REM
489c9b5090e2 Initial load
duke
parents:
diff changeset
    16
REM You should have received a copy of the GNU General Public License version
489c9b5090e2 Initial load
duke
parents:
diff changeset
    17
REM 2 along with this work; if not, write to the Free Software Foundation,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    18
REM Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    19
REM
5547
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 5093
diff changeset
    20
REM Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 5093
diff changeset
    21
REM or visit www.oracle.com if you need additional information or have any
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 5093
diff changeset
    22
REM questions.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    23
REM  
489c9b5090e2 Initial load
duke
parents:
diff changeset
    24
REM
489c9b5090e2 Initial load
duke
parents:
diff changeset
    25
489c9b5090e2 Initial load
duke
parents:
diff changeset
    26
489c9b5090e2 Initial load
duke
parents:
diff changeset
    27
REM
489c9b5090e2 Initial load
duke
parents:
diff changeset
    28
REM Since we don't have uname and we could be cross-compiling,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    29
REM Use the compiler to determine which ARCH we are building
489c9b5090e2 Initial load
duke
parents:
diff changeset
    30
REM 
5093
5fe28adc52ef 6938185: 3/4 6923488 breaks Windows command shell builds
dcubed
parents: 5087
diff changeset
    31
REM Note: Running this batch file from the Windows command shell requires
5fe28adc52ef 6938185: 3/4 6923488 breaks Windows command shell builds
dcubed
parents: 5087
diff changeset
    32
REM that "grep" be accessible on the PATH. An MKS install does this.
5fe28adc52ef 6938185: 3/4 6923488 breaks Windows command shell builds
dcubed
parents: 5087
diff changeset
    33
REM 
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    34
cl 2>&1 | grep "IA-64" >NUL
489c9b5090e2 Initial load
duke
parents:
diff changeset
    35
if %errorlevel% == 0 goto isia64
489c9b5090e2 Initial load
duke
parents:
diff changeset
    36
cl 2>&1 | grep "AMD64" >NUL
489c9b5090e2 Initial load
duke
parents:
diff changeset
    37
if %errorlevel% == 0 goto amd64
11480
1bf714e8adb4 7115199: Add event tracing hooks and Java Flight Recorder infrastructure
phh
parents: 7662
diff changeset
    38
cl 2>&1 | grep "x64" >NUL
1bf714e8adb4 7115199: Add event tracing hooks and Java Flight Recorder infrastructure
phh
parents: 7662
diff changeset
    39
if %errorlevel% == 0 goto amd64
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    40
set ARCH=x86
489c9b5090e2 Initial load
duke
parents:
diff changeset
    41
set BUILDARCH=i486
489c9b5090e2 Initial load
duke
parents:
diff changeset
    42
set Platform_arch=x86
489c9b5090e2 Initial load
duke
parents:
diff changeset
    43
set Platform_arch_model=x86_32
489c9b5090e2 Initial load
duke
parents:
diff changeset
    44
goto end
489c9b5090e2 Initial load
duke
parents:
diff changeset
    45
:amd64
489c9b5090e2 Initial load
duke
parents:
diff changeset
    46
set LP64=1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    47
set ARCH=x86
489c9b5090e2 Initial load
duke
parents:
diff changeset
    48
set BUILDARCH=amd64
489c9b5090e2 Initial load
duke
parents:
diff changeset
    49
set Platform_arch=x86
489c9b5090e2 Initial load
duke
parents:
diff changeset
    50
set Platform_arch_model=x86_64
489c9b5090e2 Initial load
duke
parents:
diff changeset
    51
goto end
489c9b5090e2 Initial load
duke
parents:
diff changeset
    52
:isia64
489c9b5090e2 Initial load
duke
parents:
diff changeset
    53
set LP64=1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    54
set ARCH=ia64
489c9b5090e2 Initial load
duke
parents:
diff changeset
    55
set Platform_arch=ia64
489c9b5090e2 Initial load
duke
parents:
diff changeset
    56
set Platform_arch_model=ia64
489c9b5090e2 Initial load
duke
parents:
diff changeset
    57
:end
489c9b5090e2 Initial load
duke
parents:
diff changeset
    58
489c9b5090e2 Initial load
duke
parents:
diff changeset
    59
if "%4" == ""          goto usage
489c9b5090e2 Initial load
duke
parents:
diff changeset
    60
if not "%7" == ""      goto usage
489c9b5090e2 Initial load
duke
parents:
diff changeset
    61
489c9b5090e2 Initial load
duke
parents:
diff changeset
    62
if "%1" == "product"   goto test1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    63
if "%1" == "debug"     goto test1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    64
if "%1" == "fastdebug" goto test1
5087
72635506e447 6923488: 4/4 need minor tweaks to HotSpot build for Cygwin
dcubed
parents: 670
diff changeset
    65
if "%1" == "tree"      goto test1
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    66
goto usage
489c9b5090e2 Initial load
duke
parents:
diff changeset
    67
489c9b5090e2 Initial load
duke
parents:
diff changeset
    68
:test1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    69
if "%2" == "core"      goto test2
5087
72635506e447 6923488: 4/4 need minor tweaks to HotSpot build for Cygwin
dcubed
parents: 670
diff changeset
    70
if "%2" == "kernel"    goto test2
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    71
if "%2" == "compiler1" goto test2
489c9b5090e2 Initial load
duke
parents:
diff changeset
    72
if "%2" == "compiler2" goto test2
489c9b5090e2 Initial load
duke
parents:
diff changeset
    73
if "%2" == "tiered"    goto test2
489c9b5090e2 Initial load
duke
parents:
diff changeset
    74
if "%2" == "adlc"      goto build_adlc
489c9b5090e2 Initial load
duke
parents:
diff changeset
    75
489c9b5090e2 Initial load
duke
parents:
diff changeset
    76
goto usage
489c9b5090e2 Initial load
duke
parents:
diff changeset
    77
489c9b5090e2 Initial load
duke
parents:
diff changeset
    78
:test2
5087
72635506e447 6923488: 4/4 need minor tweaks to HotSpot build for Cygwin
dcubed
parents: 670
diff changeset
    79
if "%1" == "tree"      goto build_tree
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    80
REM check_j2se_version
489c9b5090e2 Initial load
duke
parents:
diff changeset
    81
REM jvmti.make requires J2SE 1.4.x or newer.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    82
REM If not found then fail fast.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    83
%4\bin\javap javax.xml.transform.TransformerFactory >NUL
489c9b5090e2 Initial load
duke
parents:
diff changeset
    84
if %errorlevel% == 0 goto build
489c9b5090e2 Initial load
duke
parents:
diff changeset
    85
echo.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    86
echo J2SE version found at %4\bin\java:
489c9b5090e2 Initial load
duke
parents:
diff changeset
    87
%4\bin\java -version
489c9b5090e2 Initial load
duke
parents:
diff changeset
    88
echo.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    89
echo An XSLT processor (J2SE 1.4.x or newer) is required to
489c9b5090e2 Initial load
duke
parents:
diff changeset
    90
echo bootstrap this build
489c9b5090e2 Initial load
duke
parents:
diff changeset
    91
echo.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    92
489c9b5090e2 Initial load
duke
parents:
diff changeset
    93
goto usage
489c9b5090e2 Initial load
duke
parents:
diff changeset
    94
489c9b5090e2 Initial load
duke
parents:
diff changeset
    95
:build
338
5cf9f61d76f4 6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents: 1
diff changeset
    96
nmake -f %3/make/windows/build.make Variant=%2 WorkSpace=%3 BootStrapDir=%4 BuildUser="%USERNAME%" HOTSPOT_BUILD_VERSION="%5" %1
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    97
goto end
489c9b5090e2 Initial load
duke
parents:
diff changeset
    98
489c9b5090e2 Initial load
duke
parents:
diff changeset
    99
:build_adlc
338
5cf9f61d76f4 6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents: 1
diff changeset
   100
nmake -f %3/make/windows/build.make Variant=compiler2 WorkSpace=%3 BootStrapDir=%4 BuildUser="%USERNAME%" HOTSPOT_BUILD_VERSION=%5 ADLC_ONLY=1 %1
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   101
goto end
489c9b5090e2 Initial load
duke
parents:
diff changeset
   102
5087
72635506e447 6923488: 4/4 need minor tweaks to HotSpot build for Cygwin
dcubed
parents: 670
diff changeset
   103
:build_tree
72635506e447 6923488: 4/4 need minor tweaks to HotSpot build for Cygwin
dcubed
parents: 670
diff changeset
   104
nmake -f %3/make/windows/build.make Variant=%2 WorkSpace=%3 BootStrapDir=%4 BuildUser="%USERNAME%" HOTSPOT_BUILD_VERSION="%5" %1
72635506e447 6923488: 4/4 need minor tweaks to HotSpot build for Cygwin
dcubed
parents: 670
diff changeset
   105
goto end
72635506e447 6923488: 4/4 need minor tweaks to HotSpot build for Cygwin
dcubed
parents: 670
diff changeset
   106
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   107
:usage
489c9b5090e2 Initial load
duke
parents:
diff changeset
   108
echo Usage: build flavor version workspace bootstrap_dir [build_id] [windbg_home]
489c9b5090e2 Initial load
duke
parents:
diff changeset
   109
echo.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   110
echo where:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   111
echo flavor is "product", "debug" or "fastdebug",
489c9b5090e2 Initial load
duke
parents:
diff changeset
   112
echo version is "core", "kernel", "compiler1", "compiler2", or "tiered",
489c9b5090e2 Initial load
duke
parents:
diff changeset
   113
echo workspace is source directory without trailing slash, 
5087
72635506e447 6923488: 4/4 need minor tweaks to HotSpot build for Cygwin
dcubed
parents: 670
diff changeset
   114
echo bootstrap_dir is a full path to a JDK in which bin/java 
72635506e447 6923488: 4/4 need minor tweaks to HotSpot build for Cygwin
dcubed
parents: 670
diff changeset
   115
echo   and bin/javac are present and working, and build_id is an 
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   116
echo   optional build identifier displayed by java -version
5093
5fe28adc52ef 6938185: 3/4 6923488 breaks Windows command shell builds
dcubed
parents: 5087
diff changeset
   117
exit /b 1
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   118
489c9b5090e2 Initial load
duke
parents:
diff changeset
   119
:end
5093
5fe28adc52ef 6938185: 3/4 6923488 breaks Windows command shell builds
dcubed
parents: 5087
diff changeset
   120
exit /b %errorlevel%