diff --git a/AutoSetup.bat b/AutoSetup.bat new file mode 100644 index 0000000..e67c22f --- /dev/null +++ b/AutoSetup.bat @@ -0,0 +1,44 @@ +@echo off +REM LLVM 4+ MSBuild 15 Integration +REM Creation Date: 07-11-2017 +REM Update Date: 28-03-2017 +REM If you haven't received a copy of the LICENSe, See: Uol-NCSA License + +set VS_REGVAL=15.0 + +if "%PROCESSOR_ARCHITECTURE%"=="AMD64" (set VS_REGKEY=HKLM\Software\WOW6432Node\Microsoft\VisualStudio\SxS\VS7) +if not "%PROCESSOR_ARCHITECTURE%"=="AMD64" (set VS_REGKEY=HKLM\Software\Microsoft\VisualStudio\SxS\VS7) + +reg query %VS_REGKEY% /v %VS_REGVAL% 2>nul || (echo No vs2017 registry key present! & exit /b 1) + +set VS_DIR= +for /f "tokens=2,*" %%a in ('reg query %VS_REGKEY% /v %VS_REGVAL% ^| findstr %VS_REGVAL%') do ( + set VS_DIR=%%b +) + +if not defined VS_DIR (echo Cannot find Visual Studio 2017 directory! & exit /b 1) + +set VS_PROOT_DIR=%VS_DIR%\Common7\IDE\VC\VCTargets\Platforms + +if not exist "%VS_PROOT_DIR%\Win32\PlatformToolsets\LLVM-vs2017" (mkdir "%VS_PROOT_DIR%\Win32\PlatformToolsets\LLVM-vs2017") +if not exist "%VS_PROOT_DIR%\Win32\PlatformToolsets\LLVM-vs2017_xp" (mkdir "%VS_PROOT_DIR%\Win32\PlatformToolsets\LLVM-vs2017_xp") +copy Toolset-llvm-vs2017-x86.props "%VS_PROOT_DIR%\Win32\PlatformToolsets\LLVM-vs2017\Toolset.props" +copy Toolset-llvm-vs2017-x86.targets "%VS_PROOT_DIR%\Win32\PlatformToolsets\LLVM-vs2017\Toolset.targets" +copy Toolset-llvm-vs2017-xp-x86.props "%VS_PROOT_DIR%\Win32\PlatformToolsets\LLVM-vs2017_xp\Toolset.props" +copy Toolset-llvm-vs2017-xp-x86.targets "%VS_PROOT_DIR%\Win32\PlatformToolsets\LLVM-vs2017_xp\Toolset.targets" + +if "%PROCESSOR_ARCHITECTURE%"=="AMD64" goto install_x64 +if not "%PROCESSOR_ARCHITECTURE%"=="AMD64" goto done + +:install_x64 +if not exist "%VS_PROOT_DIR%\x64\PlatformToolsets\LLVM-vs2017" (mkdir "%VS_PROOT_DIR%\x64\PlatformToolsets\LLVM-vs2017") +if not exist "%VS_PROOT_DIR%\x64\PlatformToolsets\LLVM-vs2017_xp" (mkdir "%VS_PROOT_DIR%\x64\PlatformToolsets\LLVM-vs2017_xp") +copy Toolset-llvm-vs2017-x64.props "%VS_PROOT_DIR%\x64\PlatformToolsets\LLVM-vs2017\Toolset.props" +copy Toolset-llvm-vs2017-x64.targets "%VS_PROOT_DIR%\x64\PlatformToolsets\LLVM-vs2017\Toolset.targets" +copy Toolset-llvm-vs2017-xp-x64.props "%VS_PROOT_DIR%\x64\PlatformToolsets\LLVM-vs2017_xp\Toolset.props" +copy Toolset-llvm-vs2017-xp-x64.targets "%VS_PROOT_DIR%\x64\PlatformToolsets\LLVM-vs2017_xp\Toolset.targets" +goto done + +:done +echo Setup OK! +pause diff --git a/README.MD b/README.MD index 46bc05a..e6c9981 100644 --- a/README.MD +++ b/README.MD @@ -1,17 +1,3 @@ -# LLVM Visual Studio 2017 Integration +# Visual Studio 2017 Integration for LLVM 7.0 -This repository contains Visual Studio 2017 integration for various LLVM versions. - -Pull requests for new versions are welcome, just create a branch and adjust the configuration. - -### How to use it? -Simply fork the branch related to your version - -| LLVM Version | Branch | -| ------------ | ------ | -| 5.0.0 | v5.0 | -| 6.0.0 | v6.0 | - -### LICENSE - -Released under Uol-NCSA (Same license as LLVM) +See "master" branch for instruction about installing diff --git a/Toolset-llvm-vs2017-x64.props b/Toolset-llvm-vs2017-x64.props new file mode 100644 index 0000000..d4eefcf --- /dev/null +++ b/Toolset-llvm-vs2017-x64.props @@ -0,0 +1,50 @@ + + + + + + true + false + + $(IntermediateOutputPath) + $(Platform)\$(Configuration)\ + $(IntDir) + $(SolutionDir)$(Platform)\$(Configuration)\ + + + + + + + $(VC_ExecutablePath_x64);$(WindowsSDK_ExecutablePath);$(VS_ExecutablePath);$(MSBuild_ExecutablePath);$(FxCopDir);$(PATH); + $(VC_IncludePath);$(WindowsSDK_IncludePath); + $(VC_ReferencesPath_x64); + $(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64);$(NETFXKitsDir)Lib\um\x64 + $(WindowsSDK_MetadataPath); + $(VC_SourcePath); + $(VC_IncludePath);$(WindowsSDK_IncludePath);$(MSBuild_ExecutablePath);$(VC_LibraryPath_x64); + $(VCToolsInstallDir)redist\Debug_NonRedist\x64 + + + + + + + + + $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\LLVM\LLVM) + $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\LLVM\LLVM) + $(LLVMInstallDir)\bin;$(ExecutablePath) + $(LLVMInstallDir)\lib\clang\7.0.0\include;$(IncludePath) $(LLVMInstallDir)\lib\clang\7.0.0\lib\windows;$(LibraryPath) + Native64Bit + clang-cl.exe + $(LLVMInstallDir)\bin + + + + + + -m64 -fmsc-version=1910 %(AdditionalOptions) + + + diff --git a/Toolset-llvm-vs2017-x64.targets b/Toolset-llvm-vs2017-x64.targets new file mode 100644 index 0000000..05b59a2 --- /dev/null +++ b/Toolset-llvm-vs2017-x64.targets @@ -0,0 +1,3 @@ + + + diff --git a/Toolset-llvm-vs2017-x86.props b/Toolset-llvm-vs2017-x86.props new file mode 100644 index 0000000..d1dd171 --- /dev/null +++ b/Toolset-llvm-vs2017-x86.props @@ -0,0 +1,50 @@ + + + + + + true + false + + $(IntermediateOutputPath) + $(Platform)\$(Configuration)\ + $(IntDir) + $(SolutionDir)$(Platform)\$(Configuration)\ + + + + + + + $(VC_ExecutablePath_x86);$(WindowsSDK_ExecutablePath);$(VS_ExecutablePath);$(MSBuild_ExecutablePath);$(FxCopDir);$(PATH); + $(VC_IncludePath);$(WindowsSDK_IncludePath); + $(VC_ReferencesPath_x86); + $(VC_LibraryPath_x86);$(WindowsSDK_LibraryPath_x86);$(NETFXKitsDir)Lib\um\x86 + $(WindowsSDK_MetadataPath); + $(VC_SourcePath); + $(VC_IncludePath);$(WindowsSDK_IncludePath);$(MSBuild_ExecutablePath);$(VC_LibraryPath_x86); + $(VCToolsInstallDir)redist\Debug_NonRedist\x86 + + + + + + + + + $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\LLVM\LLVM) + $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\LLVM\LLVM) + $(LLVMInstallDir)\bin;$(ExecutablePath) + $(LLVMInstallDir)\lib\clang\7.0.0\include;$(IncludePath) + $(LLVMInstallDir)\lib\clang\7.0.0\lib\windows;$(LibraryPath) + clang-cl.exe + $(LLVMInstallDir)\bin + + + + + + -m32 -fmsc-version=1910 %(AdditionalOptions) + + + diff --git a/Toolset-llvm-vs2017-x86.targets b/Toolset-llvm-vs2017-x86.targets new file mode 100644 index 0000000..05b59a2 --- /dev/null +++ b/Toolset-llvm-vs2017-x86.targets @@ -0,0 +1,3 @@ + + + diff --git a/Toolset-llvm-vs2017-xp-x64.props b/Toolset-llvm-vs2017-xp-x64.props new file mode 100644 index 0000000..eb6cdd3 --- /dev/null +++ b/Toolset-llvm-vs2017-xp-x64.props @@ -0,0 +1,71 @@ + + + + + + true + false + + $(IntermediateOutputPath) + $(Platform)\$(Configuration)\ + $(IntDir) + $(SolutionDir)$(Platform)\$(Configuration)\ + + true + + Windows + 7.0 + + + + + + + $(VC_ExecutablePath_x64);$(WindowsSdk_71A_ExecutablePath);$(WindowsSDK_ExecutablePath);$(VS_ExecutablePath);$(MSBuild_ExecutablePath);$(FxCopDir);$(PATH); + $(VC_IncludePath);$(WindowsSdk_71A_IncludePath); + $(VC_ReferencesPath_x64); + $(VC_LibraryPath_x64);$(WindowsSdk_71A_LibraryPath_x64); + $(VC_SourcePath); + $(VC_IncludePath);$(WindowsSdk_71A_IncludePath);$(MSBuild_ExecutablePath);$(VC_LibraryPath_x64); + $(VCToolsInstallDir)redist\Debug_NonRedist\x64 + + + + + + _USING_V110_SDK71_;%(PreprocessorDefinitions) + + + _USING_V110_SDK71_;%(PreprocessorDefinitions) + + _USING_V110_SDK71_;%(DesigntimePreprocessorDefinitions) + + + 5.02 + + + + + + + + + + $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\LLVM\LLVM) + $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\LLVM\LLVM) + $(LLVMInstallDir)\bin;$(ExecutablePath) + $(LLVMInstallDir)\lib\clang\7.0.0\include;$(IncludePath) + $(LLVMInstallDir)\lib\clang\7.0.0\lib\windows;$(LibraryPath) + Native64Bit + clang-cl.exe + $(LLVMInstallDir)\bin + + + + + + -m64 -fmsc-version=1910 %(AdditionalOptions) + + + diff --git a/Toolset-llvm-vs2017-xp-x64.targets b/Toolset-llvm-vs2017-xp-x64.targets new file mode 100644 index 0000000..eec4f18 --- /dev/null +++ b/Toolset-llvm-vs2017-xp-x64.targets @@ -0,0 +1,21 @@ + + + + v4.0 + NoSupportCodeAnalysisXP;$(BeforeClCompileTargets) + + + + + + + + + + CheckWindowsSDK71A;$(PrepareForBuildDependsOn) + + + + + + diff --git a/Toolset-llvm-vs2017-xp-x86.props b/Toolset-llvm-vs2017-xp-x86.props new file mode 100644 index 0000000..8c2f881 --- /dev/null +++ b/Toolset-llvm-vs2017-xp-x86.props @@ -0,0 +1,70 @@ + + + + + + true + false + + $(IntermediateOutputPath) + $(Platform)\$(Configuration)\ + $(IntDir) + $(SolutionDir)$(Platform)\$(Configuration)\ + + true + + Windows + 7.0 + + + + + + + $(VC_ExecutablePath_x86);$(WindowsSdk_71A_ExecutablePath);$(WindowsSDK_ExecutablePath);$(VS_ExecutablePath);$(MSBuild_ExecutablePath);$(FxCopDir);$(PATH); + $(VC_IncludePath);$(WindowsSdk_71A_IncludePath); + $(VC_ReferencesPath_x86); + $(VC_LibraryPath_x86);$(WindowsSdk_71A_LibraryPath_x86); + $(VC_SourcePath); + $(VC_IncludePath);$(WindowsSdk_71A_IncludePath);$(MSBuild_ExecutablePath);$(VC_LibraryPath_x86); + $(VCToolsInstallDir)redist\Debug_NonRedist\x86 + + + + + + _USING_V110_SDK71_;%(PreprocessorDefinitions) + + + _USING_V110_SDK71_;%(PreprocessorDefinitions) + + _USING_V110_SDK71_;%(DesigntimePreprocessorDefinitions) + + + 5.02 + + + + + + + + + + $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\LLVM\LLVM) + $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\LLVM\LLVM) + $(LLVMInstallDir)\bin;$(ExecutablePath) + $(LLVMInstallDir)\lib\clang\7.0.0\include;$(IncludePath) + $(LLVMInstallDir)\lib\clang\7.0.0\lib\windows;$(LibraryPath) + clang-cl.exe + $(LLVMInstallDir)\bin + + + + + + -m32 -fmsc-version=1910 %(AdditionalOptions) + + + diff --git a/Toolset-llvm-vs2017-xp-x86.targets b/Toolset-llvm-vs2017-xp-x86.targets new file mode 100644 index 0000000..eec4f18 --- /dev/null +++ b/Toolset-llvm-vs2017-xp-x86.targets @@ -0,0 +1,21 @@ + + + + v4.0 + NoSupportCodeAnalysisXP;$(BeforeClCompileTargets) + + + + + + + + + + CheckWindowsSDK71A;$(PrepareForBuildDependsOn) + + + + + +