[mpg123] Disable LTCG for static libs to avoid ABI incompatibility

This commit is contained in:
Robert Schumacher 2018-03-20 21:45:01 -07:00
parent d80dd5cbc7
commit 9e54b3792d
2 changed files with 7 additions and 1 deletions

View File

@ -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).

View File

@ -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)