compilerSettings.pp 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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
  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 MAPINFOFLAGS /MAPINFO:EXPORTS /MAPINFO:FIXUPS /MAPINFO:LINES
  13. #if $[ENABLE_PROFILING]
  14. // note according to docs, this should force /PDB:none /DEBUGTYPE:cv, so no pdb file is generated for debug?? (doesnt seem to be true)
  15. #define PROFILE_FLAG /PROFILE
  16. #else
  17. #define PROFILE_FLAG
  18. #endif
  19. // Note: all Opts will link w/debug info now
  20. #define LINKER_FLAGS /DEBUG /DEBUGTYPE:CV $[PROFILE_FLAG] /MAP $[MAPINFOFLAGS] /fixed:no /incremental:no /WARN:3
  21. // in case we have mixed intel/msvc build
  22. #define EXTRA_LIBPATH /ia32/lib
  23. #define EXTRA_INCPATH /ia32/include
  24. #elif $[eq $[USE_COMPILER], BOUNDS] // NuMega BoundsChecker
  25. #define COMPILER nmcl
  26. #define LINKER nmlink
  27. #define LIBBER lib
  28. #define COMMONFLAGS
  29. #define OPTFLAGS /O2 /Ogity /G6
  30. #define OPT1FLAGS /GZ
  31. #defer DEBUGFLAGS /MDd /Zi $[BROWSEINFO_FLAG] /Fd"$[osfilename $[target:%.obj=%.pdb]]"
  32. #define RELEASEFLAGS /MD
  33. #define EXTRA_LIBPATH
  34. #define EXTRA_INCPATH
  35. #if $[BOUNDS_TRUETIME] // NuMega BoundsChecker TrueTime Profiler
  36. // This may look like a bad thing (to extend the compiler
  37. // and linker with a switch), but I think it's the right
  38. // thing to do in this case -- skyler.
  39. #define COMPILER $[COMPILER] /NMttOn
  40. #define LINKER $[LINKER] /NMttOn
  41. #endif
  42. #elif $[eq $[USE_COMPILER], TRUETIME] // NuMega TrueTime Profiler
  43. // This may look like a bad thing (to extend the compiler
  44. // and linker with a switch), but I think it's the right
  45. // thing to do in this case -- skyler.
  46. #define COMPILER nmcl /NMttOn
  47. #define LINKER nmlink /NMttOn
  48. #define LIBBER lib
  49. #define COMMONFLAGS
  50. #define OPTFLAGS /O2 /Ogity /G6
  51. #define OPT1FLAGS /GZ
  52. #defer DEBUGFLAGS /MDd /Zi $[BROWSEINFO_FLAG] /Fd"$[osfilename $[target:%.obj=%.pdb]]"
  53. #define RELEASEFLAGS /MD
  54. #define EXTRA_LIBPATH
  55. #define EXTRA_INCPATH
  56. #elif $[eq $[USE_COMPILER], INTEL]
  57. #define COMPILER icl
  58. #define LINKER xilink
  59. #define LIBBER xilib
  60. #define COMMONFLAGS /Gi- /Qwd985
  61. // #define OPTFLAGS /O3 /G6 /Qvc6 /Qipo /QaxW /Qvec_report1
  62. #define OPTFLAGS /O3 /G6 /Qvc6 /Qip
  63. // Oy- needed for MS debugger
  64. #define DEBUGFLAGS /MDd /Zi /Qinline_debug_info /Oy-
  65. #define OPT1FLAGS /GZ /Od
  66. #define RELEASEFLAGS /MD
  67. // We assume the Intel compiler installation dir is mounted as /ia32.
  68. #define EXTRA_LIBPATH /ia32/lib
  69. #define EXTRA_INCPATH /ia32/include
  70. #else
  71. #error Invalid value specified for USE_COMPILER.
  72. #endif
  73. #if $[CHECK_SYNTAX_ONLY]
  74. #define END_CFLAGS $[END_CFLAGS] /Zs
  75. #endif
  76. #if $[GEN_ASSEMBLY]
  77. #define END_CFLAGS $[END_CFLAGS] /FAs
  78. #endif
  79. #if $[PREPROCESSOR_OUTPUT]
  80. #define END_CFLAGS $[END_CFLAGS] /E
  81. #endif