Mercurial > hg > graal-jvmci-8
comparison make/windows/makefiles/compile.make @ 4891:719f7007c8e8
7141242: build-infra merge: Rename CPP->CXX and LINK->LD
Summary: Cleaned up make variables for compilers and linker to consistently use CXX for C++ compiler, CC for C compiler and LD for linker.
Reviewed-by: dholmes, ohrstrom
author | erikj |
---|---|
date | Mon, 06 Feb 2012 09:14:22 +0100 |
parents | b1cbb0907b36 |
children | 7292cff45988 d652a62d6e03 |
comparison
equal
deleted
inserted
replaced
4890:c77d473e71f7 | 4891:719f7007c8e8 |
---|---|
21 # questions. | 21 # questions. |
22 # | 22 # |
23 # | 23 # |
24 | 24 |
25 # Generic compiler settings | 25 # Generic compiler settings |
26 CPP=cl.exe | 26 CXX=cl.exe |
27 | 27 |
28 # CPP Flags: (these vary slightly from VC6->VS2003->VS2005 compilers) | 28 # CXX 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*NN.dll) | 33 # /MD Use dynamic multi-threaded runtime (msvcrt.dll or msvc*NN.dll) |
48 # 6655385: For VS2003/2005 we now specify /Oy- (disable frame pointer | 48 # 6655385: For VS2003/2005 we now specify /Oy- (disable frame pointer |
49 # omission.) This has little to no effect on performance while vastly | 49 # omission.) This has little to no effect on performance while vastly |
50 # improving the quality of crash log stack traces involving jvm.dll. | 50 # improving the quality of crash log stack traces involving jvm.dll. |
51 | 51 |
52 # These are always used in all compiles | 52 # These are always used in all compiles |
53 CPP_FLAGS=/nologo /W3 /WX | 53 CXX_FLAGS=/nologo /W3 /WX |
54 | 54 |
55 # Let's add debug information always too. | 55 # Let's add debug information always too. |
56 CPP_FLAGS=$(CPP_FLAGS) /Zi | 56 CXX_FLAGS=$(CXX_FLAGS) /Zi |
57 | 57 |
58 # Based on BUILDARCH we add some flags and select the default compiler name | 58 # Based on BUILDARCH we add some flags and select the default compiler name |
59 !if "$(BUILDARCH)" == "ia64" | 59 !if "$(BUILDARCH)" == "ia64" |
60 MACHINE=IA64 | 60 MACHINE=IA64 |
61 DEFAULT_COMPILER_NAME=VS2003 | 61 DEFAULT_COMPILER_NAME=VS2003 |
62 CPP_FLAGS=$(CPP_FLAGS) /D "CC_INTERP" /D "_LP64" /D "IA64" | 62 CXX_FLAGS=$(CXX_FLAGS) /D "CC_INTERP" /D "_LP64" /D "IA64" |
63 !endif | 63 !endif |
64 | 64 |
65 !if "$(BUILDARCH)" == "amd64" | 65 !if "$(BUILDARCH)" == "amd64" |
66 MACHINE=AMD64 | 66 MACHINE=AMD64 |
67 DEFAULT_COMPILER_NAME=VS2005 | 67 DEFAULT_COMPILER_NAME=VS2005 |
68 CPP_FLAGS=$(CPP_FLAGS) /D "_LP64" /D "AMD64" | 68 CXX_FLAGS=$(CXX_FLAGS) /D "_LP64" /D "AMD64" |
69 LP64=1 | 69 LP64=1 |
70 !endif | 70 !endif |
71 | 71 |
72 !if "$(BUILDARCH)" == "i486" | 72 !if "$(BUILDARCH)" == "i486" |
73 MACHINE=I386 | 73 MACHINE=I386 |
74 DEFAULT_COMPILER_NAME=VS2003 | 74 DEFAULT_COMPILER_NAME=VS2003 |
75 CPP_FLAGS=$(CPP_FLAGS) /D "IA32" | 75 CXX_FLAGS=$(CXX_FLAGS) /D "IA32" |
76 !endif | 76 !endif |
77 | 77 |
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 CXX=ARCH_ERROR |
81 !endif | 81 !endif |
82 | 82 |
83 CPP_FLAGS=$(CPP_FLAGS) /D "WIN32" /D "_WINDOWS" | 83 CXX_FLAGS=$(CXX_FLAGS) /D "WIN32" /D "_WINDOWS" |
84 # Must specify this for sharedRuntimeTrig.cpp | 84 # Must specify this for sharedRuntimeTrig.cpp |
85 CPP_FLAGS=$(CPP_FLAGS) /D "VM_LITTLE_ENDIAN" | 85 CXX_FLAGS=$(CXX_FLAGS) /D "VM_LITTLE_ENDIAN" |
86 | 86 |
87 # Used for platform dispatching | 87 # Used for platform dispatching |
88 CPP_FLAGS=$(CPP_FLAGS) /D TARGET_OS_FAMILY_windows | 88 CXX_FLAGS=$(CXX_FLAGS) /D TARGET_OS_FAMILY_windows |
89 CPP_FLAGS=$(CPP_FLAGS) /D TARGET_ARCH_$(Platform_arch) | 89 CXX_FLAGS=$(CXX_FLAGS) /D TARGET_ARCH_$(Platform_arch) |
90 CPP_FLAGS=$(CPP_FLAGS) /D TARGET_ARCH_MODEL_$(Platform_arch_model) | 90 CXX_FLAGS=$(CXX_FLAGS) /D TARGET_ARCH_MODEL_$(Platform_arch_model) |
91 CPP_FLAGS=$(CPP_FLAGS) /D TARGET_OS_ARCH_windows_$(Platform_arch) | 91 CXX_FLAGS=$(CXX_FLAGS) /D TARGET_OS_ARCH_windows_$(Platform_arch) |
92 CPP_FLAGS=$(CPP_FLAGS) /D TARGET_OS_ARCH_MODEL_windows_$(Platform_arch_model) | 92 CXX_FLAGS=$(CXX_FLAGS) /D TARGET_OS_ARCH_MODEL_windows_$(Platform_arch_model) |
93 CPP_FLAGS=$(CPP_FLAGS) /D TARGET_COMPILER_visCPP | 93 CXX_FLAGS=$(CXX_FLAGS) /D TARGET_COMPILER_visCPP |
94 | 94 |
95 | 95 |
96 # MSC_VER is a 4 digit number that tells us what compiler is being used | 96 # MSC_VER is a 4 digit number that tells us what compiler is being used |
97 # and is generated when the local.make file is created by build.make | 97 # and is generated when the local.make file is created by build.make |
98 # via the script get_msc_ver.sh | 98 # via the script get_msc_ver.sh |
148 !endif | 148 !endif |
149 | 149 |
150 # Always add the _STATIC_CPPLIB flag | 150 # Always add the _STATIC_CPPLIB flag |
151 STATIC_CPPLIB_OPTION = /D _STATIC_CPPLIB /D _DISABLE_DEPRECATE_STATIC_CPPLIB | 151 STATIC_CPPLIB_OPTION = /D _STATIC_CPPLIB /D _DISABLE_DEPRECATE_STATIC_CPPLIB |
152 MS_RUNTIME_OPTION = $(MS_RUNTIME_OPTION) $(STATIC_CPPLIB_OPTION) | 152 MS_RUNTIME_OPTION = $(MS_RUNTIME_OPTION) $(STATIC_CPPLIB_OPTION) |
153 CPP_FLAGS=$(CPP_FLAGS) $(MS_RUNTIME_OPTION) | 153 CXX_FLAGS=$(CXX_FLAGS) $(MS_RUNTIME_OPTION) |
154 | 154 |
155 # How /GX option is spelled | 155 # How /GX option is spelled |
156 GX_OPTION = /GX | 156 GX_OPTION = /GX |
157 | 157 |
158 # Optimization settings for various versions of the compilers and types of | 158 # Optimization settings for various versions of the compilers and types of |
159 # builds. Three basic sets of settings: product, fastdebug, and debug. | 159 # builds. Three basic sets of settings: product, fastdebug, and debug. |
160 # These get added into CPP_FLAGS as needed by other makefiles. | 160 # These get added into CXX_FLAGS as needed by other makefiles. |
161 !if "$(COMPILER_NAME)" == "VC6" | 161 !if "$(COMPILER_NAME)" == "VC6" |
162 PRODUCT_OPT_OPTION = /Ox /Os /Gy /GF | 162 PRODUCT_OPT_OPTION = /Ox /Os /Gy /GF |
163 FASTDEBUG_OPT_OPTION = /Ox /Os /Gy /GF | 163 FASTDEBUG_OPT_OPTION = /Ox /Os /Gy /GF |
164 DEBUG_OPT_OPTION = /Od | 164 DEBUG_OPT_OPTION = /Od |
165 !endif | 165 !endif |
178 # This VS2005 compiler has /GS as a default and requires bufferoverflowU.lib | 178 # This VS2005 compiler has /GS as a default and requires bufferoverflowU.lib |
179 # on the link command line, otherwise we get missing __security_check_cookie | 179 # on the link command line, otherwise we get missing __security_check_cookie |
180 # externals at link time. Even with /GS-, you need bufferoverflowU.lib. | 180 # externals at link time. Even with /GS-, you need bufferoverflowU.lib. |
181 # NOTE: Currently we decided to not use /GS- | 181 # NOTE: Currently we decided to not use /GS- |
182 BUFFEROVERFLOWLIB = bufferoverflowU.lib | 182 BUFFEROVERFLOWLIB = bufferoverflowU.lib |
183 LINK_FLAGS = /manifest $(LINK_FLAGS) $(BUFFEROVERFLOWLIB) | 183 LD_FLAGS = /manifest $(LD_FLAGS) $(BUFFEROVERFLOWLIB) |
184 # Manifest Tool - used in VS2005 and later to adjust manifests stored | 184 # Manifest Tool - used in VS2005 and later to adjust manifests stored |
185 # as resources inside build artifacts. | 185 # as resources inside build artifacts. |
186 MT=mt.exe | 186 MT=mt.exe |
187 !endif | 187 !endif |
188 | 188 |
189 !if "$(COMPILER_NAME)" == "VS2008" | 189 !if "$(COMPILER_NAME)" == "VS2008" |
190 PRODUCT_OPT_OPTION = /O2 /Oy- | 190 PRODUCT_OPT_OPTION = /O2 /Oy- |
191 FASTDEBUG_OPT_OPTION = /O2 /Oy- | 191 FASTDEBUG_OPT_OPTION = /O2 /Oy- |
192 DEBUG_OPT_OPTION = /Od | 192 DEBUG_OPT_OPTION = /Od |
193 GX_OPTION = /EHsc | 193 GX_OPTION = /EHsc |
194 LINK_FLAGS = /manifest $(LINK_FLAGS) | 194 LD_FLAGS = /manifest $(LD_FLAGS) |
195 # Manifest Tool - used in VS2005 and later to adjust manifests stored | 195 # Manifest Tool - used in VS2005 and later to adjust manifests stored |
196 # as resources inside build artifacts. | 196 # as resources inside build artifacts. |
197 MT=mt.exe | 197 MT=mt.exe |
198 !endif | 198 !endif |
199 | 199 |
200 !if "$(COMPILER_NAME)" == "VS2010" | 200 !if "$(COMPILER_NAME)" == "VS2010" |
201 PRODUCT_OPT_OPTION = /O2 /Oy- | 201 PRODUCT_OPT_OPTION = /O2 /Oy- |
202 FASTDEBUG_OPT_OPTION = /O2 /Oy- | 202 FASTDEBUG_OPT_OPTION = /O2 /Oy- |
203 DEBUG_OPT_OPTION = /Od | 203 DEBUG_OPT_OPTION = /Od |
204 GX_OPTION = /EHsc | 204 GX_OPTION = /EHsc |
205 LINK_FLAGS = /manifest $(LINK_FLAGS) | 205 LD_FLAGS = /manifest $(LD_FLAGS) |
206 # Manifest Tool - used in VS2005 and later to adjust manifests stored | 206 # Manifest Tool - used in VS2005 and later to adjust manifests stored |
207 # as resources inside build artifacts. | 207 # as resources inside build artifacts. |
208 MT=mt.exe | 208 MT=mt.exe |
209 !if "$(BUILDARCH)" == "i486" | 209 !if "$(BUILDARCH)" == "i486" |
210 LINK_FLAGS = /SAFESEH $(LINK_FLAGS) | 210 LD_FLAGS = /SAFESEH $(LD_FLAGS) |
211 !endif | 211 !endif |
212 !endif | 212 !endif |
213 | 213 |
214 # Compile for space above time. | 214 # Compile for space above time. |
215 !if "$(Variant)" == "kernel" | 215 !if "$(Variant)" == "kernel" |
223 PRODUCT_OPT_OPTION = $(DEBUG_OPT_OPTION) | 223 PRODUCT_OPT_OPTION = $(DEBUG_OPT_OPTION) |
224 FASTDEBUG_OPT_OPTION = $(DEBUG_OPT_OPTION) | 224 FASTDEBUG_OPT_OPTION = $(DEBUG_OPT_OPTION) |
225 !endif | 225 !endif |
226 | 226 |
227 # Generic linker settings | 227 # Generic linker settings |
228 LINK=link.exe | 228 LD=link.exe |
229 LINK_FLAGS= $(LINK_FLAGS) kernel32.lib user32.lib gdi32.lib winspool.lib \ | 229 LD_FLAGS= $(LD_FLAGS) kernel32.lib user32.lib gdi32.lib winspool.lib \ |
230 comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib \ | 230 comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib \ |
231 uuid.lib Wsock32.lib winmm.lib /nologo /machine:$(MACHINE) /opt:REF \ | 231 uuid.lib Wsock32.lib winmm.lib /nologo /machine:$(MACHINE) /opt:REF \ |
232 /opt:ICF,8 /map /debug | 232 /opt:ICF,8 /map /debug |
233 | 233 |
234 | 234 |
235 !if $(MSC_VER) >= 1600 | 235 !if $(MSC_VER) >= 1600 |
236 LINK_FLAGS= $(LINK_FLAGS) psapi.lib | 236 LD_FLAGS= $(LD_FLAGS) psapi.lib |
237 !endif | 237 !endif |
238 | 238 |
239 # Resource compiler settings | 239 # Resource compiler settings |
240 RC=rc.exe | 240 RC=rc.exe |
241 RC_FLAGS=/D "HS_VER=$(HS_VER)" \ | 241 RC_FLAGS=/D "HS_VER=$(HS_VER)" \ |
248 /D "HS_COPYRIGHT=$(HS_COPYRIGHT)" \ | 248 /D "HS_COPYRIGHT=$(HS_COPYRIGHT)" \ |
249 /D "HS_FNAME=$(HS_FNAME)" \ | 249 /D "HS_FNAME=$(HS_FNAME)" \ |
250 /D "HS_INTERNAL_NAME=$(HS_INTERNAL_NAME)" \ | 250 /D "HS_INTERNAL_NAME=$(HS_INTERNAL_NAME)" \ |
251 /D "HS_NAME=$(HS_NAME)" | 251 /D "HS_NAME=$(HS_NAME)" |
252 | 252 |
253 # Need this to match the CPP_FLAGS settings | 253 # Need this to match the CXX_FLAGS settings |
254 !if "$(MFC_DEBUG)" == "true" | 254 !if "$(MFC_DEBUG)" == "true" |
255 RC_FLAGS = $(RC_FLAGS) /D "_DEBUG" | 255 RC_FLAGS = $(RC_FLAGS) /D "_DEBUG" |
256 !endif | 256 !endif |
257 | 257 |