Mercurial > hg > graal-jvmci-8
comparison make/windows/makefiles/compile.make @ 427:3c07cda72b7d
6764892: VS2008 changes required to compile hotspot sources
Summary: Minor changes required to build using the Visual Studio 2008 compiler
Reviewed-by: kvn, ohair
author | tbell |
---|---|
date | Tue, 11 Nov 2008 22:01:08 -0800 |
parents | d1605aabd0a1 |
children | c3a720eefe82 |
comparison
equal
deleted
inserted
replaced
421:577f3a2e0662 | 427:3c07cda72b7d |
---|---|
28 # CPP Flags: (these vary slightly from VC6->VS2003->VS2005 compilers) | 28 # CPP Flags: (these vary slightly from VC6->VS2003->VS2005 compilers) |
29 # /nologo Supress copyright message at every cl.exe startup | 29 # /nologo Supress copyright message at every cl.exe startup |
30 # /W3 Warning level 3 | 30 # /W3 Warning level 3 |
31 # /Zi Include debugging information | 31 # /Zi Include debugging information |
32 # /WX Treat any warning error as a fatal error | 32 # /WX Treat any warning error as a fatal error |
33 # /MD Use dynamic multi-threaded runtime (msvcrt.dll or msvc*71.dll) | 33 # /MD Use dynamic multi-threaded runtime (msvcrt.dll or msvc*NN.dll) |
34 # /MTd Use static multi-threaded runtime debug versions | 34 # /MTd Use static multi-threaded runtime debug versions |
35 # /O1 Optimize for size (/Os), skips /Oi | 35 # /O1 Optimize for size (/Os), skips /Oi |
36 # /O2 Optimize for speed (/Ot), adds /Oi to /O1 | 36 # /O2 Optimize for speed (/Ot), adds /Oi to /O1 |
37 # /Ox Old "all optimizations flag" for VC6 (in /O1) | 37 # /Ox Old "all optimizations flag" for VC6 (in /O1) |
38 # /Oy Use frame pointer register as GP reg (in /Ox and /O1) | 38 # /Oy Use frame pointer register as GP reg (in /Ox and /O1) |
78 # Sanity check, this is the default if not amd64, ia64, or i486 | 78 # Sanity check, this is the default if not amd64, ia64, or i486 |
79 !ifndef DEFAULT_COMPILER_NAME | 79 !ifndef DEFAULT_COMPILER_NAME |
80 CPP=ARCH_ERROR | 80 CPP=ARCH_ERROR |
81 !endif | 81 !endif |
82 | 82 |
83 # MSC_VER is a 4 digit number that tells us what compiler is being used, it is | 83 # MSC_VER is a 4 digit number that tells us what compiler is being used |
84 # generated when the local.make file is created by the script gen_msc_ver.sh. | 84 # and is generated when the local.make file is created by build.make |
85 # via the script get_msc_ver.sh | |
86 # | |
85 # If MSC_VER is set, it overrides the above default setting. | 87 # If MSC_VER is set, it overrides the above default setting. |
86 # But it should be set. | 88 # But it should be set. |
87 # Possible values: | 89 # Possible values: |
88 # 1200 is for VC6 | 90 # 1200 is for VC6 |
89 # 1300 and 1310 is VS2003 or VC7 | 91 # 1300 and 1310 is VS2003 or VC7 |
90 # 1399 is our fake number for the VS2005 compiler that really isn't 1400 | 92 # 1399 is our fake number for the VS2005 compiler that really isn't 1400 |
91 # 1400 is for VS2005 | 93 # 1400 is for VS2005 |
94 # 1500 is for VS2008 | |
92 # Do not confuse this MSC_VER with the predefined macro _MSC_VER that the | 95 # Do not confuse this MSC_VER with the predefined macro _MSC_VER that the |
93 # compiler provides, when MSC_VER==1399, _MSC_VER will be 1400. | 96 # compiler provides, when MSC_VER==1399, _MSC_VER will be 1400. |
94 # Normally they are the same, but a pre-release of the VS2005 compilers | 97 # Normally they are the same, but a pre-release of the VS2005 compilers |
95 # in the Windows 64bit Platform SDK said it was 1400 when it was really | 98 # in the Windows 64bit Platform SDK said it was 1400 when it was really |
96 # closer to VS2003 in terms of option spellings, so we use 1399 for that | 99 # closer to VS2003 in terms of option spellings, so we use 1399 for that |
97 # 1400 version that really isn't 1400. | 100 # 1400 version that really isn't 1400. |
98 # See the file gen_msc_ver.sh for more info. | 101 # See the file get_msc_ver.sh for more info. |
99 !if "x$(MSC_VER)" == "x" | 102 !if "x$(MSC_VER)" == "x" |
100 COMPILER_NAME=$(DEFAULT_COMPILER_NAME) | 103 COMPILER_NAME=$(DEFAULT_COMPILER_NAME) |
101 !else | 104 !else |
102 !if "$(MSC_VER)" == "1200" | 105 !if "$(MSC_VER)" == "1200" |
103 COMPILER_NAME=VC6 | 106 COMPILER_NAME=VC6 |
112 # Compiler might say 1400, but if it's 14.00.30701, it isn't really VS2005 | 115 # Compiler might say 1400, but if it's 14.00.30701, it isn't really VS2005 |
113 COMPILER_NAME=VS2003 | 116 COMPILER_NAME=VS2003 |
114 !endif | 117 !endif |
115 !if "$(MSC_VER)" == "1400" | 118 !if "$(MSC_VER)" == "1400" |
116 COMPILER_NAME=VS2005 | 119 COMPILER_NAME=VS2005 |
120 !endif | |
121 !if "$(MSC_VER)" == "1500" | |
122 COMPILER_NAME=VS2008 | |
117 !endif | 123 !endif |
118 !endif | 124 !endif |
119 | 125 |
120 # Add what version of the compiler we think this is to the compile line | 126 # Add what version of the compiler we think this is to the compile line |
121 CPP_FLAGS=$(CPP_FLAGS) /D "MSC_VER=$(MSC_VER)" | 127 CPP_FLAGS=$(CPP_FLAGS) /D "MSC_VER=$(MSC_VER)" |
158 # This VS2005 compiler has /GS as a default and requires bufferoverflowU.lib | 164 # This VS2005 compiler has /GS as a default and requires bufferoverflowU.lib |
159 # on the link command line, otherwise we get missing __security_check_cookie | 165 # on the link command line, otherwise we get missing __security_check_cookie |
160 # externals at link time. Even with /GS-, you need bufferoverflowU.lib. | 166 # externals at link time. Even with /GS-, you need bufferoverflowU.lib. |
161 # NOTE: Currently we decided to not use /GS- | 167 # NOTE: Currently we decided to not use /GS- |
162 BUFFEROVERFLOWLIB = bufferoverflowU.lib | 168 BUFFEROVERFLOWLIB = bufferoverflowU.lib |
163 LINK_FLAGS = $(LINK_FLAGS) $(BUFFEROVERFLOWLIB) | 169 LINK_FLAGS = /manifest $(LINK_FLAGS) $(BUFFEROVERFLOWLIB) |
170 # Manifest Tool - used in VS2005 and later to adjust manifests stored | |
171 # as resources inside build artifacts. | |
172 MT=mt.exe | |
173 !if "$(BUILDARCH)" == "i486" | |
174 # VS2005 on x86 restricts the use of certain libc functions without this | |
175 CPP_FLAGS=$(CPP_FLAGS) /D _CRT_SECURE_NO_DEPRECATE | |
176 !endif | |
177 !endif | |
178 | |
179 !if "$(COMPILER_NAME)" == "VS2008" | |
180 PRODUCT_OPT_OPTION = /O2 /Oy- | |
181 FASTDEBUG_OPT_OPTION = /O2 /Oy- | |
182 DEBUG_OPT_OPTION = /Od | |
183 GX_OPTION = /EHsc | |
184 LINK_FLAGS = /manifest $(LINK_FLAGS) | |
185 # Manifest Tool - used in VS2005 and later to adjust manifests stored | |
186 # as resources inside build artifacts. | |
187 MT=mt.exe | |
164 !if "$(BUILDARCH)" == "i486" | 188 !if "$(BUILDARCH)" == "i486" |
165 # VS2005 on x86 restricts the use of certain libc functions without this | 189 # VS2005 on x86 restricts the use of certain libc functions without this |
166 CPP_FLAGS=$(CPP_FLAGS) /D _CRT_SECURE_NO_DEPRECATE | 190 CPP_FLAGS=$(CPP_FLAGS) /D _CRT_SECURE_NO_DEPRECATE |
167 !endif | 191 !endif |
168 !endif | 192 !endif |