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