compilerSettings.pp 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. #if $[eq $[USE_COMPILER], MSVC]
  2. #define COMPILER cl
  3. #define LINKER link
  4. #define LIBBER lib
  5. #define COMMONFLAGS /Gi-
  6. #define OPTFLAGS /O2 /Ob1 /G6 /QIfist
  7. #define OPT1FLAGS /GZ
  8. // Note: Zi cannot be used on multiproc builds with precomp hdrs, Z7 must be used instead
  9. #defer DEBUGPDBFLAGS /Zi /Fd"$[osfilename $[target:%.obj=%.pdb]]"
  10. #defer DEBUGFLAGS /MDd $[BROWSEINFO_FLAG] $[DEBUGINFOFLAGS] $[DEBUGPDBFLAGS]
  11. #define RELEASEFLAGS /MD
  12. #define WARNING_LEVEL_FLAG /W3
  13. #define CDEFINES_OPT4 UNKNOWN_ALLOCATOR
  14. #define MAPINFOFLAGS /MAPINFO:EXPORTS /MAPINFO:FIXUPS /MAPINFO:LINES
  15. #if $[ENABLE_PROFILING]
  16. // note according to docs, this should force /PDB:none /DEBUGTYPE:cv, so no pdb file is generated for debug?? (doesnt seem to be true)
  17. #define PROFILE_FLAG /PROFILE
  18. #else
  19. #define PROFILE_FLAG
  20. #endif
  21. // Note: all Opts will link w/debug info now
  22. #define LINKER_FLAGS /DEBUG /DEBUGTYPE:CV $[PROFILE_FLAG] /MAP $[MAPINFOFLAGS] /fixed:no /incremental:no /WARN:3
  23. // in case we have mixed intel/msvc build
  24. #define EXTRA_LIBPATH /ia32/lib
  25. #define EXTRA_INCPATH /ia32/include
  26. #if $[or $[ne $[FORCE_INLINING],],$[>= $[OPTIMIZE],2]]
  27. #define EXTRA_CDEFS FORCE_INLINING $[EXTRA_CDEFS]
  28. #endif
  29. #elif $[eq $[USE_COMPILER], MSVC7]
  30. #define COMPILER cl
  31. #define LINKER link
  32. #define LIBBER lib
  33. // currently wont build pvector stuff, so need this
  34. #define CDEFINES_OPT1 UNKNOWN_ALLOCATOR
  35. #define CDEFINES_OPT2 UNKNOWN_ALLOCATOR
  36. #define CDEFINES_OPT3 UNKNOWN_ALLOCATOR
  37. #define CDEFINES_OPT4 UNKNOWN_ALLOCATOR
  38. #define COMMONFLAGS /DHAVE_DINKUM
  39. #define OPTFLAGS /O2 /Ob1 /G6 /QIfist
  40. #define OPT1FLAGS /GZ /GS
  41. // #define WARNING_LEVEL_FLAG /Wall //this is scary
  42. #define WARNING_LEVEL_FLAG /W3 // WL
  43. // Note: Zi cannot be used on multiproc builds with precomp hdrs, Z7 must be used instead
  44. #defer DEBUGPDBFLAGS /Zi /Fd"$[osfilename $[target:%.obj=%.pdb]]"
  45. #defer DEBUGFLAGS /MDd $[BROWSEINFO_FLAG] $[DEBUGINFOFLAGS] $[DEBUGPDBFLAGS]
  46. #define RELEASEFLAGS /MD
  47. #define MAPINFOFLAGS /MAPINFO:EXPORTS /MAPINFO:LINES
  48. #if $[ENABLE_PROFILING]
  49. #define PROFILE_FLAG /FIXED:NO
  50. #else
  51. #define PROFILE_FLAG
  52. #endif
  53. #if $[or $[ne $[FORCE_INLINING],],$[>= $[OPTIMIZE],2]]
  54. #define EXTRA_CDEFS FORCE_INLINING $[EXTRA_CDEFS]
  55. #endif
  56. // Note: all Opts will link w/debug info now
  57. #define LINKER_FLAGS /DEBUG $[PROFILE_FLAG] /MAP $[MAPINFOFLAGS] /fixed:no /incremental:no
  58. // in case we have mixed intel/msvc build
  59. #define EXTRA_LIBPATH /ia32/lib
  60. #define EXTRA_INCPATH /ia32/include
  61. #elif $[eq $[USE_COMPILER], INTEL]
  62. #define COMPILER icl
  63. #define LINKER xilink
  64. #define LIBBER xilib
  65. #define COMMONFLAGS /Gi- /Qwd985
  66. // Note: Zi cannot be used on multiproc builds with precomp hdrs, Z7 must be used instead
  67. #defer DEBUGPDBFLAGS /Zi /Qinline_debug_info /Fd"$[osfilename $[target:%.obj=%.pdb]]"
  68. // Oy- needed for MS debugger
  69. #defer DEBUGFLAGS /Oy- /MDd $[BROWSEINFO_FLAG] $[DEBUGINFOFLAGS] $[DEBUGPDBFLAGS]
  70. #define RELEASEFLAGS /MD
  71. #define WARNING_LEVEL_FLAG /W3
  72. #define CDEFINES_OPT4 UNKNOWN_ALLOCATOR
  73. // #define OPTFLAGS /O3 /G6 /Qvc6 /Qipo /QaxW /Qvec_report1
  74. #define OPTFLAGS /O3 /G6 /Qvc6 /Qip /QIfist
  75. #define OPT1FLAGS /GZ /Od
  76. // We assume the Intel compiler installation dir is mounted as /ia32.
  77. #define EXTRA_LIBPATH /ia32/lib
  78. #define EXTRA_INCPATH /ia32/include
  79. #if $[or $[ne $[FORCE_INLINING],],$[>= $[OPTIMIZE],2]]
  80. #define EXTRA_CDEFS FORCE_INLINING $[EXTRA_CDEFS]
  81. #endif
  82. // Note: all Opts will link w/debug info now
  83. #define LINKER_FLAGS /DEBUG /DEBUGTYPE:CV $[PROFILE_FLAG] /MAP $[MAPINFOFLAGS] /fixed:no /incremental:no /WARN:3
  84. #elif $[eq $[USE_COMPILER], BOUNDS] // NuMega BoundsChecker
  85. #define COMPILER nmcl
  86. #define LINKER nmlink
  87. #define LIBBER lib
  88. #define COMMONFLAGS
  89. #define OPTFLAGS /O2 /Ogity /G6
  90. #define OPT1FLAGS /GZ
  91. #defer DEBUGFLAGS /MDd /Zi $[BROWSEINFO_FLAG] /Fd"$[osfilename $[target:%.obj=%.pdb]]"
  92. #define RELEASEFLAGS /MD
  93. #define EXTRA_LIBPATH
  94. #define EXTRA_INCPATH
  95. #if $[BOUNDS_TRUETIME] // NuMega BoundsChecker TrueTime Profiler
  96. // This may look like a bad thing (to extend the compiler
  97. // and linker with a switch), but I think it's the right
  98. // thing to do in this case -- skyler.
  99. #define COMPILER $[COMPILER] /NMttOn
  100. #define LINKER $[LINKER] /NMttOn
  101. #endif
  102. #elif $[eq $[USE_COMPILER], TRUETIME] // NuMega TrueTime Profiler
  103. // This may look like a bad thing (to extend the compiler
  104. // and linker with a switch), but I think it's the right
  105. // thing to do in this case -- skyler.
  106. #define COMPILER nmcl /NMttOn
  107. #define LINKER nmlink /NMttOn
  108. #define LIBBER lib
  109. #define COMMONFLAGS
  110. #define OPTFLAGS /O2 /Ogity /G6
  111. #define OPT1FLAGS /GZ
  112. #defer DEBUGFLAGS /MDd /Zi $[BROWSEINFO_FLAG] /Fd"$[osfilename $[target:%.obj=%.pdb]]"
  113. #define RELEASEFLAGS /MD
  114. #define EXTRA_LIBPATH
  115. #define EXTRA_INCPATH
  116. #else
  117. #error Invalid value specified for USE_COMPILER.
  118. #endif
  119. #if $[CHECK_SYNTAX_ONLY]
  120. #define END_CFLAGS $[END_CFLAGS] /Zs
  121. #endif
  122. #if $[GEN_ASSEMBLY]
  123. #define END_CFLAGS $[END_CFLAGS] /FAs
  124. #endif
  125. #if $[PREPROCESSOR_OUTPUT]
  126. #define END_CFLAGS $[END_CFLAGS] /E
  127. #endif