From 9e54b3792daca1898a1b751d37fa22360721eba5 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 20 Mar 2018 21:45:01 -0700 Subject: [mpg123] Disable LTCG for static libs to avoid ABI incompatibility --- ports/mpg123/CONTROL | 2 +- scripts/cmake/vcpkg_build_msbuild.cmake | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ports/mpg123/CONTROL b/ports/mpg123/CONTROL index f72437453..7eba5e9b8 100644 --- a/ports/mpg123/CONTROL +++ b/ports/mpg123/CONTROL @@ -1,3 +1,3 @@ Source: mpg123 -Version: 1.25.8-2 +Version: 1.25.8-3 Description: mpg123 is a real time MPEG 1.0/2.0/2.5 audio player/decoder for layers 1, 2 and 3 (MPEG 1.0 layer 3 also known as MP3). \ No newline at end of file diff --git a/scripts/cmake/vcpkg_build_msbuild.cmake b/scripts/cmake/vcpkg_build_msbuild.cmake index b8403d277..6da8a7369 100644 --- a/scripts/cmake/vcpkg_build_msbuild.cmake +++ b/scripts/cmake/vcpkg_build_msbuild.cmake @@ -87,6 +87,12 @@ function(vcpkg_build_msbuild) /m ) + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + # Disable LTCG for static libraries because this setting introduces ABI incompatibility between minor compiler versions + # TODO: Add a way for the user to override this if they want to opt-in to incompatibility + list(APPEND _csc_OPTIONS /p:WholeProgramOptimization=false) + endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") message(STATUS "Building ${_csc_PROJECT_PATH} for Release") file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) -- cgit v1.2.3