Browse Source

test for 64-bit compiling support

Chris Brunner 15 years ago
parent
commit
4b2eab9c77
1 changed files with 79 additions and 0 deletions
  1. 79 0
      dtool/pptempl/compilerSettings.pp

+ 79 - 0
dtool/pptempl/compilerSettings.pp

@@ -224,6 +224,85 @@
   #define build_pdbs yes
 
 
+
+///////////////////////////////////////////////////
+// MICROSOFT VISUAL C++ 9.0 (2008) 64-bit output //
+///////////////////////////////////////////////////
+#elif $[eq $[USE_COMPILER], MSVC9x64]
+  #define COMPILER cl
+  #define LINKER link
+  #define LIBBER lib
+  #define MT_BIN mt
+
+  #if $[eq $[NO_CROSSOBJ_OPT],]
+     #define DO_CROSSOBJ_OPT 1
+  #endif
+
+  #if $[DO_CROSSOBJ_OPT]
+     #define OPT4FLAGS /GL
+     #define LDFLAGS_OPT4 /LTCG
+     #if $[>= $[OPTIMIZE],4]
+        #define LIBBER $[LIBBER] /LTCG
+     #endif
+  #endif
+
+  #define CDEFINES_OPT1
+  #define CDEFINES_OPT2
+  #define CDEFINES_OPT3
+  #define CDEFINES_OPT4
+
+  // NODEFAULTLIB ensures static libs linked in will connect to the correct msvcrt, so no debug/release mixing occurs
+
+  #define LDFLAGS_OPT1 /NODEFAULTLIB:MSVCRT.LIB
+  #define LDFLAGS_OPT2 /NODEFAULTLIB:MSVCRT.LIB
+  #define LDFLAGS_OPT3 /NODEFAULTLIB:MSVCRTD.LIB /OPT:REF
+  #define LDFLAGS_OPT4 /NODEFAULTLIB:MSVCRTD.LIB /OPT:REF $[LDFLAGS_OPT4]
+
+  #define COMMONFLAGS /DHAVE_DINKUM /Zc:forScope
+
+  // use "unsafe" QIfist flt->int rounding only if FAST_FLT_TO_INT is defined
+  #define REGULAR_OPTFLAGS /O2 /Ob2 $[if $[ne $[FAST_FLT_TO_INT],], /QIfist,]
+
+  #defer OPTFLAGS $[if $[OPT_MINSIZE],/Ox /Og /Ob1 /Oi /Os /Oy /GL,$[REGULAR_OPTFLAGS]]
+
+  //  #define OPT1FLAGS /RTCsu /GS  removing /RTCu because it crashes in dxgsg with internal compiler bug
+  #define OPT1FLAGS /RTCs /GS
+
+  #define WARNING_LEVEL_FLAG /W3   // WL
+
+  // Note: Zi cannot be used on multiproc builds with precomp hdrs, Z7 must be used instead
+  #defer DEBUGPDBFLAGS /Zi /Fd"$[osfilename $[patsubst %.obj,%.pdb, $[target]]]"
+
+  // if LINK_FORCE_STATIC_C_RUNTIME is defined, it always links with static c runtime (release version
+  // for both Opt1 and Opt4!) instead of the msvcrt dlls
+
+  #defer DEBUGFLAGS $[if $[ne $[LINK_FORCE_STATIC_RELEASE_C_RUNTIME],],/MTd, /MDd] $[BROWSEINFO_FLAG] $[DEBUGINFOFLAGS] $[DEBUGPDBFLAGS]
+  #defer RELEASEFLAGS $[if $[ne $[LINK_FORCE_STATIC_RELEASE_C_RUNTIME],],/MT, /MD]
+
+  #define MAPINFOFLAGS /MAPINFO:EXPORTS
+
+  #if $[ENABLE_PROFILING]
+    #define PROFILE_FLAG /FIXED:NO
+  #else
+    #define PROFILE_FLAG
+  #endif
+
+  #if $[or $[ne $[FORCE_INLINING],],$[>= $[OPTIMIZE],2]]
+      #defer EXTRA_CDEFS $[EXTRA_CDEFS] $[if $[OPT_MINSIZE],,FORCE_INLINING]
+  #endif
+
+  // Note: all Opts will link w/debug info now
+  #define LINKER_FLAGS /DEBUG $[PROFILE_FLAG] /MAP $[MAPINFOFLAGS] /fixed:no /incremental:no /stack:4194304
+
+  // Added to avoid old iostream reference problems
+  #define LINKER_FLAGS $[LINKER_FLAGS] /NODEFAULTLIB:LIBCI.LIB
+  // Added to make pandatool function in VS 9
+  #define LINKER_FLAGS $[LINKER_FLAGS] /NOD:MFC80.LIB /NOD:libcmtd /NOD:libc
+
+  // ensure pdbs are copied to install dir
+  #define build_pdbs yes
+
+
 ////////////////////
 // INTEL COMPILER //
 ////////////////////