# HG changeset patch # User Andreas Woess # Date 1328999744 -3600 # Node ID 76841bdd5f3e346f64173f462effbb8f8db7d0e1 # Parent ac6e494d048a8b32da21311b8b14bb14f422e6c4 (Windows) Add Graal build configurations (with GRAAL defined) and fix build command. diff -r ac6e494d048a -r 76841bdd5f3e make/windows/build.make --- a/make/windows/build.make Sat Feb 11 11:15:32 2012 -0800 +++ b/make/windows/build.make Sat Feb 11 23:35:44 2012 +0100 @@ -112,6 +112,8 @@ VARIANT_TEXT=Tiered !elseif "$(Variant)" == "kernel" VARIANT_TEXT=Kernel +!elseif "$(Variant)" == "graal" +VARIANT_TEXT=Graal !endif ######################################################################### @@ -302,9 +304,9 @@ checks: checkVariant checkWorkSpace checkSA checkVariant: - @ if "$(Variant)"=="" echo Need to specify "Variant=[tiered|compiler2|compiler1|kernel|core]" && false - @ if "$(Variant)" NEQ "tiered" if "$(Variant)" NEQ "compiler2" if "$(Variant)" NEQ "compiler1" if "$(Variant)" NEQ "kernel" if "$(Variant)" NEQ "core" \ - echo Need to specify "Variant=[tiered|compiler2|compiler1|kernel|core]" && false + @ if "$(Variant)"=="" echo Need to specify "Variant=[graal|tiered|compiler2|compiler1|kernel|core]" && false + @ if "$(Variant)" NEQ "graal" if "$(Variant)" NEQ "tiered" if "$(Variant)" NEQ "compiler2" if "$(Variant)" NEQ "compiler1" if "$(Variant)" NEQ "kernel" if "$(Variant)" NEQ "core" \ + echo Need to specify "Variant=[graal|tiered|compiler2|compiler1|kernel|core]" && false checkWorkSpace: @ if "$(WorkSpace)"=="" echo Need to specify "WorkSpace=..." && false diff -r ac6e494d048a -r 76841bdd5f3e make/windows/create.bat --- a/make/windows/create.bat Sat Feb 11 11:15:32 2012 -0800 +++ b/make/windows/create.bat Sat Feb 11 23:35:44 2012 +0100 @@ -150,7 +150,7 @@ REM This is now safe to do. :copyfiles -for /D %%i in (compiler1, compiler2, tiered, core, kernel) do ( +for /D %%i in (graal, compiler1, compiler2, tiered, core, kernel) do ( if NOT EXIST %HotSpotBuildSpace%\%%i\generated mkdir %HotSpotBuildSpace%\%%i\generated copy %HotSpotWorkSpace%\make\windows\projectfiles\%%i\* %HotSpotBuildSpace%\%%i\generated > NUL ) @@ -158,7 +158,7 @@ REM force regneration of ProjectFile if exist %ProjectFile% del %ProjectFile% -for /D %%i in (compiler1, compiler2, tiered, core, kernel) do ( +for /D %%i in (graal, compiler1, compiler2, tiered, core, kernel) do ( echo -- %%i -- echo # Generated file! > %HotSpotBuildSpace%\%%i\local.make echo # Changing a variable below and then deleting %ProjectFile% will cause >> %HotSpotBuildSpace%\%%i\local.make diff -r ac6e494d048a -r 76841bdd5f3e make/windows/makefiles/projectcreator.make --- a/make/windows/makefiles/projectcreator.make Sat Feb 11 11:15:32 2012 -0800 +++ b/make/windows/makefiles/projectcreator.make Sat Feb 11 23:35:44 2012 +0100 @@ -210,6 +210,14 @@ $(ProjectCreatorIDEOptionsIgnoreCompiler2:TARGET=compiler1) ################################################## +# Graal compiler specific options +################################################## +ProjectCreatorIDEOptions=$(ProjectCreatorIDEOptions) \ + -define_graal COMPILER1 \ + -define_graal GRAAL \ +$(ProjectCreatorIDEOptionsIgnoreCompiler2:TARGET=graal) + +################################################## # Server(C2) compiler specific options ################################################## #NOTE! This list must be kept in sync with GENERATED_NAMES in adlc.make. diff -r ac6e494d048a -r 76841bdd5f3e make/windows/makefiles/vm.make --- a/make/windows/makefiles/vm.make Sat Feb 11 11:15:32 2012 -0800 +++ b/make/windows/makefiles/vm.make Sat Feb 11 23:35:44 2012 +0100 @@ -60,6 +60,10 @@ CPP_FLAGS=$(CPP_FLAGS) /D "COMPILER1" /D "COMPILER2" !endif +!if "$(Variant)" == "graal" +CPP_FLAGS=$(CPP_FLAGS) /D "COMPILER1" /D "GRAAL" +!endif + !if "$(BUILDARCH)" == "i486" HOTSPOT_LIB_ARCH=i386 !else diff -r ac6e494d048a -r 76841bdd5f3e make/windows/projectfiles/graal/Makefile --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/make/windows/projectfiles/graal/Makefile Sat Feb 11 23:35:44 2012 +0100 @@ -0,0 +1,27 @@ +# +# Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. +# +# This code is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# version 2 for more details (a copy is included in the LICENSE file that +# accompanied this code). +# +# You should have received a copy of the GNU General Public License version +# 2 along with this work; if not, write to the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +# +# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# +# + +!include ../local.make + +!include $(HOTSPOTWORKSPACE)/make/windows/projectfiles/common/Makefile diff -r ac6e494d048a -r 76841bdd5f3e make/windows/projectfiles/graal/vm.def --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/make/windows/projectfiles/graal/vm.def Sat Feb 11 23:35:44 2012 +0100 @@ -0,0 +1,7 @@ +; +; This .DEF file is a placeholder for one which is automatically +; generated during the build process. See +; make\windows\build_vm_def.sh and +; make\windows\makefiles\projectcreator.make (esp. the "-prelink" +; options). +; diff -r ac6e494d048a -r 76841bdd5f3e make/windows/projectfiles/graal/vm.dsw --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/make/windows/projectfiles/graal/vm.dsw Sat Feb 11 23:35:44 2012 +0100 @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "vm"=.\vm.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff -r ac6e494d048a -r 76841bdd5f3e mx/commands.py --- a/mx/commands.py Sat Feb 11 11:15:32 2012 -0800 +++ b/mx/commands.py Sat Feb 11 23:35:44 2012 +0100 @@ -367,10 +367,7 @@ buildSuffix = 'graal' for build in builds: - jdk = _jdk(build, True) - if build == 'debug': - build = 'jvmg' vmDir = join(jdk, 'jre', 'lib', 'amd64', vm) if not exists(vmDir): @@ -385,19 +382,23 @@ compilelogfile = _graal_home + '/graalCompile.log' mksHome = mx.get_env('MKS_HOME', 'C:\\cygwin\\bin') - _runInDebugShell('msbuild ' + _graal_home + r'\build\vs-amd64\jvm.vcproj /p:Configuration=compiler1_product /target:clean', _graal_home) - winCompileCmd = r'set HotSpotMksHome=' + mksHome + r'& set OUT_DIR=' + jdk + r'& set JAVA_HOME=' + jdk + r'& set path=%JAVA_HOME%\bin;%path%;%HotSpotMksHome%& cd /D "' +_graal_home + r'\make\windows"& call create.bat ' + _graal_home + '' + variant = {'client': 'compiler1', 'server': 'compiler2'}.get(vm, vm) + project_config = variant + '_' + build + _runInDebugShell('msbuild ' + _graal_home + r'\build\vs-amd64\jvm.vcproj /p:Configuration=' + project_config + ' /target:clean', _graal_home) + winCompileCmd = r'set HotSpotMksHome=' + mksHome + r'& set OUT_DIR=' + jdk + r'& set JAVA_HOME=' + jdk + r'& set path=%JAVA_HOME%\bin;%path%;%HotSpotMksHome%& cd /D "' +_graal_home + r'\make\windows"& call create.bat ' + _graal_home print(winCompileCmd) winCompileSuccess = re.compile(r"^Writing \.vcxproj file:") if not _runInDebugShell(winCompileCmd, _graal_home, compilelogfile, winCompileSuccess): mx.log('Error executing create command') return - winBuildCmd = 'msbuild ' + _graal_home + r'\build\vs-amd64\jvm.vcxproj /p:Configuration=compiler1_product /p:Platform=x64' + winBuildCmd = 'msbuild ' + _graal_home + r'\build\vs-amd64\jvm.vcxproj /p:Configuration=' + project_config + ' /p:Platform=x64' winBuildSuccess = re.compile('Build succeeded.') if not _runInDebugShell(winBuildCmd, _graal_home, compilelogfile, winBuildSuccess): mx.log('Error building project') return else: + if build == 'debug': + build = 'jvmg' env = os.environ env.setdefault('ARCH_DATA_MODEL', '64') env.setdefault('LANG', 'C') diff -r ac6e494d048a -r 76841bdd5f3e src/share/tools/ProjectCreator/BuildConfig.java --- a/src/share/tools/ProjectCreator/BuildConfig.java Sat Feb 11 11:15:32 2012 -0800 +++ b/src/share/tools/ProjectCreator/BuildConfig.java Sat Feb 11 23:35:44 2012 +0100 @@ -68,18 +68,20 @@ if (value != null) { outDir = value; } - if (outDir.endsWith("debug")) { + if(outDir.endsWith("fastdebug")) { + outDir = outDir.substring(0, outDir.lastIndexOf("fastdebug") - 1); + } else if (outDir.endsWith("debug")) { outDir = outDir.substring(0, outDir.lastIndexOf("debug") - 1); - } else if(outDir.endsWith("fastdebug")) { - outDir = outDir.substring(0, outDir.lastIndexOf("fastdebug") - 1); } if (!build.equals("product")) { outDir += Util.sep + build; } outDir += Util.sep + "jre" + Util.sep + "bin"; - if (flavour.equals("compiler1")) { + if (flavour.equals("graal")) { outDir += Util.sep + "graal"; + } else if (flavour.equals("compiler1")) { + outDir += Util.sep + "client"; } else { outDir += Util.sep + "server"; } @@ -126,7 +128,6 @@ tree.addSubdirToIgnore("Codemgr_wsdata"); tree.addSubdirToIgnore("deleted_files"); tree.addSubdirToIgnore("SCCS"); - tree.setVerbose(true); if (startAt != null) { tree.readDirectory(sourceBase + File.separator + startAt); } else { @@ -576,6 +577,28 @@ } } +class GraalDebugConfig extends GenericDebugNonKernelConfig { + String getOptFlag() { + return getCI().getNoOptFlag(); + } + + GraalDebugConfig() { + initNames("graal", "debug", "jvm.dll"); + init(getIncludes(), getDefines()); + } +} + +class GraalFastDebugConfig extends GenericDebugNonKernelConfig { + String getOptFlag() { + return getCI().getOptFlag(); + } + + GraalFastDebugConfig() { + initNames("graal", "fastdebug", "jvm.dll"); + init(getIncludes(), getDefines()); + } +} + class C1DebugConfig extends GenericDebugNonKernelConfig { String getOptFlag() { return getCI().getNoOptFlag(); @@ -655,6 +678,13 @@ } } +class GraalProductConfig extends ProductConfig { + GraalProductConfig() { + initNames("graal", "product", "jvm.dll"); + init(getIncludes(), getDefines()); + } +} + class C1ProductConfig extends ProductConfig { C1ProductConfig() { initNames("compiler1", "product", "jvm.dll"); diff -r ac6e494d048a -r 76841bdd5f3e src/share/tools/ProjectCreator/WinGammaPlatform.java --- a/src/share/tools/ProjectCreator/WinGammaPlatform.java Sat Feb 11 11:15:32 2012 -0800 +++ b/src/share/tools/ProjectCreator/WinGammaPlatform.java Sat Feb 11 23:35:44 2012 +0100 @@ -586,6 +586,10 @@ Vector createAllConfigs(String platform) { Vector allConfigs = new Vector(); + allConfigs.add(new GraalDebugConfig()); + allConfigs.add(new GraalFastDebugConfig()); + allConfigs.add(new GraalProductConfig()); + allConfigs.add(new C1DebugConfig()); allConfigs.add(new C1FastDebugConfig()); allConfigs.add(new C1ProductConfig());