build/windows/README

Sat, 01 Dec 2007 00:00:00 +0000

author
duke
date
Sat, 01 Dec 2007 00:00:00 +0000
changeset 435
a61af66fc99e
permissions
-rw-r--r--

Initial load

     1 Copyright (c) 2007 Sun Microsystems, Inc.  All Rights Reserved.
     2 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4 This code is free software; you can redistribute it and/or modify it
     5 under the terms of the GNU General Public License version 2 only, as
     6 published by the Free Software Foundation.
     8 This code is distributed in the hope that it will be useful, but WITHOUT
     9 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    10 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    11 version 2 for more details (a copy is included in the LICENSE file that
    12 accompanied this code).
    14 You should have received a copy of the GNU General Public License version
    15 2 along with this work; if not, write to the Free Software Foundation,
    16 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    18 Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
    19 CA 95054 USA or visit www.sun.com if you need additional information or
    20 have any questions.
    22 ________________________________________________________________________________
    24 __Introduction__________________________________________________________________
    26 This readme file should provide all the information needed to build
    27 the HotSpot VM for Windows 95/Windows NT from its teamware workspace.
    28 It is intended as a starting point for people who want to learn how
    29 to work with the current HotSpot source workspace and who need to
    30 build the VM locally. It is not intended as a tutorial for licensees.
    32 Last update: 03/28/05
    35 __Platform______________________________________________________________________
    37 The VM builds under the following platforms:
    38 - Windows NT 4.0 on Intel x486 or greater
    39 - x486 PC (or greater), 32MByte or more
    42 __Tools_________________________________________________________________________
    44 For building/testing the following tools need to be available:
    45 - Microsoft Visual C++ 6.0 (with nmake version 1.62.7022 or greater)
    46 - MKS Toolkit 6.1 or greater
    47   see: /net/reinstall/export/vol0/pc-archive/software/mks6.1 (NFS)
    48    or: \\reinstall\pc-archive\software\mks6.1                (NT)
    51 __JDK___________________________________________________________________________
    53 The workspace works with the following version of the JDK:
    54 (NOTE: these are out of date)
    55 - JDK1.2FCS "V" build
    56   see: /usr/local/java/jdk1.2/win32
    58 and the following version(s) of HotJava:
    59 - hjb1.1.4
    60 - hjb1.1.5
    61   see /usr/local/java/hjb1.1.x/win32
    64 __Environment variables_________________________________________________________
    66 The following environment variables need to be set up for the IDE
    67 build process.  For batch builds these do not need to be set.
    69 HotSpotMksHome     points to the (NFS or PC-local) directory where the MKS
    70                    executables (like sh.exe and grep.exe) are installed
    72 Optionally you may set the following variables in your environment and they
    73 will be picked up by the create.bat script used to generate the vm.vcproj files.
    74 See the section on building within MS Developer Studio for more details.
    76 HotSpotWorkSpace   points to the (NFS) directory where the workspace is located
    77 HotSpotBuildSpace  points to the (PC-local) directory where the vm is built
    78 HotSpotReleaseBinDest points to the (NFS or PC-local) directory where the product DLL is
    79 		      written
    80 HotSpotDebugBinDest   points to the (NFS or PC-local) directory where the debug DLL is
    81 		      written
    83 NOTE: For both batch and IDE builds, java and javac must be in your
    84 PATH, and the versions found by default must work. (If this turns out
    85 to be a problem, we can define HotSpotJava and HotSpotJavaC for
    86 bootstrapping...)
    88 __Building the JVM from the command line________________________________________
    90 1) choose a directory in which you want to build the vm
    91    (the build process will create a subdirectory)
    93 2) To build the 'core' version (debug || optimized)
    94    %HotSpotWorkSpace%\build\windows\build <flavor> core %HotSpotWorkSpace% <jdk_dir>
    95    To build the 'compiler2' version (debug || optimized)
    96    %HotSpotWorkSpace%\build\windows\build <flavor> compiler2 %HotSpotWorkSpace% <jdk_dir>
    98    where <jdk_dir> is a full path to a JDK in which bin/java and
    99    bin/javac are present and working.
   101 3) If you have problems with building, first try:
   102    vcvars32 <CR> (sets path for VC++)
   104 4) In addition to jvm.dll, the Serviceability Agent (SA) based JDI connector 
   105    and command line tools are built if dbgeng.h and dbgeng.lib
   106    can be located, and BUILD_WIN_SA=1 is specified.   We look for dbgeng.h here:
   107         $(MSVCDIR)\PlatformSDK\Include
   108         $(SYSTEMROOT)\..\Program Files\Microsoft SDK\include
   110   The first directory is part of  Visual Studio VC .NET 2003.
   111   The second is used on Windows-amd64.
   114 __Building the JVM from within MS Developer Studio______________________________
   116 0) Set environment variables as described above
   118 1) Run the following script:
   119    %HotSpotWorkSpace%\build\windows\create <type> { <workspace> <buildspace> <productbindest> <debugbindest> }
   120    where type is one of core, compiler1, compiler2.  If you leave off the
   121    "<workspace> <buildspace> <productbindest> <debugbindest>" part, the script expects to find their
   122    values in the HotSpotWorkSpace, HotSpotBuildSpace, HotSpotReleaseBinDest, and HotSpotDebugBinDest environment
   123    variables.  The resulting vm.vcproj does not depend on these values in the environment.
   125    This will populate the build space with the appropriate makefiles
   126    and run nmake in it. This builds and runs makedeps, which now
   127    generates the appropriate vm.vcproj into the build space. It also
   128    builds and runs adlc.
   130    To regenerate the .incl and .dsp files after changing the include
   131    databases, just run nmake in the build space.
   133    The build process now relies on java and javac. For the IDE builds,
   134    the full path to a JDK (in which bin/java and bin/javac are present
   135    and working) can be specified either explicitly with the
   136    ALT_BOOTDIR environment variable (like the JDK build process), via
   137    the JDK build's default BOOTDIR environment variable, via JAVA_HOME,
   138    or implicitly via the PATH.
   140    (Note that there are now many more command line options to MakeDeps
   141    on the Windows platform than before. These have been bundled into
   142    makefiles/makedeps.make, but it is still necessary to keep this in
   143    sync with the batch makefiles, in vm/generated.)
   145    If you have problems with building (i.e,. finding nmake), first try:
   146    vcvars32 <CR> (sets path for VC++)
   148 2) Double-click the vm.vcproj file in the %HotSpotBuildSpace% directory
   149    to open MS Developer Studio.
   151 3) build desired or all versions:
   152    menu Build -> Batch Build... -> Build (or Rebuild All)
   154 4) jvm.dll is in the %HotSpotReleaseBinDest% or %HotSpotDebugBinDest% directory
   155    depending on which configuration you built (release or debug).
   157 Note: do not edit any of the files (especially the vm.vcproj file) in the
   158 build space, since they are all either autogenerated or copied from
   159 the work space. If necessary, modify the original Makefiles in
   160 %HotSpotWorkSpace%\build\windows\projectfiles, or the shared
   161 makedeps arguments in
   162 %HotSpotWorkSpace%\build\windows\makefiles\makedeps.make.
   164 Note that it appears that some options set in the IDE (for example,
   165 the default executable) show up not in the .dsp file, but in the .opt
   166 file, so the automatic regeneration of the .dsp file should not
   167 destroy the project settings. However, makedeps.make should be edited
   168 to supply per-file compiler options.
   170 To build adlc from within the IDE for debugging purposes:
   172 1) in MS Developer Studio, open ADLCompiler.dsw:
   173    menu File -> Open Workspace...
   174    select & double-click ADLCompiler.dsw
   176 2) rebuild all (debug mode is enough)
   177    menu Build -> Rebuild All (make sure Win32 Debug version is selected)
   180 __Testing the VM________________________________________________________________
   182 To test the VM using the Tonga Testsuite, use testlook. testlook is a very
   183 simple testing framework on top of Tonga which allows us to use one (Tonga)
   184 test file, that can be extended with attributes.
   186 1) copy %HotSpotWorkSpace%\test\testlook.bat onto PC (preferably
   187    %HotSpotBuildSpace%\bin, which should ideally be in the path)
   189 2) run testlook <cr> or testlook help <cr> for details
   191 3) to run testlook you need to have Tonga mounted:
   192    net use T: \\tapas\export1\psqe
   195 __HotJava under HotSpot_________________________________________________________
   197 To run HotJava, use the .bat file %HotSpotWorkSpace%\test\h.bat. Copy
   198 it into %HotSpotBuildSpace%/<flavor> (which ideally is in the path) and run
   199 HotJava: h java <flags> (e.g., h java_g -Xint).
   202 __Preferred directory setup under Windows NT____________________________________
   204 Within the HotSpot group we are using the following directory setup:
   206 D:\jdk1.2          - where we install the JDK
   208 The following drives are mounted for testing/putbacks/etc.:
   210 net use T: \\tapas\export1\psqe
   211 net use Y: \\rschmidt\GammaBase
   212 net use Z: \\animorphic\animorphic

mercurial