From e40dfb771eb1a6c10c51ba021c63d4d3eb63af5e Mon Sep 17 00:00:00 2001 From: Leonid Yuriev Date: Mon, 14 Sep 2020 03:48:59 +0300 Subject: [PATCH] mdbx-ci: workaround for MSVC-2019 optimizer bug. Related to https://github.com/erthink/libmdbx/issues/116 Change-Id: I8d1a7248bcf3e4369ffb7600cedee8e5bc5bd95c --- appveyor.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 9879b3d4..9b55cc4b 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -35,7 +35,11 @@ branches: configuration: - Debug -- Release +# MSVC-2019 hangs during code generation/optimization due to its own internal errors. +# I have found out that the problem occurs because of the /Ob2 option (see https://github.com/erthink/libmdbx/issues/116). +# So the simplest workaround is to using RelWithDebiInfo configuration for testing (cmake will uses /Ob1 option), instead of Release. +# - Release +- RelWithDebInfo platform: - Win32 @@ -76,9 +80,9 @@ build_script: if ($env:PLATFORM -eq "x64") { $generator = "$generator Win64" } - & cmake -G "$generator" -D CMAKE_CONFIGURATION_TYPES="Debug;Release" -D MDBX_AVOID_CRT:BOOL=$env:MDBX_AVOID_CRT -D MDBX_BUILD_SHARED_LIBRARY:BOOL=$env:MDBX_BUILD_SHARED_LIBRARY .. + & cmake -G "$generator" -D CMAKE_CONFIGURATION_TYPES="Debug;Release;RelWithDebInfo" -D MDBX_AVOID_CRT:BOOL=$env:MDBX_AVOID_CRT -D MDBX_BUILD_SHARED_LIBRARY:BOOL=$env:MDBX_BUILD_SHARED_LIBRARY .. } else { - & cmake -G "$generator" -A $env:PLATFORM -D CMAKE_CONFIGURATION_TYPES="Debug;Release" -DMDBX_AVOID_CRT:BOOL=$env:MDBX_AVOID_CRT -D MDBX_BUILD_SHARED_LIBRARY:BOOL=$env:MDBX_BUILD_SHARED_LIBRARY .. + & cmake -G "$generator" -A $env:PLATFORM -D CMAKE_CONFIGURATION_TYPES="Debug;Release;RelWithDebInfo" -DMDBX_AVOID_CRT:BOOL=$env:MDBX_AVOID_CRT -D MDBX_BUILD_SHARED_LIBRARY:BOOL=$env:MDBX_BUILD_SHARED_LIBRARY .. } if ($LastExitCode -ne 0) { throw "Exec: $ErrorMessage"