提交 605d6dd9 编写于 作者: D dcubed

6923488: 4/4 need minor tweaks to HotSpot build for Cygwin

Summary: Clean up get_msc_ver, build.bat and build.make in general and for Cygwin.
Reviewed-by: ohair
上级 4c5340c9
...@@ -57,11 +57,12 @@ if not "%7" == "" goto usage ...@@ -57,11 +57,12 @@ if not "%7" == "" goto usage
if "%1" == "product" goto test1 if "%1" == "product" goto test1
if "%1" == "debug" goto test1 if "%1" == "debug" goto test1
if "%1" == "fastdebug" goto test1 if "%1" == "fastdebug" goto test1
if "%1" == "tree" goto test1
goto usage goto usage
:test1 :test1
if "%2" == "core" goto test2 if "%2" == "core" goto test2
if "%2" == "kernel" goto test2 if "%2" == "kernel" goto test2
if "%2" == "compiler1" goto test2 if "%2" == "compiler1" goto test2
if "%2" == "compiler2" goto test2 if "%2" == "compiler2" goto test2
if "%2" == "tiered" goto test2 if "%2" == "tiered" goto test2
...@@ -70,6 +71,7 @@ if "%2" == "adlc" goto build_adlc ...@@ -70,6 +71,7 @@ if "%2" == "adlc" goto build_adlc
goto usage goto usage
:test2 :test2
if "%1" == "tree" goto build_tree
REM check_j2se_version REM check_j2se_version
REM jvmti.make requires J2SE 1.4.x or newer. REM jvmti.make requires J2SE 1.4.x or newer.
REM If not found then fail fast. REM If not found then fail fast.
...@@ -93,6 +95,10 @@ goto end ...@@ -93,6 +95,10 @@ goto end
nmake -f %3/make/windows/build.make Variant=compiler2 WorkSpace=%3 BootStrapDir=%4 BuildUser="%USERNAME%" HOTSPOT_BUILD_VERSION=%5 ADLC_ONLY=1 %1 nmake -f %3/make/windows/build.make Variant=compiler2 WorkSpace=%3 BootStrapDir=%4 BuildUser="%USERNAME%" HOTSPOT_BUILD_VERSION=%5 ADLC_ONLY=1 %1
goto end goto end
:build_tree
nmake -f %3/make/windows/build.make Variant=%2 WorkSpace=%3 BootStrapDir=%4 BuildUser="%USERNAME%" HOTSPOT_BUILD_VERSION="%5" %1
goto end
:usage :usage
echo Usage: build flavor version workspace bootstrap_dir [build_id] [windbg_home] echo Usage: build flavor version workspace bootstrap_dir [build_id] [windbg_home]
echo. echo.
...@@ -100,8 +106,10 @@ echo where: ...@@ -100,8 +106,10 @@ echo where:
echo flavor is "product", "debug" or "fastdebug", echo flavor is "product", "debug" or "fastdebug",
echo version is "core", "kernel", "compiler1", "compiler2", or "tiered", echo version is "core", "kernel", "compiler1", "compiler2", or "tiered",
echo workspace is source directory without trailing slash, echo workspace is source directory without trailing slash,
echo bootstrap_dir is a full path to echo a JDK in which bin/java echo bootstrap_dir is a full path to a JDK in which bin/java
echo and bin/javac are present and working, and echo build_id is an echo and bin/javac are present and working, and build_id is an
echo optional build identifier displayed by java -version echo optional build identifier displayed by java -version
exit 1
:end :end
exit %errorlevel%
...@@ -233,6 +233,12 @@ develop: checks $(variantDir) $(variantDir)\local.make sanity ...@@ -233,6 +233,12 @@ develop: checks $(variantDir) $(variantDir)\local.make sanity
cd $(variantDir) cd $(variantDir)
nmake -nologo -f $(WorkSpace)\make\windows\makefiles\top.make BUILD_FLAVOR=product DEVELOP=1 ARCH=$(ARCH) nmake -nologo -f $(WorkSpace)\make\windows\makefiles\top.make BUILD_FLAVOR=product DEVELOP=1 ARCH=$(ARCH)
# target to create just the directory structure
tree: checks $(variantDir) $(variantDir)\local.make sanity
mkdir $(variantDir)\product
mkdir $(variantDir)\debug
mkdir $(variantDir)\fastdebug
sanity: sanity:
@ echo; @ echo;
@ cd $(variantDir) @ cd $(variantDir)
......
...@@ -22,6 +22,8 @@ ...@@ -22,6 +22,8 @@
# #
# #
set -e
# This shell script echoes "MSC_VER=<munged version of cl>" # This shell script echoes "MSC_VER=<munged version of cl>"
# It ignores the micro version component. # It ignores the micro version component.
# Examples: # Examples:
...@@ -38,17 +40,19 @@ ...@@ -38,17 +40,19 @@
# sh, and it has been found that sometimes `which sh` fails. # sh, and it has been found that sometimes `which sh` fails.
if [ "x$HotSpotMksHome" != "x" ]; then if [ "x$HotSpotMksHome" != "x" ]; then
MKS_HOME="$HotSpotMksHome" TOOL_DIR="$HotSpotMksHome"
else else
SH=`which sh` # HotSpotMksHome is not set so use the directory that contains "sh".
MKS_HOME=`dirname "$SH"` # This works with both MKS and Cygwin.
SH=`which sh`
TOOL_DIR=`dirname "$SH"`
fi fi
HEAD="$MKS_HOME/head" HEAD="$TOOL_DIR/head"
ECHO="$MKS_HOME/echo" ECHO="$TOOL_DIR/echo"
EXPR="$MKS_HOME/expr" EXPR="$TOOL_DIR/expr"
CUT="$MKS_HOME/cut" CUT="$TOOL_DIR/cut"
SED="$MKS_HOME/sed" SED="$TOOL_DIR/sed"
if [ "x$FORCE_MSC_VER" != "x" ]; then if [ "x$FORCE_MSC_VER" != "x" ]; then
echo "MSC_VER=$FORCE_MSC_VER" echo "MSC_VER=$FORCE_MSC_VER"
...@@ -70,7 +74,10 @@ fi ...@@ -70,7 +74,10 @@ fi
if [ "x$FORCE_LINK_VER" != "x" ]; then if [ "x$FORCE_LINK_VER" != "x" ]; then
echo "LINK_VER=$FORCE_LINK_VER" echo "LINK_VER=$FORCE_LINK_VER"
else else
LINK_VER_RAW=`link 2>&1 | "$HEAD" -n 1 | "$SED" 's/.*Version[\ ]*\([0-9][0-9.]*\).*/\1/'` # use the "link" command that is co-located with the "cl" command
cl_cmd=`which cl`
cl_dir=`dirname $cl_cmd`
LINK_VER_RAW=`$cl_dir/link 2>&1 | "$HEAD" -n 1 | "$SED" 's/.*Version[\ ]*\([0-9][0-9.]*\).*/\1/'`
LINK_VER_MAJOR=`"$ECHO" $LINK_VER_RAW | "$CUT" -d'.' -f1` LINK_VER_MAJOR=`"$ECHO" $LINK_VER_RAW | "$CUT" -d'.' -f1`
LINK_VER_MINOR=`"$ECHO" $LINK_VER_RAW | "$CUT" -d'.' -f2` LINK_VER_MINOR=`"$ECHO" $LINK_VER_RAW | "$CUT" -d'.' -f2`
LINK_VER_MICRO=`"$ECHO" $LINK_VER_RAW | "$CUT" -d'.' -f3` LINK_VER_MICRO=`"$ECHO" $LINK_VER_RAW | "$CUT" -d'.' -f3`
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册