From 1fde27bb620672a96a53c29821e022f310aa89b6 Mon Sep 17 00:00:00 2001 From: Ivan Tikhonov Date: Wed, 28 Sep 2022 14:55:16 +0300 Subject: [PATCH] Change debug information format from Z7 to Zi for transformation library on Windows (#13250) * Change debug informaiton format from Z7 to Zi for transformation library. Temporary workaround for LNK1248: image size (1004722F6) exceeds maximum allowable size (FFFFFFFF) * add WIN32 check --- src/common/transformations/CMakeLists.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/common/transformations/CMakeLists.txt b/src/common/transformations/CMakeLists.txt index 727927ff974..3af6794b313 100644 --- a/src/common/transformations/CMakeLists.txt +++ b/src/common/transformations/CMakeLists.txt @@ -55,3 +55,13 @@ set_target_properties(${TARGET_NAME}_obj PROPERTIES INTERPROCEDURAL_OPTIMIZATION # developer package openvino_developer_export_targets(COMPONENT core_legacy TARGETS ${TARGET_NAME}) + +# temporary workaround for fatal error LNK1248: image size (1004722F6) exceeds maximum +# allowable size (FFFFFFFF) +# the symbolic debugging information will be stored in a separate .pdb file. +if(WIN32) + string(REPLACE "/Z7" "/Zi" CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}") + string(REPLACE "/Z7" "/Zi" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}") + string(REPLACE "/Z7" "/Zi" CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}") + string(REPLACE "/Z7" "/Zi" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}") +endif()