jdk/make/common/Defs-windows.gmk
changeset 7669 3ebe17bda998
parent 7668 d4a77089c587
child 8018 79ce40b4ab5e
child 7967 aa85f513e8f2
child 7945 7296aacd696f
equal deleted inserted replaced
7668:d4a77089c587 7669:3ebe17bda998
   292   MS_RC_DEBUG_OPTION= -d _DEBUG
   292   MS_RC_DEBUG_OPTION= -d _DEBUG
   293 endif
   293 endif
   294 
   294 
   295 # Always add _STATIC_CPPLIB definition
   295 # Always add _STATIC_CPPLIB definition
   296 STATIC_CPPLIB_OPTION = /D _STATIC_CPPLIB
   296 STATIC_CPPLIB_OPTION = /D _STATIC_CPPLIB
       
   297 
       
   298 # Silence the warning about using _STATIC_CPPLIB
       
   299 ifneq ($(SHOW_ALL_WARNINGS),true)
       
   300   # Needed with VS2010 to turn off the deprecated warning.
       
   301   STATIC_CPPLIB_OPTION += /D _DISABLE_DEPRECATE_STATIC_CPPLIB
       
   302 endif
       
   303 
   297 MS_RUNTIME_OPTION += $(STATIC_CPPLIB_OPTION)
   304 MS_RUNTIME_OPTION += $(STATIC_CPPLIB_OPTION)
   298 
   305 
   299 ifeq ($(CC_VERSION),msvc)
   306 ifeq ($(CC_VERSION),msvc)
   300   # VS2003 compiler option definitions:
   307   # VS2003 compiler option definitions:
   301   #   -Zi      Cause *.pdb file to be created, full debug information
   308   #   -Zi      Cause *.pdb file to be created, full debug information
   303   #   -Zd      Basic debug, no local variables? In the .obj
   310   #   -Zd      Basic debug, no local variables? In the .obj
   304   #   -Zl      Don't add runtime library name to obj file?
   311   #   -Zl      Don't add runtime library name to obj file?
   305   #   -Od      Turns off optimization and speeds compilation
   312   #   -Od      Turns off optimization and speeds compilation
   306   #   -YX -Fp/.../foobar.pch   Use precompiled headers (try someday?)
   313   #   -YX -Fp/.../foobar.pch   Use precompiled headers (try someday?)
   307   #   -nologo  Don't print out startup message
   314   #   -nologo  Don't print out startup message
   308   #   /D _STATIC_CPPLIB  
   315   #   /D _STATIC_CPPLIB
   309   #            Use static link for the C++ runtime (so msvcpnn.dll not needed)
   316   #            Use static link for the C++ runtime (so msvcpnn.dll not needed)
   310   #   
   317   #   
   311   CFLAGS_COMMON  += -Zi -nologo
   318   CFLAGS_COMMON  += -Zi -nologo
   312   CFLAGS_OPT      = $(CC_OPT)
   319   CFLAGS_OPT      = $(CC_OPT)
   313   CFLAGS_DBG      = -Od $(MS_RUNTIME_DEBUG_OPTION)
   320   CFLAGS_DBG      = -Od $(MS_RUNTIME_DEBUG_OPTION)
   393 
   400 
   394 #
   401 #
   395 # Treat compiler warnings as errors, if requested
   402 # Treat compiler warnings as errors, if requested
   396 #
   403 #
   397 CFLAGS_COMMON += -W$(COMPILER_WARNING_LEVEL)
   404 CFLAGS_COMMON += -W$(COMPILER_WARNING_LEVEL)
   398 # Turn off security warnings about using the standard C library function strcpy
       
   399 CFLAGS_COMMON += -D _CRT_SECURE_NO_DEPRECATE
       
   400 ifeq ($(COMPILER_WARNINGS_FATAL),true)
   405 ifeq ($(COMPILER_WARNINGS_FATAL),true)
   401   CFLAGS_COMMON += -WX
   406   CFLAGS_COMMON += -WX
       
   407 endif
       
   408 
       
   409 # Turn off some warnings by default, enable them all if asked.
       
   410 ifneq ($(SHOW_ALL_WARNINGS),true)
       
   411   # The -D _CRT_SECURE_NO_DEPRECATE turns off security/deprecated warnings on
       
   412   #    the standard C library functions like strcpy.
       
   413   CFLAGS_COMMON += -D _CRT_SECURE_NO_DEPRECATE
       
   414   # The -D _CRT_NONSTDC_NO_DEPRECATE turns off deprecation warnings about using
       
   415   #    non-standard C POSIX functions.
       
   416   CFLAGS_COMMON += -D _CRT_NONSTDC_NO_DEPRECATE
   402 endif
   417 endif
   403 
   418 
   404 CPPFLAGS_OPT    = -DNDEBUG
   419 CPPFLAGS_OPT    = -DNDEBUG
   405 CPPFLAGS_DBG    = -DDEBUG -DLOGGING
   420 CPPFLAGS_DBG    = -DDEBUG -DLOGGING
   406 
   421