if(NOT CLANG_LINKS_TO_CREATE)
set(CLANG_LINKS_TO_CREATE clang++ clang-cl clang-cpp)
-
- if (MSVC)
- list(APPEND CLANG_LINKS_TO_CREATE ../msbuild-bin/cl)
- endif()
endif()
foreach(link ${CLANG_LINKS_TO_CREATE})
set(CPACK_NSIS_MUI_UNIICON "${CMAKE_CURRENT_SOURCE_DIR}\\\\cmake\\\\nsis_icon.ico")
set(CPACK_NSIS_MODIFY_PATH "ON")
set(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL "ON")
- set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS
- "ExecWait '$INSTDIR/tools/msbuild/install.bat'")
- set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS
- "ExecWait '$INSTDIR/tools/msbuild/uninstall.bat'")
if( CMAKE_CL_64 )
set(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES64")
endif()
--- /dev/null
+bin\r
+obj\r
+++ /dev/null
-if (MSVC)
- # CPack will install a registry key in this format that we wish to reference.
- set(REG_KEY "${CPACK_PACKAGE_INSTALL_REGISTRY_KEY}")
- set(LIB_PATH_VERSION "${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}")
-
- foreach (platform "Win32" "x64")
- set(prop_file_in "Microsoft.Cpp.Win32.llvm.props.in")
- set(prop_file_v100 "Microsoft.Cpp.${platform}.LLVM-vs2010.props")
- set(prop_file_v110 "Microsoft.Cpp.${platform}.LLVM-vs2012.props")
- set(prop_file_v110_xp "Microsoft.Cpp.${platform}.LLVM-vs2012_xp.props")
- set(prop_file_v120 "toolset-vs2013.props")
- set(prop_file_v120_xp "toolset-vs2013_xp.props")
- set(prop_file_v140 "toolset-vs2014.props")
- set(prop_file_v140_xp "toolset-vs2014_xp.props")
-
- if (platform STREQUAL "Win32")
- set(mflag "m32")
- else()
- set(mflag "m64")
- endif()
- set(VS_VERSION "v100")
- set(MSC_VERSION "1600")
- configure_file(${prop_file_in} ${platform}/${prop_file_v100})
- set(VS_VERSION "v110")
- set(MSC_VERSION "1700")
- configure_file(${prop_file_in} ${platform}/${prop_file_v110})
- set(VS_VERSION "v110_xp")
- configure_file(${prop_file_in} ${platform}/${prop_file_v110_xp})
- set(VS_VERSION "v120")
- set(MSC_VERSION "1800")
- configure_file(${prop_file_in} ${platform}/${prop_file_v120})
- set(VS_VERSION "v120_xp")
- configure_file(${prop_file_in} ${platform}/${prop_file_v120_xp})
- set(VS_VERSION "v140")
- set(MSC_VERSION "1900")
- configure_file(${prop_file_in} ${platform}/${prop_file_v140})
- set(VS_VERSION "v140_xp")
- configure_file(${prop_file_in} ${platform}/${prop_file_v140_xp})
- set(VS_VERSION)
- set(MSC_VERSION)
- set(mflag)
-
- install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${platform}/${prop_file_v100}" DESTINATION tools/msbuild/${platform})
- install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${platform}/${prop_file_v110}" DESTINATION tools/msbuild/${platform})
- install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${platform}/${prop_file_v110_xp}" DESTINATION tools/msbuild/${platform})
- install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${platform}/${prop_file_v120}" DESTINATION tools/msbuild/${platform})
- install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${platform}/${prop_file_v120_xp}" DESTINATION tools/msbuild/${platform})
- install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${platform}/${prop_file_v140}" DESTINATION tools/msbuild/${platform})
- install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${platform}/${prop_file_v140_xp}" DESTINATION tools/msbuild/${platform})
-
- install(FILES "Microsoft.Cpp.Win32.LLVM-vs2010.targets" DESTINATION "tools/msbuild/${platform}" RENAME "Microsoft.Cpp.${platform}.LLVM-vs2010.targets")
- install(FILES "Microsoft.Cpp.Win32.LLVM-vs2012.targets" DESTINATION "tools/msbuild/${platform}" RENAME "Microsoft.Cpp.${platform}.LLVM-vs2012.targets")
- install(FILES "Microsoft.Cpp.Win32.LLVM-vs2012_xp.targets" DESTINATION "tools/msbuild/${platform}" RENAME "Microsoft.Cpp.${platform}.LLVM-vs2012_xp.targets")
- install(FILES "toolset-vs2013.targets" DESTINATION "tools/msbuild/${platform}")
- install(FILES "toolset-vs2013_xp.targets" DESTINATION "tools/msbuild/${platform}")
- install(FILES "toolset-vs2014.targets" DESTINATION "tools/msbuild/${platform}")
- install(FILES "toolset-vs2014_xp.targets" DESTINATION "tools/msbuild/${platform}")
- endforeach()
-
- set(LIB_PATH_VERSION)
- set(REG_KEY)
-
- install(DIRECTORY .
- DESTINATION tools/msbuild
- FILES_MATCHING
- PATTERN "*.bat"
- PATTERN ".svn" EXCLUDE
- )
-endif()
--- /dev/null
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <!-- The general order of executing an MSBuild file is roughly:
+ 1) vcxproj file
+ 2) ├─ Import Microsoft.Cpp.props
+ 3) │ └─ Import Toolset specific props (e.g. $(VCTargets)Platforms\Win32\PlatformToolsets\llvm\Toolset.props)
+ 4) │ └─ Import This File (LLVM.Cpp.Common.props)
+ 5) │─ Core logic of vcxproj (define files, override properties, etc)
+ 6) └─ Import Microsoft.Cpp.targets
+ 7) │─ Import Toolset specific targets file (e.g. $(VCTargets)Platforms\Win32\PlatformToolsets\llvm\Toolset.targets)
+ 8) └─ Run the compiler.
+ The important thing is that we have hooks at 3, 4, and 7. 3 and 4 give
+ us the ability to provide initial values for toolchain settings (where
+ is the compiler, what values are considered "default" for a given
+ setting, etc), 7 gives us the ability to act on anything that the user
+ has overridden (such as warning or erroring on incompatible settings,
+ mapping settings to other settings, etc).
+ -->
+
+ <PropertyGroup>
+ <!-- This initializes the values in Properties > General > Output Directory.
+ Builds will fail without this. -->
+ <OutDirWasSpecified Condition=" '$(OutDir)'!='' AND '$(OutDirWasSpecified)'=='' ">true</OutDirWasSpecified>
+ <OutDirWasSpecified Condition=" '$(OutDir)'=='' AND '$(OutDirWasSpecified)'=='' ">false</OutDirWasSpecified>
+
+ <IntDir Condition="'$(IntDir)'=='' AND '$(IntermediateOutputPath)'!=''">$(IntermediateOutputPath)</IntDir>
+ <IntDir Condition="'$(IntDir)'=='' AND '$(IntermediateOutputPath)'==''">$(Configuration)\</IntDir>
+ <OutDir Condition="'$(OutDir)'=='' AND '$(SolutionDir)' != ''">$(SolutionDir)$(Configuration)\</OutDir>
+ <OutDir Condition="'$(OutDir)'=='' AND '$(SolutionDir)' == ''">$(IntDir)</OutDir>
+ <DebuggerFlavor Condition="'$(DebuggerFlavor)'==''">WindowsLocalDebugger</DebuggerFlavor>
+ </PropertyGroup>
+
+ <PropertyGroup>
+ <!-- Short names for platform toolsets (added to project name in Solution Explorer) -->
+ <_PlatformToolsetShortNameFor_llvm>LLVM</_PlatformToolsetShortNameFor_llvm>
+ <_PlatformToolsetFriendlyNameFor_llvm>LLVM</_PlatformToolsetFriendlyNameFor_llvm>
+ </PropertyGroup>
+
+ <!-- Find an installed LLVM and set up our paths. -->
+ <PropertyGroup>
+ <LLVMInstallDir>$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\LLVM@LLVM)</LLVMInstallDir>
+ <LLVMInstallDir Condition="'$(LLVMInstallDir)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\LLVM@LLVM)</LLVMInstallDir>
+ <ClangClExecutable>$(LLVMInstallDir)bin\clang-cl.exe</ClangClExecutable>
+ </PropertyGroup>
+
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.WindowsSDK.props" Condition="Exists('$(VCTargetsPath)\Microsoft.Cpp.WindowsSDK.props')"/>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Common.props" />
+
+ <PropertyGroup>
+ <!-- Set some paths (such as include paths) that are common to all platforms. This is the same as what
+ the default paths for cl will use.
+ -->
+ <IncludePath Condition="'$(IncludePath)' == ''">$(IncludePath);$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
+ <LibraryWPath Condition="'$(LibraryWPath)' == ''">$(WindowsSDK_MetadataPath);</LibraryWPath>
+ <SourcePath Condition="'$(SourcePath)' == ''">$(VC_SourcePath);</SourcePath>
+ </PropertyGroup>
+
+
+ <!-- Set values which are reflected in the property UI by default. The user can override these
+ by editing the vcxproj file (or making changes via the UI, which has the same effect).
+ -->
+ <ItemDefinitionGroup>
+ <ClCompile>
+ <!-- Set this to "Default" (which means not passing any /RTC option) so that any other value will
+ be treated as having been overridden by the user. This Serves as a hint to the user that
+ Default is the value we support, and other values will generate a warning. It also means
+ that if the user simply creates a new project in MSVC (which uses /RTCu by default), then
+ switches the toolset to Clang, we will still treat the value as default (which for us is to
+ not pass the option). Only if the user explicitly overrode this setting in a project to use
+ /RTCu would we see the warning. -->
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+
+ <AdditionalOptions>-m$(PlatformArchitecture) %(AdditionalOptions)</AdditionalOptions>
+ </ClCompile>
+ </ItemDefinitionGroup>
+</Project>
--- /dev/null
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(VCTargetsPath)\Microsoft.CppCommon.targets" />
+
+ <PropertyGroup>
+ <!-- Set the path to clang-cl executable based on the value of the project-
+ level setting. This has to be done in the .targets file since values
+ selected via the settings UI appear in the vcxproj (which is imported
+ before the targets file but after the props file) and we need the path
+ that the user may have overridden in the UI. -->
+ <CLToolExe>$(ClangClExecutable)</CLToolExe>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <PropertyPageSchema Include="$(VCTargetsPath)$(LangID)\llvm-general.xml">
+ <Context>Project</Context>
+ </PropertyPageSchema>
+ </ItemGroup>
+
+ <!-- We hook up a target to run every time ClCompile is about to run, the
+ purpose of which is to sanitize the command line before it gets passed to
+ the compiler. Some options we silently discard, other options we warn on
+ and then discard, and other options we generate a hard error.
+
+ We try to keep hard errors to a minimum and reserve it for cases where
+ the option implies fundamentally different assumptions about the way code
+ should be compiled. This code would probably generate an error anyway,
+ but at least this way we give the user a more useful message about what
+ the actual problem is, rather than relying on some obscure compilation
+ error.
+
+ For any options that clang-cl discards, we would prefer to not even pass
+ them in on the command line. So if a user starts with a cl projects and
+ changes the toolset to clang, they could have set options such as /Gm
+ (minimal rebuild), /sdl (Security Checks), etc. The ClCompile task would
+ then notice this and pass these through to clang-cl.exe. Clang would of
+ course ignore them, but in some cases (such as /Gm), they would generate
+ -Wunused-command-line-argument warnings, so it's better if we can just
+ strip them from the command line entirely. This also has the side
+ benefit of making command lines shorter which is always nice when trying
+ to look at the tool output.
+ -->
+ <Target Name="BeforeClCompile" BeforeTargets="ClCompile">
+ <!-- Warn on /Zi and /ZI, then map them both to /Z7. -->
+ <Warning Condition="'%(ClCompile.DebugInformationFormat)' == 'ProgramDatabase'"
+ File="@(ClCompile)(0,0)"
+ Text="clang-cl does not support /Zi (Program Database). The file will be compiled as if /Z7 (C7 Compatible Debug Info) had been passed. Update the Debug Information Format in project settings to silence this warning."/>
+ <Warning Condition="'%(ClCompile.DebugInformationFormat)' == 'EditAndContinue'"
+ File="@(ClCompile)(0,0)"
+ Text="clang-cl does not support /ZI (Program Database for Edit and Continue). The file will be compiled as if /Z7 (C7 Compatible Debug Info) had been passed. Update the Debug Information Format in project settings to silence this warning."/>
+
+ <!-- Warn if Fiber Safe Optimizations are enabled, and then ignore them. -->
+ <Warning Condition="'%(ClCompile.EnableFiberSafeOptimizations)' == 'true'"
+ File="@(ClCompile)(0,0)"
+ Text="clang-cl does not support fiber safe optimizations (/GT). Disable this option in compatibility settings to silence this warning."/>
+
+ <!-- Warn if Whole Program Optimization is enabled, and then ignore it. -->
+ <Warning Condition="'%(ClCompile.WholeProgramOptimization)' == 'true'"
+ File="@(ClCompile)(0,0)"
+ Text="clang-cl does not support MSVC Link Time Optimization. Disable this option in compatibility settings to silence this warning."/>
+
+ <!-- Warn if Ignore Standard Include Paths is non-empty, then ignore it. -->
+ <Warning Condition="'%(ClCompile.IgnoreStandardIncludePath)' == 'true'"
+ File="@(ClCompile)(0,0)"
+ Text="clang-cl does not support Ignore Standard Include Path (/X). Disable this option in compatibility settings to silence this warning."/>
+
+ <!-- Warn if Smaller Type Check is enabled, then ignore it.-->
+ <Warning Condition="'%(ClCompile.SmallerTypeCheck)' == 'true'"
+ File="@(ClCompile)(0,0)"
+ Text="clang-cl does not support Smaller Type Check (/RTCc). Disable this option in compatibility settings to silence this warning."/>
+
+ <!-- Warn if Runtime Checks are enabled, then ignore them.-->
+ <Warning Condition="'%(ClCompile.BasicRuntimeChecks)' != 'Default'"
+ File="@(ClCompile)(0,0)"
+ Text="clang-cl does not support Basic Runtime Checks (/RTCu, /RTC1, /RTCs). Disable this option in compatibility settings to silence this warning."/>
+
+ <!-- Warn if parallel code generation on #pragma loop is enabled, then ignore. -->
+ <Warning Condition="'(ClCompile.EnableParallelCodeGeneration)' == 'true'"
+ File="@(ClCompile)(0,0)"
+ Text="clang-cl does not support parallel code generation with #pragma loop(hint) (/Qpar). Disable this option in compatibility settings to silence this warning."/>
+
+ <!-- Warn if hotpatchable images are turned on -->
+ <Warning Condition="'%(ClCompile.CreateHotpatchableImage)' == 'true'"
+ File="@(ClCompile)(0,0)"
+ Text="clang-cl does not support creating hotpatchable images (/hotpatch). Disable this option in compatibility settings to silence this warning."/>
+
+ <!-- Warn if /Zc:forScope- is specified, and then ignore it. -->
+ <Warning Condition="'%(ClCompile.ForceConformanceInForLoopScope)' == 'false'"
+ File="@(ClCompile)(0,0)"
+ Text="clang-cl does not support disabling for loop scope conformance (/Zc:forScope-). Disable this option in compatibility settings to silence this warning."/>
+
+ <!-- Warn if /Zc:wchar_t- is specified, and then ignore it. -->
+ <Warning Condition="'%(ClCompile.TreatWChar_tAsBuiltInType)' == 'false'"
+ File="@(ClCompile)(0,0)"
+ Text="clang-cl does not support treating wchar_t as a non builtin type (/Zc:wchar_t-). Disable this option in compatibility settings to silence this warning."/>
+
+ <!-- Warn if XML Documentation is generated, and then ignore it. -->
+ <Warning Condition="'%(ClCompile.GenerateXMLDocumentationFiles)' == 'true'"
+ File="@(ClCompile)(0,0)"
+ Text="clang-cl does not support generating xml documentation comment files (/doc). Disable this option in compatibility settings to silence this warning."/>
+
+ <!-- Warn if Browse Information is generated, and then ignore it. -->
+ <Warning Condition="'%(ClCompile.BrowseInformation)' == 'true'"
+ File="@(ClCompile)(0,0)"
+ Text="clang-cl does not support generating browse information (/FR). Disable this option in compatibility settings to silence this warning."/>
+
+ <!-- Warn if /analyze is passed, then ignore it. -->
+ <Warning Condition="'%(ClCompile.EnablePREfast)' == 'true'"
+ File="@(ClCompile)(0,0)"
+ Text="clang-cl does not support MSVC code analysis functionality (/analyze). Disable this option in compatibility settings to silence this warning."/>
+
+ <!-- Error if they're trying to compile this file as managed code. -->
+ <Error Condition="('%(ClCompile.CompileAsManaged)' != 'false') AND ('%(ClCompile.CompileAsManaged)' != '')"
+ File="@(ClCompile)(0,0)"
+ Text="clang-cl does not support compiling managed code (/clr). This file cannot be compiled."/>
+
+ <!-- Error if WinRT is being used. -->
+ <Error Condition="('%(ClCompile.CompileAsWinRT)' == 'true') OR ('%(ClCompile.WinRTNoStdLib)' == 'true')"
+ File="@(ClCompile)(0,0)"
+ Text="clang-cl does not support Windows Runtime Language Extensions (/ZW, /ZW:nostdlib). This file cannot be compiled."/>
+
+ <!-- Error if OpenMP language extensions are enabled. -->
+ <Error Condition="'%(ClCompile.OpenMPSupport)' == 'true'"
+ File="@(ClCompile)(0,0)"
+ Text="clang-cl does not support OpenMP (/openmp). This file cannot be compiled."/>
+
+ <!-- Error if C++ Modules are enabled. Clang has its own notion of modules that are not compatible. -->
+ <Error Condition="'%(ClCompile.EnableModules)' == 'true'"
+ File="@(ClCompile)(0,0)"
+ Text="clang-cl does not support MSVC Modules (/experimental:module). This file cannot be compiled."/>
+
+ <ItemGroup>
+ <ClCompile>
+ <!-- Map /ZI and /Zi to /Z7. Clang internally does this, so if we were
+ to just pass the option through, clang would work. The problem is
+ that MSBuild would not. MSBuild detects /ZI and /Zi and then
+ assumes (rightly) that there will be a compiler-generated PDB (e.g.
+ vc141.pdb). Since clang-cl will not emit this, MSBuild will always
+ think that the compiler-generated PDB needs to be re-generated from
+ scratch and trigger a full build. The way to avoid this is to
+ always give MSBuild accurate information about how we plan to
+ generate debug info (which is to always using /Z7 semantics).
+ -->
+ <DebugInformationFormat Condition="'%(ClCompile.DebugInformationFormat)' == 'ProgramDatabase'">OldStyle</DebugInformationFormat>
+ <DebugInformationFormat Condition="'%(ClCompile.DebugInformationFormat)' == 'EditAndContinue'">OldStyle</DebugInformationFormat>
+
+ <!-- Unset any options that we either silently ignore or warn about due to compatibility.
+ Generally when an option is set to no value, that means "Don't pass an option to the
+ compiler at all."
+ -->
+ <WholeProgramOptimization/>
+ <EnableFiberSafeOptimizations/>
+ <IgnoreStandardIncludePath/>
+ <EnableParallelCodeGeneration/>
+ <ForceConformanceInForLoopScope/>
+ <TreatWChar_tAsBuiltInType/>
+ <SDLCheck/>
+ <GenerateXMLDocumentationFiles/>
+ <BrowseInformation/>
+ <EnablePREfast/>
+ <MinimalRebuild/>
+ <StringPooling/>
+ <ExpandAttributedSource/>
+ <EnforceTypeConversionRules/>
+ <ErrorReporting/>
+ <DisableLanguageExtensions/>
+ <ProgramDataBaseFileName/>
+ <DisableSpecificWarnings/>
+ <TreatSpecificWarningsAsErrors/>
+ <ForcedUsingFiles/>
+ <PREfastLog/>
+ <PREfastAdditionalOptions/>
+ <PREfastAdditionalPlugins/>
+ <MultiProcessorCompilation/>
+ <UseFullPaths/>
+ <RemoveUnreferencedCodeData/>
+
+ <!-- We can't just unset BasicRuntimeChecks, as that will pass /RTCu to the compiler.
+ We have to explicitly set it to 'Default' to avoid passing anything. -->
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ </ClCompile>
+ </ItemGroup>
+ </Target>
+
+</Project>
+++ /dev/null
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
-</Project>\r
+++ /dev/null
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
- <Import Project="$(VCTargetsPath)\Microsoft.CppCommon.targets" />\r
-</Project>\r
+++ /dev/null
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <!-- Force TargetFrameworkVersion to v4.0 to support XP-->
- <PropertyGroup>
- <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
- <BeforeClCompileTargets>NoSupportCodeAnalysisXP;$(BeforeClCompileTargets)</BeforeClCompileTargets>
- </PropertyGroup>
-
- <Import Project="$(VCTargetsPath)\Microsoft.CppCommon.targets" />
-
- <Target Name="NoSupportCodeAnalysisXP" Condition="'$(ErrorNoSupportCodeAnalysisXP)' != 'false'">
- <VCMessage Condition="'$(DesignTimeBuild)' != 'true' and '@(ClCompile->AnyHaveMetadataValue('EnablePREfast', 'true'))'=='true'" Code="MSB8026" Type="Error"/>
- </Target>
-
- <PropertyGroup>
- <PrepareForBuildDependsOn>CheckWindowsSDK71A;$(PrepareForBuildDependsOn)</PrepareForBuildDependsOn>
- </PropertyGroup>
-
- <Target Name="CheckWindowsSDK71A">
- <VCMessage Code="MSB8003" Type="Warning" Arguments="WindowsSdkDir_71A" Condition="'$(WindowsSdkDir_71A)'=='' and '$(UseEnv)' != 'true'" />
- </Target>
-</Project>
+++ /dev/null
-<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> \r
- <Import Project="$(VCTargetsPath)\Platforms\$(Platform)\PlatformToolsets\@VS_VERSION@\Microsoft.Cpp.$(Platform).@VS_VERSION@.props" Condition="Exists('$(VCTargetsPath)\Platforms\$(Platform)\PlatformToolsets\@VS_VERSION@\Microsoft.Cpp.$(Platform).@VS_VERSION@.props')"/>\r
- <Import Project="$(VCTargetsPath)\Platforms\$(Platform)\PlatformToolsets\@VS_VERSION@\Toolset.props" Condition="Exists('$(VCTargetsPath)\Platforms\$(Platform)\PlatformToolsets\@VS_VERSION@\Toolset.props')"/>\r
-\r
- <PropertyGroup>\r
- <LLVMInstallDir>$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\LLVM\@REG_KEY@)</LLVMInstallDir>\r
- <LLVMInstallDir Condition="'$(LLVMInstallDir)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\LLVM\@REG_KEY@)</LLVMInstallDir>\r
- <ExecutablePath>$(LLVMInstallDir)\msbuild-bin;$(ExecutablePath)</ExecutablePath>\r
- <LibraryPath>$(LLVMInstallDir)\lib\clang\@LIB_PATH_VERSION@\lib\windows;$(LibraryPath)</LibraryPath>\r
- </PropertyGroup>\r
-\r
- <ItemDefinitionGroup>\r
- <ClCompile>\r
- <!-- Set the value of _MSC_VER to claim for compatibility -->\r
- <AdditionalOptions>-@mflag@ -fmsc-version=@MSC_VERSION@ %(AdditionalOptions)</AdditionalOptions>\r
- </ClCompile>\r
- </ItemDefinitionGroup>\r
-</Project>\r
--- /dev/null
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <Import Project="$(VCTargetsPath)\LLVM.Cpp.Common.props"/>\r
+\r
+ <PropertyGroup>\r
+ <ExecutablePath Condition="'$(ExecutablePath)' == ''">$(VC_ExecutablePath_x64);$(WindowsSDK_ExecutablePath);$(VS_ExecutablePath);$(MSBuild_ExecutablePath);$(FxCopDir);$(PATH);</ExecutablePath>\r
+ <ReferencePath Condition="'$(ReferencePath)' == ''">$(VC_ReferencesPath_x64);</ReferencePath>\r
+ <LibraryPath Condition="'$(LibraryPath)' == ''">$(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64);$(NETFXKitsDir)Lib\um\x64</LibraryPath>\r
+ <ExcludePath Condition="'$(ExcludePath)' == ''">$(VC_IncludePath);$(WindowsSDK_IncludePath);$(MSBuild_ExecutablePath);$(VC_LibraryPath_x64);</ExcludePath>\r
+ <DebugCppRuntimeFilesPath Condition="'$(DebugCppRuntimeFilesPath)' == ''">$(VCToolsInstallDir)redist\Debug_NonRedist\x64</DebugCppRuntimeFilesPath>\r
+ </PropertyGroup>\r
+</Project>\r
--- /dev/null
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <Import Project="$(VCTargetsPath)\LLVM.Cpp.Common.targets"/>\r
+</Project>\r
--- /dev/null
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <Import Project="$(VCTargetsPath)\LLVM.Cpp.Common.props"/>\r
+\r
+ <PropertyGroup>\r
+ <ExecutablePath Condition="'$(ExecutablePath)' == ''">$(VC_ExecutablePath_x86);$(WindowsSDK_ExecutablePath);$(VS_ExecutablePath);$(MSBuild_ExecutablePath);$(SystemRoot)\SysWow64;$(FxCopDir);$(PATH);</ExecutablePath>\r
+ <ReferencePath Condition="'$(ReferencePath)' == ''">$(VC_ReferencesPath_x86);</ReferencePath>\r
+ <LibraryPath Condition="'$(LibraryPath)' == ''">$(VC_LibraryPath_x86);$(WindowsSDK_LibraryPath_x86);$(NETFXKitsDir)Lib\um\x86</LibraryPath>\r
+ <ExcludePath Condition="'$(ExcludePath)' == ''">$(VC_IncludePath);$(WindowsSDK_IncludePath);$(MSBuild_ExecutablePath);$(VC_LibraryPath_x86);</ExcludePath>\r
+ <DebugCppRuntimeFilesPath Condition="'$(DebugCppRuntimeFilesPath)' == ''">$(VCToolsInstallDir)redist\Debug_NonRedist\x86</DebugCppRuntimeFilesPath>\r
+ </PropertyGroup>\r
+</Project>\r
--- /dev/null
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <Import Project="$(VCTargetsPath)\LLVM.Cpp.Common.targets"/>\r
+</Project>\r
-@echo off\r
-\r
-echo Installing MSVC integration...\r
-set SUCCESS=0\r
-\r
-REM Change to the directory of this batch file.\r
-cd /d %~dp0\r
-\r
-REM Loop over the two platforms in awkward batch file fashion.\r
-set PLATFORM=None\r
-:PLATFORMLOOPHEAD\r
-IF %PLATFORM% == x64 GOTO PLATFORMLOOPEND\r
-IF %PLATFORM% == Win32 SET PLATFORM=x64\r
-IF %PLATFORM% == None SET PLATFORM=Win32\r
-\r
-REM Search for the MSBuild toolsets directory.\r
-\r
-SET D="%ProgramFiles%\MSBuild\Microsoft.Cpp\v4.0\Platforms\%PLATFORM%\PlatformToolsets"\r
-IF EXIST %D% GOTO FOUND_V100\r
-SET D="%ProgramFiles(x86)%\MSBuild\Microsoft.Cpp\v4.0\Platforms\%PLATFORM%\PlatformToolsets"\r
-IF EXIST %D% GOTO FOUND_V100\r
-\r
-:TRY_V110\r
-SET D="%ProgramFiles%\MSBuild\Microsoft.Cpp\v4.0\V110\Platforms\%PLATFORM%\PlatformToolsets"\r
-IF EXIST %D% GOTO FOUND_V110\r
-SET D="%ProgramFiles(x86)%\MSBuild\Microsoft.Cpp\v4.0\V110\Platforms\%PLATFORM%\PlatformToolsets"\r
-IF EXIST %D% GOTO FOUND_V110\r
-\r
-:TRY_V120\r
-SET D="%ProgramFiles%\MSBuild\Microsoft.Cpp\v4.0\V120\Platforms\%PLATFORM%\PlatformToolsets"\r
-IF EXIST %D% GOTO FOUND_V120\r
-SET D="%ProgramFiles(x86)%\MSBuild\Microsoft.Cpp\v4.0\V120\Platforms\%PLATFORM%\PlatformToolsets"\r
-IF EXIST %D% GOTO FOUND_V120\r
-\r
-:TRY_V140\r
-SET D="%ProgramFiles%\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\%PLATFORM%\PlatformToolsets"\r
-IF EXIST %D% GOTO FOUND_V140\r
-SET D="%ProgramFiles(x86)%\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\%PLATFORM%\PlatformToolsets"\r
-IF EXIST %D% GOTO FOUND_V140\r
-\r
-:TRY_V150\r
-\r
-GOTO PLATFORMLOOPHEAD\r
-\r
-:PLATFORMLOOPEND\r
-IF %SUCCESS% == 1 goto DONE\r
-echo Failed to find MSBuild toolsets directory.\r
-goto FAILED\r
-\r
-\r
-:FOUND_V100\r
-REM Routine for installing v100 toolchain.\r
-IF NOT EXIST %D%\LLVM-vs2010 mkdir %D%\LLVM-vs2010\r
-IF NOT %ERRORLEVEL% == 0 GOTO FAILED\r
-copy %PLATFORM%\Microsoft.Cpp.%PLATFORM%.LLVM-vs2010.props %D%\LLVM-vs2010\r
-IF NOT %ERRORLEVEL% == 0 GOTO FAILED\r
-copy %PLATFORM%\Microsoft.Cpp.%PLATFORM%.LLVM-vs2010.targets %D%\LLVM-vs2010\r
-IF NOT %ERRORLEVEL% == 0 GOTO FAILED\r
-set SUCCESS=1\r
-GOTO TRY_V110\r
-\r
-:FOUND_V110\r
-REM Routine for installing v110 toolchain.\r
-IF NOT EXIST %D%\LLVM-vs2012 mkdir %D%\LLVM-vs2012\r
-IF NOT %ERRORLEVEL% == 0 GOTO FAILED\r
-copy %PLATFORM%\Microsoft.Cpp.%PLATFORM%.LLVM-vs2012.props %D%\LLVM-vs2012\r
-IF NOT %ERRORLEVEL% == 0 GOTO FAILED\r
-copy %PLATFORM%\Microsoft.Cpp.%PLATFORM%.LLVM-vs2012.targets %D%\LLVM-vs2012\r
-IF NOT %ERRORLEVEL% == 0 GOTO FAILED\r
-IF NOT EXIST %D%\LLVM-vs2012_xp mkdir %D%\LLVM-vs2012_xp\r
-IF NOT %ERRORLEVEL% == 0 GOTO FAILED\r
-copy %PLATFORM%\Microsoft.Cpp.%PLATFORM%.LLVM-vs2012_xp.props %D%\LLVM-vs2012_xp\r
-IF NOT %ERRORLEVEL% == 0 GOTO FAILED\r
-copy %PLATFORM%\Microsoft.Cpp.%PLATFORM%.LLVM-vs2012_xp.targets %D%\LLVM-vs2012_xp\r
-IF NOT %ERRORLEVEL% == 0 GOTO FAILED\r
-set SUCCESS=1\r
-GOTO TRY_V120\r
-\r
-:FOUND_V120\r
-REM Routine for installing v120 toolchain.\r
-IF NOT EXIST %D%\LLVM-vs2013 mkdir %D%\LLVM-vs2013\r
-IF NOT %ERRORLEVEL% == 0 GOTO FAILED\r
-copy %PLATFORM%\toolset-vs2013.props %D%\LLVM-vs2013\toolset.props\r
-IF NOT %ERRORLEVEL% == 0 GOTO FAILED\r
-copy %PLATFORM%\toolset-vs2013.targets %D%\LLVM-vs2013\toolset.targets\r
-IF NOT %ERRORLEVEL% == 0 GOTO FAILED\r
-IF NOT EXIST %D%\LLVM-vs2013_xp mkdir %D%\LLVM-vs2013_xp\r
-IF NOT %ERRORLEVEL% == 0 GOTO FAILED\r
-copy %PLATFORM%\toolset-vs2013_xp.props %D%\LLVM-vs2013_xp\toolset.props\r
-IF NOT %ERRORLEVEL% == 0 GOTO FAILED\r
-copy %PLATFORM%\toolset-vs2013_xp.targets %D%\LLVM-vs2013_xp\toolset.targets\r
-IF NOT %ERRORLEVEL% == 0 GOTO FAILED\r
-set SUCCESS=1\r
-GOTO TRY_V140\r
-\r
-:FOUND_V140\r
-REM Routine for installing v140 toolchain.\r
-IF NOT EXIST %D%\LLVM-vs2014 mkdir %D%\LLVM-vs2014\r
-IF NOT %ERRORLEVEL% == 0 GOTO FAILED\r
-copy %PLATFORM%\toolset-vs2014.props %D%\LLVM-vs2014\toolset.props\r
-IF NOT %ERRORLEVEL% == 0 GOTO FAILED\r
-copy %PLATFORM%\toolset-vs2014.targets %D%\LLVM-vs2014\toolset.targets\r
-IF NOT %ERRORLEVEL% == 0 GOTO FAILED\r
-IF NOT EXIST %D%\LLVM-vs2014_xp mkdir %D%\LLVM-vs2014_xp\r
-IF NOT %ERRORLEVEL% == 0 GOTO FAILED\r
-copy %PLATFORM%\toolset-vs2014_xp.props %D%\LLVM-vs2014_xp\toolset.props\r
-IF NOT %ERRORLEVEL% == 0 GOTO FAILED\r
-copy %PLATFORM%\toolset-vs2014_xp.targets %D%\LLVM-vs2014_xp\toolset.targets\r
-IF NOT %ERRORLEVEL% == 0 GOTO FAILED\r
-set SUCCESS=1\r
-GOTO TRY_V150\r
-\r
-\r
-:DONE\r
-echo Done!\r
-goto END\r
-\r
-:FAILED\r
-echo MSVC integration install failed.\r
-pause\r
-goto END\r
-\r
-:END\r
+@echo off
+
+echo Installing MSVC integration...
+set SUCCESS=0
+
+REM In general this script should not be used except for development and testing
+REM purposes. The proper way to install is via the VSIX, and the proper way to
+REM uninstall is through the Visual Studio extension manager.
+
+REM Change to the directory of this batch file.
+cd /d %~dp0
+
+REM Older versions of VS would look for these files in the Program Files\MSBuild directory
+REM but with VS2017 it seems to look for these directly in the Visual Studio instance.
+REM This means we'll need to do a little extra work to properly detect all the various
+REM instances, but in reality we can probably sidestep all of this by just wrapping this
+REM in a vsix and calling it a day, as that should handle everything for us.
+SET VCTargets=%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Professional\Common7\IDE\VC\VCTargets
+
+ECHO Installing Common Files
+copy LLVM.Cpp.Common.props "%VCTargets%"
+IF NOT %ERRORLEVEL% == 0 GOTO FAILED
+copy LLVM.Cpp.Common.targets "%VCTargets%"
+IF NOT %ERRORLEVEL% == 0 GOTO FAILED
+
+ECHO Installing x64 Platform Toolset
+SET PlatformToolsets=%VCTargets%\Platforms\x64\PlatformToolsets
+IF NOT EXIST "%PlatformToolsets%\llvm" mkdir "%PlatformToolsets%\llvm"
+IF NOT %ERRORLEVEL% == 0 GOTO FAILED
+copy PlatformX64\Toolset.props "%PlatformToolsets%\llvm"
+IF NOT %ERRORLEVEL% == 0 GOTO FAILED
+copy PlatformX64\Toolset.targets "%PlatformToolsets%\llvm"
+IF NOT %ERRORLEVEL% == 0 GOTO FAILED
+
+ECHO Installing Win32 Platform Toolset
+SET PlatformToolsets=%VCTargets%\Platforms\Win32\PlatformToolsets
+IF NOT EXIST "%PlatformToolsets%\llvm" mkdir "%PlatformToolsets%\llvm"
+IF NOT %ERRORLEVEL% == 0 GOTO FAILED
+copy PlatformX86\Toolset.props "%PlatformToolsets%\llvm"
+IF NOT %ERRORLEVEL% == 0 GOTO FAILED
+copy PlatformX86\Toolset.targets "%PlatformToolsets%\llvm"
+IF NOT %ERRORLEVEL% == 0 GOTO FAILED
+
+ECHO Installing C++ Settings UI
+copy llvm-general.xml "%VCTargets%\1033"
+IF NOT %ERRORLEVEL% == 0 GOTO FAILED
+
+:DONE
+echo Done!
+goto END
+
+:FAILED
+echo MSVC integration install failed.
+pause
+goto END
+
+:END
--- /dev/null
+====================
+LLVM Release License
+====================
+University of Illinois/NCSA
+Open Source License
+
+Copyright (c) 2007-2018 University of Illinois at Urbana-Champaign.
+All rights reserved.
+
+Developed by:
+
+ LLVM Team
+
+ University of Illinois at Urbana-Champaign
+
+ http://llvm.org
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal with the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+ * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimers.
+
+ * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimers in the documentation and/or other materials provided with the distribution.
+
+ * Neither the names of the LLVM Team, University of Illinois at Urbana-Champaign, nor the names of its contributors may be used to endorse or promote products derived from this Software without specific prior written permission.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE.
+
+====================
+The LLVM software contains code written by third parties. Such software will have its own individual LICENSE.TXT file in the directory in which it appears. This file will describe the copyrights, license, and restrictions which apply
+to that code.
+
+The disclaimer of warranty in the University of Illinois Open Source License applies to all code in the LLVM Distribution, and nothing in any of the other licenses gives permission to use the names of the LLVM Team or the University of Illinois to endorse or promote products derived from this Software.
+
+The following pieces of software have additional or alternate copyrights, licenses, and/or restrictions:
+
+Program Directory
+------- ---------
+<none yet>
+
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>\r
+<Rule\r
+ Name="LLVMGeneral"\r
+ DisplayName="LLVM"\r
+ PageTemplate="generic"\r
+ Description="LLVM"\r
+ xmlns="http://schemas.microsoft.com/build/2009/properties">\r
+ <Rule.Categories>\r
+ <Category Name="General" DisplayName="General" Description="General" />\r
+ </Rule.Categories>\r
+ <Rule.DataSource>\r
+ <DataSource Persistence="ProjectFile" Label="Configuration" />\r
+ </Rule.DataSource>\r
+\r
+ <StringProperty Name="ClangClExecutable"\r
+ DisplayName="Clang-CL Executable"\r
+ Description="Specifies the path to clang-cl.exe."\r
+ Category="General"\r
+ Default="$(LLVMInstallDir)bin\clang-cl.exe"\r
+ Subtype="file">\r
+ <StringProperty.DataSource>\r
+ <DataSource Persistence="ProjectFile" Label="" />\r
+ </StringProperty.DataSource>\r
+ </StringProperty>\r
+</Rule>\r
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <PropertyGroup>\r
+ <MinimumVisualStudioVersion>15.0</MinimumVisualStudioVersion>\r
+ <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>\r
+ </PropertyGroup>\r
+ <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />\r
+ <PropertyGroup>\r
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>\r
+ <SchemaVersion>2.0</SchemaVersion>\r
+ <ProjectTypeGuids>{82b43b9b-a64c-4715-b499-d71e9ca2bd60};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>\r
+ <ProjectGuid>{62530D9E-1B24-4C31-8DC9-AE47E9E5DC53}</ProjectGuid>\r
+ <OutputType>Library</OutputType>\r
+ <AppDesignerFolder>Properties</AppDesignerFolder>\r
+ <RootNamespace>llvm</RootNamespace>\r
+ <AssemblyName>llvm</AssemblyName>\r
+ <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>\r
+ <GeneratePkgDefFile>false</GeneratePkgDefFile>\r
+ <IncludeAssemblyInVSIXContainer>false</IncludeAssemblyInVSIXContainer>\r
+ <IncludeDebugSymbolsInVSIXContainer>false</IncludeDebugSymbolsInVSIXContainer>\r
+ <IncludeDebugSymbolsInLocalVSIXDeployment>false</IncludeDebugSymbolsInLocalVSIXDeployment>\r
+ <CopyBuildOutputToOutputDirectory>false</CopyBuildOutputToOutputDirectory>\r
+ <CopyOutputSymbolsToOutputDirectory>false</CopyOutputSymbolsToOutputDirectory>\r
+ <StartAction>Program</StartAction>\r
+ <StartProgram Condition="'$(DevEnvDir)' != ''">$(DevEnvDir)devenv.exe</StartProgram>\r
+ <StartArguments>/rootsuffix Exp</StartArguments>\r
+ </PropertyGroup>\r
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
+ <DebugSymbols>true</DebugSymbols>\r
+ <DebugType>full</DebugType>\r
+ <Optimize>false</Optimize>\r
+ <OutputPath>bin\Debug\</OutputPath>\r
+ <DefineConstants>DEBUG;TRACE</DefineConstants>\r
+ <ErrorReport>prompt</ErrorReport>\r
+ <WarningLevel>4</WarningLevel>\r
+ </PropertyGroup>\r
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">\r
+ <DebugType>pdbonly</DebugType>\r
+ <Optimize>true</Optimize>\r
+ <OutputPath>bin\Release\</OutputPath>\r
+ <DefineConstants>TRACE</DefineConstants>\r
+ <ErrorReport>prompt</ErrorReport>\r
+ <WarningLevel>4</WarningLevel>\r
+ </PropertyGroup>\r
+ <ItemGroup>\r
+ <Content Include="llvm-general.xml">\r
+ <IncludeInVSIX>true</IncludeInVSIX>\r
+ <InstallRoot>VCTargets</InstallRoot>\r
+ <VSIXSubPath>1033</VSIXSubPath>\r
+ </Content>\r
+ <Content Include="LLVM.Cpp.Common.props">\r
+ <IncludeInVSIX>true</IncludeInVSIX>\r
+ <InstallRoot>VCTargets</InstallRoot>\r
+ </Content>\r
+ <Content Include="license.txt">\r
+ <CopyToOutputDirectory>Always</CopyToOutputDirectory>\r
+ <IncludeInVSIX>true</IncludeInVSIX>\r
+ </Content>\r
+ <Content Include="LLVM.Cpp.Common.targets">\r
+ <IncludeInVSIX>true</IncludeInVSIX>\r
+ <InstallRoot>VCTargets</InstallRoot>\r
+ </Content>\r
+ <None Include="source.extension.vsixmanifest">\r
+ <SubType>Designer</SubType>\r
+ </None>\r
+ <Content Include="Platformx64\Toolset.props">\r
+ <IncludeInVSIX>true</IncludeInVSIX>\r
+ <InstallRoot>VCTargets</InstallRoot>\r
+ <VSIXSubPath>Platforms\x64\PlatformToolsets\llvm</VSIXSubPath>\r
+ </Content>\r
+ <Content Include="Platformx64\Toolset.targets">\r
+ <IncludeInVSIX>true</IncludeInVSIX>\r
+ <InstallRoot>VCTargets</InstallRoot>\r
+ <VSIXSubPath>Platforms\x64\PlatformToolsets\llvm</VSIXSubPath>\r
+ </Content>\r
+ <Content Include="Platformx86\Toolset.props">\r
+ <IncludeInVSIX>true</IncludeInVSIX>\r
+ <InstallRoot>VCTargets</InstallRoot>\r
+ <VSIXSubPath>Platforms\Win32\PlatformToolsets\llvm</VSIXSubPath>\r
+ </Content>\r
+ <Content Include="Platformx86\Toolset.targets">\r
+ <IncludeInVSIX>true</IncludeInVSIX>\r
+ <InstallRoot>VCTargets</InstallRoot>\r
+ <VSIXSubPath>Platforms\Win32\PlatformToolsets\llvm</VSIXSubPath>\r
+ </Content>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <Folder Include="Properties\" />\r
+ </ItemGroup>\r
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />\r
+ <Import Project="$(VSToolsPath)\VSSDK\Microsoft.VsSDK.targets" Condition="'$(VSToolsPath)' != ''" />\r
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r
+ Other similar extension points exist, see Microsoft.Common.targets.\r
+ <Target Name="BeforeBuild">\r
+ </Target>\r
+ <Target Name="AfterBuild">\r
+ </Target>\r
+ -->\r
+</Project>
\ No newline at end of file
--- /dev/null
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 15
+VisualStudioVersion = 15.0.27004.2006
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "llvm", "llvm.csproj", "{62530D9E-1B24-4C31-8DC9-AE47E9E5DC53}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {62530D9E-1B24-4C31-8DC9-AE47E9E5DC53}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {62530D9E-1B24-4C31-8DC9-AE47E9E5DC53}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {62530D9E-1B24-4C31-8DC9-AE47E9E5DC53}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {62530D9E-1B24-4C31-8DC9-AE47E9E5DC53}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {BD0FC803-C28B-4327-A129-CFB35C873897}
+ EndGlobalSection
+EndGlobal
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>\r
+<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">\r
+ <Metadata>\r
+ <Identity Id="llvm.d29c51f0-961f-4e20-aad6-356af569907f" Version="1.0" Language="en-US" Publisher="The LLVM Foundation" />\r
+ <DisplayName>LLVM Compiler Toolchain</DisplayName>\r
+ <Description xml:space="preserve">Allows the LLVM Compiler Toolchain (installed separately) to be used from within Visual Studio to build C/C++ Projects.</Description>\r
+ <License>license.txt</License>\r
+ </Metadata>\r
+ <Installation AllUsers="true">\r
+ <InstallationTarget Id="Microsoft.VisualStudio.Community" Version="[14.0,16.0)" />\r
+ <InstallationTarget Version="[14.0,16.0)" Id="Microsoft.VisualStudio.Pro" />\r
+ <InstallationTarget Version="[14.0,16.0)" Id="Microsoft.VisualStudio.Enterprise" />\r
+ </Installation>\r
+ <Dependencies>\r
+ <Dependency Id="Microsoft.Framework.NDP" DisplayName="Microsoft .NET Framework" d:Source="Manual" Version="[4.5,)" />\r
+ </Dependencies>\r
+ <Prerequisites>\r
+ <Prerequisite Id="Microsoft.VisualStudio.Component.CoreEditor" Version="[15.0,16.0)" DisplayName="Visual Studio core editor" />\r
+ <Prerequisite Id="Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Core" Version="[15.0.26621.2,16.0)" DisplayName="Visual C++ core desktop features" />\r
+ <Prerequisite Id="Microsoft.VisualStudio.Component.VC.CoreIde" Version="[15.0.26606.0,16.0)" DisplayName="Visual Studio C++ core features" />\r
+ </Prerequisites>\r
+</PackageManifest>\r
+++ /dev/null
-<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
- <Import Project="$(VCTargetsPath)\Microsoft.CppCommon.targets" />\r
-</Project>\r
+++ /dev/null
-<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <!-- Force TargetFrameworkVersion to v4.0 to support XP-->
- <PropertyGroup>
- <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
- <BeforeClCompileTargets>NoSupportCodeAnalysisXP;$(BeforeClCompileTargets)</BeforeClCompileTargets>
- </PropertyGroup>
-
- <Import Project="$(VCTargetsPath)\Microsoft.CppCommon.targets" />
-
- <Target Name="NoSupportCodeAnalysisXP" Condition="'$(ErrorNoSupportCodeAnalysisXP)' != 'false'">
- <VCMessage Condition="'$(DesignTimeBuild)' != 'true' and '@(ClCompile->AnyHaveMetadataValue('EnablePREfast', 'true'))'=='true'" Code="MSB8026" Type="Error"/>
- </Target>
-
- <PropertyGroup>
- <PrepareForBuildDependsOn>CheckWindowsSDK71A;$(PrepareForBuildDependsOn)</PrepareForBuildDependsOn>
- </PropertyGroup>
-
- <Target Name="CheckWindowsSDK71A">
- <VCMessage Code="MSB8003" Type="Warning" Arguments="WindowsSdkDir_71A" Condition="'$(WindowsSdkDir_71A)'=='' and '$(UseEnv)' != 'true'" />
- </Target>
-</Project>
+++ /dev/null
-<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
- <Import Project="$(VCTargetsPath)\Microsoft.CppCommon.targets" />\r
-</Project>\r
+++ /dev/null
-<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
- <!-- Force TargetFrameworkVersion to v4.0 to support XP-->\r
- <PropertyGroup>\r
- <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>\r
- <BeforeClCompileTargets>NoSupportCodeAnalysisXP;$(BeforeClCompileTargets)</BeforeClCompileTargets>\r
- </PropertyGroup>\r
-\r
- <Import Project="$(VCTargetsPath)\Microsoft.CppCommon.targets" />\r
-\r
- <Target Name="NoSupportCodeAnalysisXP" Condition="'$(ErrorNoSupportCodeAnalysisXP)' != 'false'">\r
- <VCMessage Condition="'$(DesignTimeBuild)' != 'true' and '@(ClCompile->AnyHaveMetadataValue('EnablePREfast', 'true'))'=='true'" Code="MSB8026" Type="Error"/>\r
- </Target>\r
-\r
- <PropertyGroup>\r
- <PrepareForBuildDependsOn>CheckWindowsSDK71A;$(PrepareForBuildDependsOn)</PrepareForBuildDependsOn>\r
- </PropertyGroup>\r
-\r
- <Target Name="CheckWindowsSDK71A">\r
- <VCMessage Code="MSB8003" Type="Warning" Arguments="WindowsSdkDir_71A" Condition="'$(WindowsSdkDir_71A)'=='' and '$(UseEnv)' != 'true'" />\r
- </Target>\r
-</Project>\r
-@echo off\r
-\r
-echo Uninstalling MSVC integration...\r
-\r
-REM CD to the directory of this batch file.\r
-cd /d %~dp0\r
-\r
-set PLATFORM=None\r
-:LOOPHEAD\r
-IF %PLATFORM% == x64 GOTO LOOPEND\r
-IF %PLATFORM% == Win32 SET PLATFORM=x64\r
-IF %PLATFORM% == None SET PLATFORM=Win32\r
-\r
-\r
-SET D="%ProgramFiles%\MSBuild\Microsoft.Cpp\v4.0\Platforms\%PLATFORM%\PlatformToolsets"\r
-IF EXIST %D%\LLVM-vs2010 del %D%\LLVM-vs2010\Microsoft.Cpp.%PLATFORM%.LLVM-vs2010.props\r
-IF EXIST %D%\LLVM-vs2010 del %D%\LLVM-vs2010\Microsoft.Cpp.%PLATFORM%.LLVM-vs2010.targets\r
-IF EXIST %D%\LLVM-vs2010 rmdir %D%\LLVM-vs2010\r
-SET D="%ProgramFiles(x86)%\MSBuild\Microsoft.Cpp\v4.0\Platforms\%PLATFORM%\PlatformToolsets"\r
-IF EXIST %D%\LLVM-vs2010 del %D%\LLVM-vs2010\Microsoft.Cpp.%PLATFORM%.LLVM-vs2010.props\r
-IF EXIST %D%\LLVM-vs2010 del %D%\LLVM-vs2010\Microsoft.Cpp.%PLATFORM%.LLVM-vs2010.targets\r
-IF EXIST %D%\LLVM-vs2010 rmdir %D%\LLVM-vs2010\r
-\r
-SET D="%ProgramFiles%\MSBuild\Microsoft.Cpp\v4.0\V110\Platforms\%PLATFORM%\PlatformToolsets"\r
-IF EXIST %D%\LLVM-vs2012 del %D%\LLVM-vs2012\Microsoft.Cpp.%PLATFORM%.LLVM-vs2012.props\r
-IF EXIST %D%\LLVM-vs2012 del %D%\LLVM-vs2012\Microsoft.Cpp.%PLATFORM%.LLVM-vs2012.targets\r
-IF EXIST %D%\LLVM-vs2012 rmdir %D%\LLVM-vs2012\r
-IF EXIST %D%\LLVM-vs2012_xp del %D%\LLVM-vs2012_xp\Microsoft.Cpp.%PLATFORM%.LLVM-vs2012_xp.props\r
-IF EXIST %D%\LLVM-vs2012_xp del %D%\LLVM-vs2012_xp\Microsoft.Cpp.%PLATFORM%.LLVM-vs2012_xp.targets\r
-IF EXIST %D%\LLVM-vs2012_xp rmdir %D%\LLVM-vs2012_xp\r
-SET D="%ProgramFiles(x86)%\MSBuild\Microsoft.Cpp\v4.0\V110\Platforms\%PLATFORM%\PlatformToolsets"\r
-IF EXIST %D%\LLVM-vs2012 del %D%\LLVM-vs2012\Microsoft.Cpp.%PLATFORM%.LLVM-vs2012.props\r
-IF EXIST %D%\LLVM-vs2012 del %D%\LLVM-vs2012\Microsoft.Cpp.%PLATFORM%.LLVM-vs2012.targets\r
-IF EXIST %D%\LLVM-vs2012 rmdir %D%\LLVM-vs2012\r
-IF EXIST %D%\LLVM-vs2012_xp del %D%\LLVM-vs2012_xp\Microsoft.Cpp.%PLATFORM%.LLVM-vs2012_xp.props\r
-IF EXIST %D%\LLVM-vs2012_xp del %D%\LLVM-vs2012_xp\Microsoft.Cpp.%PLATFORM%.LLVM-vs2012_xp.targets\r
-IF EXIST %D%\LLVM-vs2012_xp rmdir %D%\LLVM-vs2012_xp\r
-\r
-SET D="%ProgramFiles%\MSBuild\Microsoft.Cpp\v4.0\V120\Platforms\%PLATFORM%\PlatformToolsets"\r
-IF EXIST %D%\LLVM-vs2013 del %D%\LLVM-vs2013\toolset.props\r
-IF EXIST %D%\LLVM-vs2013 del %D%\LLVM-vs2013\toolset.targets\r
-IF EXIST %D%\LLVM-vs2013 rmdir %D%\LLVM-vs2013\r
-IF EXIST %D%\LLVM-vs2013_xp del %D%\LLVM-vs2013_xp\toolset.props\r
-IF EXIST %D%\LLVM-vs2013_xp del %D%\LLVM-vs2013_xp\toolset.targets\r
-IF EXIST %D%\LLVM-vs2013_xp rmdir %D%\LLVM-vs2013_xp\r
-SET D="%ProgramFiles(x86)%\MSBuild\Microsoft.Cpp\v4.0\V120\Platforms\%PLATFORM%\PlatformToolsets"\r
-IF EXIST %D%\LLVM-vs2013 del %D%\LLVM-vs2013\toolset.props\r
-IF EXIST %D%\LLVM-vs2013 del %D%\LLVM-vs2013\toolset.targets\r
-IF EXIST %D%\LLVM-vs2013 rmdir %D%\LLVM-vs2013\r
-IF EXIST %D%\LLVM-vs2013_xp del %D%\LLVM-vs2013_xp\toolset.props\r
-IF EXIST %D%\LLVM-vs2013_xp del %D%\LLVM-vs2013_xp\toolset.targets\r
-IF EXIST %D%\LLVM-vs2013_xp rmdir %D%\LLVM-vs2013_xp\r
-\r
-SET D="%ProgramFiles%\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\%PLATFORM%\PlatformToolsets"\r
-IF EXIST %D%\LLVM-vs2014 del %D%\LLVM-vs2014\toolset.props\r
-IF EXIST %D%\LLVM-vs2014 del %D%\LLVM-vs2014\toolset.targets\r
-IF EXIST %D%\LLVM-vs2014 rmdir %D%\LLVM-vs2014\r
-IF EXIST %D%\LLVM-vs2014_xp del %D%\LLVM-vs2014_xp\toolset.props\r
-IF EXIST %D%\LLVM-vs2014_xp del %D%\LLVM-vs2014_xp\toolset.targets\r
-IF EXIST %D%\LLVM-vs2014_xp rmdir %D%\LLVM-vs2014_xp\r
-SET D="%ProgramFiles(x86)%\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\%PLATFORM%\PlatformToolsets"\r
-IF EXIST %D%\LLVM-vs2014 del %D%\LLVM-vs2014\toolset.props\r
-IF EXIST %D%\LLVM-vs2014 del %D%\LLVM-vs2014\toolset.targets\r
-IF EXIST %D%\LLVM-vs2014 rmdir %D%\LLVM-vs2014\r
-IF EXIST %D%\LLVM-vs2014_xp del %D%\LLVM-vs2014_xp\toolset.props\r
-IF EXIST %D%\LLVM-vs2014_xp del %D%\LLVM-vs2014_xp\toolset.targets\r
-IF EXIST %D%\LLVM-vs2014_xp rmdir %D%\LLVM-vs2014_xp\r
-\r
-\r
-GOTO LOOPHEAD\r
-\r
-:LOOPEND\r
-echo Done!\r
+@echo off
+
+echo Uninstalling MSVC integration...
+
+REM In general this script should not be used except for development and testing
+REM purposes. The proper way to install is via the VSIX, and the proper way to
+REM uninstall is through the Visual Studio extension manager.
+
+REM CD to the directory of this batch file.
+cd /d %~dp0
+
+SET VCTargets=%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Professional\Common7\IDE\VC\VCTargets
+
+ECHO Uninstalling Common Files
+IF EXIST "%VCTargets%\LLVM.Cpp.Common.props" del "%VCTargets%\LLVM.Cpp.Common.props"
+IF EXIST "%VCTargets%\LLVM.Cpp.Common.targets" del "%VCTargets%\LLVM.Cpp.Common.targets"
+
+ECHO Uninstalling x64 Platform Toolset
+SET PlatformToolsets=%VCTargets%\Platforms\x64\PlatformToolsets
+IF EXIST "%PlatformToolsets%\llvm\Toolset.props" del "%PlatformToolsets%\llvm\Toolset.props"
+IF EXIST "%PlatformToolsets%\llvm\Toolset.targets" del "%PlatformToolsets%\llvm\Toolset.targets"
+IF EXIST "%PlatformToolsets%\llvm" rd "%PlatformToolsets%\llvm"
+
+ECHO Uninstalling Win32 Platform Toolset
+SET PlatformToolsets=%VCTargets%\Platforms\Win32\PlatformToolsets
+IF EXIST "%PlatformToolsets%\llvm\Toolset.props" del "%PlatformToolsets%\llvm\Toolset.props"
+IF EXIST "%PlatformToolsets%\llvm\Toolset.targets" del "%PlatformToolsets%\llvm\Toolset.targets"
+IF EXIST "%PlatformToolsets%\llvm" rd "%PlatformToolsets%\llvm"
+
+ECHO Uninstalling C++ Settings UI
+IF EXIST "%VCTargets%\1033\llvm-general.xml" del "%VCTargets%\1033\llvm-general.xml"
+
+echo Done!