Chakra.Build.Clang.targets 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  3. <PropertyGroup>
  4. <BeforeClCompileTargets>
  5. $(BeforeClCompileTargets);
  6. GenerateClangPrecompileHeader;
  7. FixupClangIncludePrecompileHeader;
  8. </BeforeClCompileTargets>
  9. </PropertyGroup>
  10. <Target Name="FixupClangIncludePrecompileHeader"
  11. Condition="'@(ClCompile)' != ''">
  12. <ItemGroup>
  13. <ClCompile>
  14. <!-- Convert the /Yc /Yu switchs to clang -include-pch -->
  15. <AdditionalOptions Condition="'%(ClCompile.PrecompiledHeader)'!='NotUsing'">%(ClCompile.AdditionalOptions) -Xclang -include-pch -Xclang %(ClCompile.PrecompiledHeaderOutputFile)</AdditionalOptions>
  16. <!-- Clear the precompiled header command from CL.exe so that the PCH doesn't get deleted by the ClCompile Target-->
  17. <PrecompiledHeaderOutputFile></PrecompiledHeaderOutputFile>
  18. <PrecompiledHeader>NotUsing</PrecompiledHeader>
  19. </ClCompile>
  20. </ItemGroup>
  21. </Target>
  22. <Target Name="GenerateClangPrecompileHeader" BeforeTargets="ClCompile" Condition="'@(ClCompile)' != ''"
  23. DependsOnTargets="SelectClCompile">
  24. <CL Condition="'%(ClCompile.PrecompiledHeader)' == 'Create' and '%(ClCompile.ExcludedFromBuild)'!='true' and '%(ClCompile.CompilerIteration)' == ''"
  25. BuildingInIDE ="$(BuildingInsideVisualStudio)"
  26. Sources ="@(ClCompile)"
  27. AdditionalIncludeDirectories ="%(ClCompile.AdditionalIncludeDirectories)"
  28. AdditionalOptions ="%(ClCompile.AdditionalOptions) -Xclang -emit-pch -o %(ClCompile.PrecompiledHeaderOutputFile)"
  29. AdditionalUsingDirectories ="%(ClCompile.AdditionalUsingDirectories)"
  30. AssemblerListingLocation ="%(ClCompile.AssemblerListingLocation)"
  31. AssemblerOutput ="%(ClCompile.AssemblerOutput)"
  32. BasicRuntimeChecks ="%(ClCompile.BasicRuntimeChecks)"
  33. BrowseInformation ="%(ClCompile.BrowseInformation)"
  34. BrowseInformationFile ="%(ClCompile.BrowseInformationFile)"
  35. BufferSecurityCheck ="%(ClCompile.BufferSecurityCheck)"
  36. CallingConvention ="%(ClCompile.CallingConvention)"
  37. ControlFlowGuard ="%(ClCompile.ControlFlowGuard)"
  38. CompileAsManaged ="%(ClCompile.CompileAsManaged)"
  39. CompileAsWinRT ="%(ClCompile.CompileAsWinRT)"
  40. CompileAs ="%(ClCompile.CompileAs)"
  41. DebugInformationFormat ="%(ClCompile.DebugInformationFormat)"
  42. DisableLanguageExtensions ="%(ClCompile.DisableLanguageExtensions)"
  43. DisableSpecificWarnings ="%(ClCompile.DisableSpecificWarnings)"
  44. EnableEnhancedInstructionSet ="%(ClCompile.EnableEnhancedInstructionSet)"
  45. EnableFiberSafeOptimizations ="%(ClCompile.EnableFiberSafeOptimizations)"
  46. EnableParallelCodeGeneration ="%(ClCompile.EnableParallelCodeGeneration)"
  47. EnablePREfast ="%(ClCompile.EnablePREfast)"
  48. EnforceTypeConversionRules ="%(ClCompile.EnforceTypeConversionRules)"
  49. ErrorReporting ="%(ClCompile.ErrorReporting)"
  50. ExceptionHandling ="%(ClCompile.ExceptionHandling)"
  51. ExcludedInputPaths ="$(ExcludePath)"
  52. ExpandAttributedSource ="%(ClCompile.ExpandAttributedSource)"
  53. FavorSizeOrSpeed ="%(ClCompile.FavorSizeOrSpeed)"
  54. FloatingPointExceptions ="%(ClCompile.FloatingPointExceptions)"
  55. FloatingPointModel ="%(ClCompile.FloatingPointModel)"
  56. ForceConformanceInForLoopScope ="%(ClCompile.ForceConformanceInForLoopScope)"
  57. ForcedIncludeFiles ="%(ClCompile.ForcedIncludeFiles)"
  58. ForcedUsingFiles ="%(ClCompile.ForcedUsingFiles)"
  59. FunctionLevelLinking ="%(ClCompile.FunctionLevelLinking)"
  60. GenerateXMLDocumentationFiles ="%(ClCompile.GenerateXMLDocumentationFiles)"
  61. IgnoreStandardIncludePath ="%(ClCompile.IgnoreStandardIncludePath)"
  62. InlineFunctionExpansion ="%(ClCompile.InlineFunctionExpansion)"
  63. IntrinsicFunctions ="%(ClCompile.IntrinsicFunctions)"
  64. MinimalRebuild ="%(ClCompile.MinimalRebuild)"
  65. MultiProcessorCompilation ="%(ClCompile.MultiProcessorCompilation)"
  66. OmitDefaultLibName ="%(ClCompile.OmitDefaultLibName)"
  67. OmitFramePointers ="%(ClCompile.OmitFramePointers)"
  68. OpenMPSupport ="%(ClCompile.OpenMPSupport)"
  69. Optimization ="%(ClCompile.Optimization)"
  70. PrecompiledHeader ="%(ClCompile.PrecompiledHeader)"
  71. PrecompiledHeaderFile ="%(ClCompile.PrecompiledHeaderFile)"
  72. PrecompiledHeaderOutputFile ="%(ClCompile.PrecompiledHeaderOutputFile)"
  73. PREfastAdditionalOptions ="%(ClCompile.PREfastAdditionalOptions)"
  74. PREfastAdditionalPlugins ="%(ClCompile.PREfastAdditionalPlugins)"
  75. PREfastLog ="%(ClCompile.PREfastLog)"
  76. PreprocessKeepComments ="%(ClCompile.PreprocessKeepComments)"
  77. PreprocessorDefinitions ="%(ClCompile.PreprocessorDefinitions)"
  78. PreprocessSuppressLineNumbers ="%(ClCompile.PreprocessSuppressLineNumbers)"
  79. PreprocessToFile ="%(ClCompile.PreprocessToFile)"
  80. ProcessorNumber ="%(ClCompile.ProcessorNumber)"
  81. ProgramDataBaseFileName ="%(ClCompile.ProgramDataBaseFileName)"
  82. RemoveUnreferencedCodeData ="%(ClCompile.RemoveUnreferencedCodeData)"
  83. RuntimeLibrary ="%(ClCompile.RuntimeLibrary)"
  84. RuntimeTypeInfo ="%(ClCompile.RuntimeTypeInfo)"
  85. SDLCheck ="%(ClCompile.SDLCheck)"
  86. ShowIncludes ="%(ClCompile.ShowIncludes)"
  87. WarningVersion ="%(ClCompile.WarningVersion)"
  88. SmallerTypeCheck ="%(ClCompile.SmallerTypeCheck)"
  89. StringPooling ="%(ClCompile.StringPooling)"
  90. StructMemberAlignment ="%(ClCompile.StructMemberAlignment)"
  91. SuppressStartupBanner ="%(ClCompile.SuppressStartupBanner)"
  92. TreatSpecificWarningsAsErrors ="%(ClCompile.TreatSpecificWarningsAsErrors)"
  93. TreatWarningAsError ="%(ClCompile.TreatWarningAsError)"
  94. TreatWChar_tAsBuiltInType ="%(ClCompile.TreatWChar_tAsBuiltInType)"
  95. UndefineAllPreprocessorDefinitions ="%(ClCompile.UndefineAllPreprocessorDefinitions)"
  96. UndefinePreprocessorDefinitions ="%(ClCompile.UndefinePreprocessorDefinitions)"
  97. UseFullPaths ="%(ClCompile.UseFullPaths)"
  98. UseUnicodeForAssemblerListing ="%(ClCompile.UseUnicodeForAssemblerListing)"
  99. WarningLevel ="%(ClCompile.WarningLevel)"
  100. WholeProgramOptimization ="%(ClCompile.WholeProgramOptimization)"
  101. WinRTNoStdLib ="%(ClCompile.WinRTNoStdLib)"
  102. XMLDocumentationFileName ="%(ClCompile.XMLDocumentationFileName)"
  103. CreateHotpatchableImage ="%(CLCompile.CreateHotpatchableImage)"
  104. TrackerLogDirectory ="%(ClCompile.TrackerLogDirectory)"
  105. TLogReadFiles ="@(CLTLogReadFiles)"
  106. TLogWriteFiles ="@(CLTLogWriteFiles)"
  107. ToolExe ="$(CLToolExe)"
  108. ToolPath ="$(CLToolPath)"
  109. TrackFileAccess ="$(TrackFileAccess)"
  110. MinimalRebuildFromTracking ="%(ClCompile.MinimalRebuildFromTracking)"
  111. ToolArchitecture ="$(CLToolArchitecture)"
  112. TrackerFrameworkPath ="$(CLTrackerFrameworkPath)"
  113. TrackerSdkPath ="$(CLTrackerSdkPath)"
  114. TrackedInputFilesToIgnore ="@(ClNoDependencies)"
  115. DeleteOutputOnExecute ="$(CLDeleteOutputOnExecute)"
  116. AcceptableNonZeroExitCodes ="%(ClCompile.AcceptableNonZeroExitCodes)"
  117. YieldDuringToolExecution ="$(ClYieldDuringToolExecution)"
  118. >
  119. </CL>
  120. </Target>
  121. </Project>