Common.Build.props 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  3. <ItemDefinitionGroup>
  4. <ClCompile>
  5. <PreprocessorDefinitions>%(PreprocessorDefinitions);_CHAKRACOREBUILD;NOMINMAX;USE_EDGEMODE_JSRT</PreprocessorDefinitions>
  6. <!-- Some of our STDMETHOD can throw
  7. TODO: Code review STDMETHOD and separate out API that can throw and those that can't -->
  8. <PreprocessorDefinitions>%(PreprocessorDefinitions);COM_STDMETHOD_CAN_THROW</PreprocessorDefinitions>
  9. <PreprocessorDefinitions Condition="'$(RuntimeLib)'=='static_library'">%(PreprocessorDefinitions);USE_STATIC_RUNTIMELIB</PreprocessorDefinitions>
  10. <!-- /W4 -->
  11. <WarningLevel>Level4</WarningLevel>
  12. <!-- /WX -->
  13. <TreatWarningAsError>true</TreatWarningAsError>
  14. <!-- /GR- -->
  15. <RuntimeTypeInfo>false</RuntimeTypeInfo>
  16. <!-- /Zi -->
  17. <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
  18. <DebugInformationFormat Condition="'$(MultiProcessorCompilation)' == 'true'">OldStyle</DebugInformationFormat>
  19. <!-- /EHsc- -->
  20. <ExceptionHandling>SyncCThrow</ExceptionHandling>
  21. <!-- /Gz -->
  22. <CallingConvention Condition="'$(Platform)'=='Win32'">StdCall</CallingConvention>
  23. <!-- /Zp8 -->
  24. <StructMemberAlignment>8Bytes</StructMemberAlignment>
  25. <!-- /GS -->
  26. <BufferSecurityCheck>true</BufferSecurityCheck>
  27. <!-- /Gy -->
  28. <FunctionLevelLinking>true</FunctionLevelLinking>
  29. <!-- /GF -->
  30. <StringPooling>true</StringPooling>
  31. <!-- /MD -->
  32. <RuntimeLibrary Condition="'$(RuntimeLib)'!='static_library'">MultiThreadedDLL</RuntimeLibrary>
  33. <RuntimeLibrary Condition="'$(RuntimeLib)'=='static_library'">MultiThreaded</RuntimeLibrary>
  34. <!-- We don't use any metadata -->
  35. <AdditionalUsingDirectories />
  36. <AdditionalOptions>%(AdditionalOptions) /Zm125</AdditionalOptions>
  37. <AdditionalOptions>%(AdditionalOptions) /Yl$(TargetName)</AdditionalOptions>
  38. <!-- Separate global variable for linker -->
  39. <AdditionalOptions>%(AdditionalOptions) /Gw</AdditionalOptions>
  40. <ProgramDataBaseFileName Condition="'$(ConfigurationType)'=='StaticLibrary'">$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
  41. <ProgramDataBaseFileName Condition="'$(ConfigurationType)'!='StaticLibrary'">$(IntDir)</ProgramDataBaseFileName>
  42. </ClCompile>
  43. <ResourceCompile>
  44. <PreprocessorDefinitions Condition="'$(ChakraVersionBuildNumber)'!=''">%(PreprocessorDefinitions);CHAKRA_VERSION_BUILD_NUMBER=$(ChakraVersionBuildNumber)</PreprocessorDefinitions>
  45. <PreprocessorDefinitions Condition="'$(ChakraVersionBuildQFENumber)'!=''">%(PreprocessorDefinitions);CHAKRA_VERSION_BUILD_QFE=$(ChakraVersionBuildQFENumber)</PreprocessorDefinitions>
  46. <PreprocessorDefinitions Condition="'$(ChakraVersionBuildCommit)'!=''">%(PreprocessorDefinitions);CHAKRA_VERSION_BUILD_COMMIT=$(ChakraVersionBuildCommit)</PreprocessorDefinitions>
  47. <PreprocessorDefinitions Condition="'$(ChakraVersionBuildDate)'!=''">%(PreprocessorDefinitions);CHAKRA_VERSION_BUILD_DATE=$(ChakraVersionBuildDate)</PreprocessorDefinitions>
  48. </ResourceCompile>
  49. <MASM>
  50. <!-- /Cx -->
  51. <PreserveIdentifierCase>3</PreserveIdentifierCase>
  52. </MASM>
  53. <Link>
  54. <TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
  55. <GenerateDebugInformation>true</GenerateDebugInformation>
  56. <EnableCOMDATFolding Condition="'$(OptimizedBuild)'=='true'">true</EnableCOMDATFolding>
  57. <OptimizeReferences Condition="'$(OptimizedBuild)'=='true'">true</OptimizeReferences>
  58. <MinimumRequiredVersion Condition="'$(NtTargetVersion)'=='$(NtTargetVersion_Win7)'" >6.1</MinimumRequiredVersion>
  59. <MinimumRequiredVersion Condition="'$(NtTargetVersion)'=='$(NtTargetVersion_Win8)'" >6.2</MinimumRequiredVersion>
  60. <MinimumRequiredVersion Condition="'$(NtTargetVersion)'=='$(NtTargetVersion_Win10)'" >10.00</MinimumRequiredVersion>
  61. <!-- Always set the checksum -->
  62. <AdditionalOptions>%(AdditionalOptions) /release</AdditionalOptions>
  63. </Link>
  64. </ItemDefinitionGroup>
  65. <!-- chk build flags -->
  66. <ItemDefinitionGroup Condition="'$(OptimizedBuild)'!='true'">
  67. <ClCompile>
  68. <Optimization>Disabled</Optimization>
  69. <PreprocessorDefinitions>%(PreprocessorDefinitions);_DEBUG;DBG;DBG_DUMP</PreprocessorDefinitions>
  70. </ClCompile>
  71. <ResourceCompile>
  72. <PreprocessorDefinitions>%(PreprocessorDefinitions);DBG;ENABLE_DEBUG_CONFIG_OPTIONS=1</PreprocessorDefinitions>
  73. </ResourceCompile>
  74. </ItemDefinitionGroup>
  75. <!-- fre and fretest build flags -->
  76. <ItemDefinitionGroup Condition="'$(OptimizedBuild)'=='true'">
  77. <ClCompile>
  78. <PreprocessorDefinitions>%(PreprocessorDefinitions);NDEBUG</PreprocessorDefinitions>
  79. <PreprocessorDefinitions Condition="'$(Configuration)'=='Test'">%(PreprocessorDefinitions);ENABLE_DEBUG_CONFIG_OPTIONS=1</PreprocessorDefinitions>
  80. <Optimization>MaxSpeed</Optimization>
  81. <WholeProgramOptimization>true</WholeProgramOptimization>
  82. </ClCompile>
  83. <ResourceCompile>
  84. <PreprocessorDefinitions Condition="'$(Configuration)'=='Test'">%(PreprocessorDefinitions);ENABLE_DEBUG_CONFIG_OPTIONS=1</PreprocessorDefinitions>
  85. </ResourceCompile>
  86. <Link>
  87. <LinkTimeCodeGeneration Condition="'$(PlatformToolset)'=='v120' OR '$(TF_BUILD)'!=''">UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
  88. <LinkTimeCodeGeneration Condition="'$(PlatformToolset)'!='v120' AND '$(TF_BUILD)'==''">UseFastLinkTimeCodeGeneration</LinkTimeCodeGeneration>
  89. </Link>
  90. <Lib>
  91. <LinkTimeCodeGeneration>true</LinkTimeCodeGeneration>
  92. </Lib>
  93. </ItemDefinitionGroup>
  94. <ItemGroup Condition="'$(ConfigurationType)'=='DynamicLibrary' OR '$(ConfigurationType)'=='Application'">
  95. <Clean Include="$(OutDir)$(TargetName).lib" />
  96. <Clean Include="$(OutDir)$(TargetName).exp" />
  97. <Clean Include="$(OutDir)$(TargetName).ipdb" />
  98. <Clean Include="$(OutDir)$(TargetName).iobj" />
  99. </ItemGroup>
  100. </Project>