Pārlūkot izejas kodu

Avoid using clang-cl for midl builds due to lack of preprocessor-only mode

Derek Morris 7 gadi atpakaļ
vecāks
revīzija
fdda6e0ebf

+ 1 - 1
Build/Chakra.Build.Clang.Default.props

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <!-- Not officially supported! Configuration to build with clang on windows -->
-  <PropertyGroup Condition="'$(Clang)'=='ClangCL'">
+  <PropertyGroup Condition="'$(Clang)'=='ClangCL' And '$(ForceMSVC)'==''">
     <PlatformToolset>LLVM-vs2014</PlatformToolset>
   </PropertyGroup>
 </Project>

+ 5 - 1
lib/JITIDL/Chakra.JITIDL.vcxproj

@@ -1,5 +1,9 @@
 <?xml version="1.0" encoding="utf-8"?>
 <Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <!-- This is a work-around for a bug in clang-cl. Clang-cl purports to support a /P option to preprocess to a file, but this does not work, so we have to find a different cl on the system. -->
+  <PropertyGroup>
+    <ForceMSVC>true</ForceMSVC>
+  </PropertyGroup>
   <Import Condition="'$(ChakraBuildPathImported)'!='true'" Project="$(SolutionDir)Chakra.Build.Paths.props" />
   <Import Project="$(BuildConfigPropsPath)Chakra.Build.ProjectConfiguration.props" />
   <PropertyGroup Label="Globals">
@@ -46,4 +50,4 @@
   </ItemGroup>
   <Import Project="$(BuildConfigPropsPath)Chakra.Build.targets" Condition="exists('$(BuildConfigPropsPath)Chakra.Build.targets')" />
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
-</Project>
+</Project>