hotspot/make/windows/build.bat
author lana
Thu, 11 Feb 2016 14:39:51 -0800
changeset 35741 5e023f75be9f
parent 35182 3e3e2c3cfe6e
permissions -rw-r--r--
Added tag jdk-9+105 for changeset d0b71f2375d0
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
35182
3e3e2c3cfe6e 8145603: Enable build.bat to use vcproj to build
ctornqvi
parents: 15432
diff changeset
     3
REM Copyright (c) 1997, 2015, 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
35182
3e3e2c3cfe6e 8145603: Enable build.bat to use vcproj to build
ctornqvi
parents: 15432
diff changeset
    26
REM Set HotSpotWorkSpace to the directory two steps above this script
3e3e2c3cfe6e 8145603: Enable build.bat to use vcproj to build
ctornqvi
parents: 15432
diff changeset
    27
for %%i in ("%~dp0..") do ( set HotSpotWorkSpace=%%~dpi)
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    28
489c9b5090e2 Initial load
duke
parents:
diff changeset
    29
REM
489c9b5090e2 Initial load
duke
parents:
diff changeset
    30
REM Since we don't have uname and we could be cross-compiling,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    31
REM Use the compiler to determine which ARCH we are building
489c9b5090e2 Initial load
duke
parents:
diff changeset
    32
REM 
35182
3e3e2c3cfe6e 8145603: Enable build.bat to use vcproj to build
ctornqvi
parents: 15432
diff changeset
    33
cl 2>&1 1>&3 | findstr x64>NUL
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    34
if %errorlevel% == 0 goto amd64
35182
3e3e2c3cfe6e 8145603: Enable build.bat to use vcproj to build
ctornqvi
parents: 15432
diff changeset
    35
set VCPROJ=%HotSpotWorkSpace%\build\vs-i486\jvm.vcxproj
3e3e2c3cfe6e 8145603: Enable build.bat to use vcproj to build
ctornqvi
parents: 15432
diff changeset
    36
set PLATFORM=x86
3e3e2c3cfe6e 8145603: Enable build.bat to use vcproj to build
ctornqvi
parents: 15432
diff changeset
    37
goto testmkshome
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    38
:amd64
35182
3e3e2c3cfe6e 8145603: Enable build.bat to use vcproj to build
ctornqvi
parents: 15432
diff changeset
    39
set VCPROJ=%HotSpotWorkSpace%\build\vs-amd64\jvm.vcxproj
3e3e2c3cfe6e 8145603: Enable build.bat to use vcproj to build
ctornqvi
parents: 15432
diff changeset
    40
set PLATFORM=x64
3e3e2c3cfe6e 8145603: Enable build.bat to use vcproj to build
ctornqvi
parents: 15432
diff changeset
    41
goto testmkshome
3e3e2c3cfe6e 8145603: Enable build.bat to use vcproj to build
ctornqvi
parents: 15432
diff changeset
    42
3e3e2c3cfe6e 8145603: Enable build.bat to use vcproj to build
ctornqvi
parents: 15432
diff changeset
    43
:testmkshome
3e3e2c3cfe6e 8145603: Enable build.bat to use vcproj to build
ctornqvi
parents: 15432
diff changeset
    44
if not "%HOTSPOTMKSHOME%" == "" goto testjavahome
3e3e2c3cfe6e 8145603: Enable build.bat to use vcproj to build
ctornqvi
parents: 15432
diff changeset
    45
if exist c:\cygwin\bin set HOTSPOTMKSHOME=c:\cygwin\bin
3e3e2c3cfe6e 8145603: Enable build.bat to use vcproj to build
ctornqvi
parents: 15432
diff changeset
    46
if not "%HOTSPOTMKSHOME%" == "" goto testjavahome
3e3e2c3cfe6e 8145603: Enable build.bat to use vcproj to build
ctornqvi
parents: 15432
diff changeset
    47
if exist c:\cygwin64\bin set HOTSPOTMKSHOME=c:\cygwin64\bin
3e3e2c3cfe6e 8145603: Enable build.bat to use vcproj to build
ctornqvi
parents: 15432
diff changeset
    48
if not "%HOTSPOTMKSHOME%" == "" goto testjavahome
3e3e2c3cfe6e 8145603: Enable build.bat to use vcproj to build
ctornqvi
parents: 15432
diff changeset
    49
echo Error: please set variable HOTSPOTMKSHOME to place where 
3e3e2c3cfe6e 8145603: Enable build.bat to use vcproj to build
ctornqvi
parents: 15432
diff changeset
    50
echo          your MKS/Cygwin installation is
3e3e2c3cfe6e 8145603: Enable build.bat to use vcproj to build
ctornqvi
parents: 15432
diff changeset
    51
echo.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    52
goto end
489c9b5090e2 Initial load
duke
parents:
diff changeset
    53
35182
3e3e2c3cfe6e 8145603: Enable build.bat to use vcproj to build
ctornqvi
parents: 15432
diff changeset
    54
:testjavahome
3e3e2c3cfe6e 8145603: Enable build.bat to use vcproj to build
ctornqvi
parents: 15432
diff changeset
    55
if not "%JAVA_HOME%" == "" goto testbuildversion
3e3e2c3cfe6e 8145603: Enable build.bat to use vcproj to build
ctornqvi
parents: 15432
diff changeset
    56
echo Error: please set variable JAVA_HOME to a bootstrap JDK 
3e3e2c3cfe6e 8145603: Enable build.bat to use vcproj to build
ctornqvi
parents: 15432
diff changeset
    57
echo.
3e3e2c3cfe6e 8145603: Enable build.bat to use vcproj to build
ctornqvi
parents: 15432
diff changeset
    58
goto end
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    59
35182
3e3e2c3cfe6e 8145603: Enable build.bat to use vcproj to build
ctornqvi
parents: 15432
diff changeset
    60
:testbuildversion
3e3e2c3cfe6e 8145603: Enable build.bat to use vcproj to build
ctornqvi
parents: 15432
diff changeset
    61
if "%1" == "compiler1" goto testdebuglevel
3e3e2c3cfe6e 8145603: Enable build.bat to use vcproj to build
ctornqvi
parents: 15432
diff changeset
    62
if "%1" == "tiered"    goto testdebuglevel
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    63
goto usage
489c9b5090e2 Initial load
duke
parents:
diff changeset
    64
35182
3e3e2c3cfe6e 8145603: Enable build.bat to use vcproj to build
ctornqvi
parents: 15432
diff changeset
    65
:testdebuglevel
3e3e2c3cfe6e 8145603: Enable build.bat to use vcproj to build
ctornqvi
parents: 15432
diff changeset
    66
if "%2" == "product"   goto build
3e3e2c3cfe6e 8145603: Enable build.bat to use vcproj to build
ctornqvi
parents: 15432
diff changeset
    67
if "%2" == "debug"     goto build
3e3e2c3cfe6e 8145603: Enable build.bat to use vcproj to build
ctornqvi
parents: 15432
diff changeset
    68
if "%2" == "fastdebug" goto build
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    69
goto usage
489c9b5090e2 Initial load
duke
parents:
diff changeset
    70
489c9b5090e2 Initial load
duke
parents:
diff changeset
    71
:build
35182
3e3e2c3cfe6e 8145603: Enable build.bat to use vcproj to build
ctornqvi
parents: 15432
diff changeset
    72
if NOT EXIST %VCPROJ% call %~dp0\create.bat %JAVA_HOME%
3e3e2c3cfe6e 8145603: Enable build.bat to use vcproj to build
ctornqvi
parents: 15432
diff changeset
    73
msbuild /Property:Platform=%PLATFORM% /Property:Configuration=%1_%2 /v:m %VCPROJ%
5087
72635506e447 6923488: 4/4 need minor tweaks to HotSpot build for Cygwin
dcubed
parents: 670
diff changeset
    74
goto end
72635506e447 6923488: 4/4 need minor tweaks to HotSpot build for Cygwin
dcubed
parents: 670
diff changeset
    75
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    76
:usage
35182
3e3e2c3cfe6e 8145603: Enable build.bat to use vcproj to build
ctornqvi
parents: 15432
diff changeset
    77
echo Usage: build version debuglevel
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    78
echo.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    79
echo where:
35182
3e3e2c3cfe6e 8145603: Enable build.bat to use vcproj to build
ctornqvi
parents: 15432
diff changeset
    80
echo version is "compiler1" or "tiered",
3e3e2c3cfe6e 8145603: Enable build.bat to use vcproj to build
ctornqvi
parents: 15432
diff changeset
    81
echo debuglevel is "product", "debug" or "fastdebug"
5093
5fe28adc52ef 6938185: 3/4 6923488 breaks Windows command shell builds
dcubed
parents: 5087
diff changeset
    82
exit /b 1
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    83
489c9b5090e2 Initial load
duke
parents:
diff changeset
    84
:end
5093
5fe28adc52ef 6938185: 3/4 6923488 breaks Windows command shell builds
dcubed
parents: 5087
diff changeset
    85
exit /b %errorlevel%