Kaydet (Commit) b862cbdd authored tarafından David Ostrovsky's avatar David Ostrovsky

Support MSVC 15.0

New compiler changes quite some stuff:

* Compiler detection done based on different registry key
* .NET SDK detection done based on different registry key
* Msbuild installation directory changed
* Merge modules installation directory changed
* SDK number in registry doesn't match the directory name:
  (registry key: 10.0.14393, directory name: 10.0.14393.0)
* Compiler, include and library location directories changed
* Architecture specific directory changed: x64 instead of amd64
* Compiler own include directory must be added with -I option
* To force usage of SDK 10 (8.1 is selected per default) new
  switch WindowsTargetPlatformVersion is passed to msbuild, to
  avoid patching VC project files with this line:
<WindowsTargetPlatformVersion><SDK>/WindowsTargetPlatformVersion>

Known issues:

* Firebird is broken: http://paste.openstack.org/show/594333

Change-Id: I148d7932aff43bbbd07bd493504df974726234c2
Reviewed-on: https://gerrit.libreoffice.org/31279Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarDavid Ostrovsky <david@ostrovsky.org>
üst 60542769
......@@ -42,7 +42,7 @@ $(eval $(call gb_CppunitTest_use_libraries,basic_macros, \
ifeq ($(OS),WNT)
$(eval $(call gb_CppunitTest_use_system_win32_libs,basic_macros, \
oleaut32 \
$(if $(filter 140,$(VCVER)),legacy_stdio_definitions) \
$(if $(filter 140 150,$(VCVER)),legacy_stdio_definitions) \
odbc32 \
odbccp32 \
))
......
......@@ -20,7 +20,7 @@
#ifndef INCLUDED_BRIDGES_INC_EXCEPT_HXX
#define INCLUDED_BRIDGES_INC_EXCEPT_HXX
#if _MSC_VER >= 1900 // VC 2015 (and later?)
#if _MSC_VER >= 1900 // VC 2015/2017 (and later?)
// extern "C" void** __cdecl __current_exception()
// is defined in MSVS14.0/VC/crt/src/vcruntime/frame.cpp:
// return &__vcrt_getptd()->_curexception;
......
......@@ -803,7 +803,7 @@ int mscx_filterCppException(
if (rethrow && pRecord == pPointers->ExceptionRecord)
{
pRecord = *reinterpret_cast< EXCEPTION_RECORD ** >(
#if _MSC_VER >= 1900 // VC 2015 (and later?)
#if _MSC_VER >= 1900 // VC 2015/2017 (and later?)
__current_exception()
#else
// Hack to get msvcrt internal _curexception field
......
This diff is collapsed.
......@@ -21,6 +21,8 @@ $(call gb_ExternalProject_get_state_target,coinmp,build) :
/p:Platform=$(if $(filter INTEL,$(CPUNAME)),Win32,x64) \
$(if $(filter 120,$(VCVER)),/p:PlatformToolset=v120 /p:VisualStudioVersion=12.0 /ToolsVersion:12.0) \
$(if $(filter 140,$(VCVER)),/p:PlatformToolset=v140 /p:VisualStudioVersion=14.0 /ToolsVersion:14.0) \
$(if $(filter 150,$(VCVER)),/p:PlatformToolset=v141 /p:VisualStudioVersion=15.0 /ToolsVersion:15.0) \
$(if $(filter $(UCRTVERSION),),,/p:WindowsTargetPlatformVersion=$(UCRTVERSION)) \
,CoinMP/MSVisualStudio/v9)
else
......
......@@ -19,7 +19,9 @@ $(call gb_ExternalProject_get_state_target,cppunit,build) :
PROFILEFLAGS="$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release) \
/p:Platform=$(if $(filter INTEL,$(CPUNAME)),Win32,x64) \
$(if $(filter 120,$(VCVER)),/p:PlatformToolset=v120 /p:VisualStudioVersion=12.0 /ToolsVersion:12.0) \
$(if $(filter 140,$(VCVER)),/p:PlatformToolset=v140 /p:VisualStudioVersion=14.0 /ToolsVersion:14.0)" \
$(if $(filter 140,$(VCVER)),/p:PlatformToolset=v140 /p:VisualStudioVersion=14.0 /ToolsVersion:14.0) \
$(if $(filter 150,$(VCVER)),/p:PlatformToolset=v141 /p:VisualStudioVersion=15.0 /ToolsVersion:15.0) \
$(if $(filter $(UCRTVERSION),),,/p:WindowsTargetPlatformVersion=$(UCRTVERSION))" \
&& msbuild.exe cppunit_dll.vcxproj /p:Configuration=$${PROFILEFLAGS} \
&& cd ../DllPlugInTester \
&& msbuild.exe DllPlugInTester.vcxproj /p:Configuration=$${PROFILEFLAGS} \
......
......@@ -19,7 +19,10 @@ $(call gb_ExternalProject_get_state_target,lcms2,build):
$(call gb_ExternalProject_run,build,\
$(if $(filter 140,$(VCVER)),$(DEVENV) /Upgrade lcms2_DLL.vcxproj,echo up-to-date) && \
MSBuild.exe lcms2_DLL.vcxproj \
$(if $(filter 140,$(VCVER)),/p:PlatformToolset=v140,/p:PlatformToolset=v120) \
$(if $(filter 120,$(VCVER)),/p:PlatformToolset=v120 /p:VisualStudioVersion=12.0 /ToolsVersion:12.0) \
$(if $(filter 140,$(VCVER)),/p:PlatformToolset=v140 /p:VisualStudioVersion=14.0 /ToolsVersion:14.0) \
$(if $(filter 150,$(VCVER)),/p:PlatformToolset=v141 /p:VisualStudioVersion=15.0 /ToolsVersion:15.0) \
$(if $(filter $(UCRTVERSION),),,/p:WindowsTargetPlatformVersion=$(UCRTVERSION)) \
/p:Configuration=$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release) \
/p:Platform=$(if $(filter INTEL,$(CPUNAME)),Win32,x64) /p:TargetName=lcms2 \
,Projects/VC2013/lcms2_DLL)
......
......@@ -44,6 +44,8 @@ $(call gb_ExternalProject_get_state_target,libgltf,build) :
/p:Configuration=$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release) \
$(if $(filter 120,$(VCVER)),/p:PlatformToolset=v120 /p:VisualStudioVersion=12.0 /ToolsVersion:12.0) \
$(if $(filter 140,$(VCVER)),/p:PlatformToolset=v140 /p:VisualStudioVersion=14.0 /ToolsVersion:14.0) \
$(if $(filter 150,$(VCVER)),/p:PlatformToolset=v141 /p:VisualStudioVersion=15.0 /ToolsVersion:15.0) \
$(if $(filter $(UCRTVERSION),),,/p:WindowsTargetPlatformVersion=$(UCRTVERSION)) \
'/p:AdditionalIncludeDirectories=$(subst $(WHITESPACE),;,$(subst /,\,$(strip $(libgltf_AdditionalIncludes))))' \
/p:AdditionalLibraryDirectories=$(if $(SYSTEM_EPOXY),,"$(subst /,\,$(call gb_UnpackedTarball_get_dir,epoxy))\lib\$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release)\Win32") \
,build/win32)
......
......@@ -35,10 +35,10 @@ $(call gb_ExternalProject_get_state_target,python3,build) :
MAKEFLAGS= MSBuild.exe pcbuild.sln /t:Build \
/p:Configuration=$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release) \
/p:Platform=$(if $(filter INTEL,$(CPUNAME)),Win32,x64) \
$(if $(filter 120,$(VCVER)),/p:PlatformToolset=v120 \
/p:VisualStudioVersion=12.0 /ToolsVersion:12.0) \
$(if $(filter 140,$(VCVER)),/p:PlatformToolset=v140 \
/p:VisualStudioVersion=14.0 /ToolsVersion:14.0) \
$(if $(filter 120,$(VCVER)),/p:PlatformToolset=v120 /p:VisualStudioVersion=12.0 /ToolsVersion:12.0) \
$(if $(filter 140,$(VCVER)),/p:PlatformToolset=v140 /p:VisualStudioVersion=14.0 /ToolsVersion:14.0) \
$(if $(filter 150,$(VCVER)),/p:PlatformToolset=v141 /p:VisualStudioVersion=15.0 /ToolsVersion:15.0) \
$(if $(filter $(UCRTVERSION),),,/p:WindowsTargetPlatformVersion=$(UCRTVERSION)) \
,PCBuild)
else
......
......@@ -56,3 +56,22 @@ End
#endif
#if defined(WITH_VC150_REDIST)
#if defined WINDOWS_X64
MergeModule gid_MergeModule_Microsoft_VC150_CRT_x64
#else
MergeModule gid_MergeModule_Microsoft_VC150_CRT_x86
#endif
Feature = gm_Root;
#if defined WINDOWS_X64
Name = "Microsoft_VC150_CRT_x64.msm";
#else
Name = "Microsoft_VC150_CRT_x86.msm";
#endif
RootDir = "TARGETDIR";
ComponentCondition = "VC_REDIST=1";
End
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment