mirror of https://github.com/microsoft/vcpkg.git
openvino: fix debug build by making pdbs in windows (#50299)
Co-authored-by: Javier Matos Denizac <javiermat@microsoft.com>
This commit is contained in:
parent
ef71a0fda3
commit
ff9d90fdce
|
|
@ -0,0 +1,16 @@
|
|||
diff --git a/cmake/developer_package/compile_flags/os_flags.cmake b/cmake/developer_package/compile_flags/os_flags.cmake
|
||||
index 3ce87023ad..a2c5b2dda1 100644
|
||||
--- a/cmake/developer_package/compile_flags/os_flags.cmake
|
||||
+++ b/cmake/developer_package/compile_flags/os_flags.cmake
|
||||
@@ -134,6 +134,11 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /DEBUG")
|
||||
endif()
|
||||
|
||||
+ if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
+ string(REPLACE "/Z7" "/Zi" CMAKE_C_FLAGS_DEBUG $CMAKE_C_FLAGS_DEBUG)
|
||||
+ string(REPLACE "/Z7" "/Zi" CMAKE_CXX_FLAGS_DEBUG $CMAKE_CXX_FLAGS_DEBUG)
|
||||
+ endif()
|
||||
+
|
||||
# need to set extra flags after /DEBUG to ensure that binary size is not bloated
|
||||
set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /OPT:REF /OPT:ICF")
|
||||
set(CMAKE_MODULE_LINKER_FLAGS_RELEASE "${CMAKE_MODULE_LINKER_FLAGS_RELEASE} /OPT:REF /OPT:ICF")
|
||||
|
|
@ -5,7 +5,7 @@ vcpkg_from_github(
|
|||
SHA512 77259f2211aa27c70c4930795ab6a7f7a0eade6fa8cda9b38caafdb3fa8081dba7c6bb5c2fa75adbdb224e4d84c80c48f19eef463500cd58316aa55183e6d660
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
windows_fix_giant_libs.patch
|
||||
msvc_debug_info_only_in_pdb.patch
|
||||
onednn_gpu_includes.patch
|
||||
protobuf-6.patch
|
||||
npu_deps.patch
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json",
|
||||
"name": "openvino",
|
||||
"version": "2026.0.0",
|
||||
"port-version": 1,
|
||||
"maintainers": "OpenVINO Developers <openvino@intel.com>",
|
||||
"summary": "This is a port for Open Visual Inference And Optimization toolkit for AI inference",
|
||||
"description": [
|
||||
|
|
|
|||
|
|
@ -1,59 +0,0 @@
|
|||
diff --git a/src/plugins/intel_gpu/CMakeLists.txt b/src/plugins/intel_gpu/CMakeLists.txt
|
||||
index 427460fb59..818047190a 100644
|
||||
--- a/src/plugins/intel_gpu/CMakeLists.txt
|
||||
+++ b/src/plugins/intel_gpu/CMakeLists.txt
|
||||
@@ -72,7 +72,7 @@ ov_add_plugin(NAME ${TARGET_NAME}
|
||||
target_compile_options(${TARGET_NAME} PRIVATE
|
||||
$<$<CONFIG:Release>:$<IF:$<CXX_COMPILER_ID:MSVC>,/Os,-Os>>)
|
||||
|
||||
-target_link_libraries(${TARGET_NAME} PRIVATE openvino_intel_gpu_graph openvino::pugixml)
|
||||
+target_link_libraries(${TARGET_NAME} PRIVATE openvino_intel_gpu_graph openvino_intel_gpu_graph_impls openvino::pugixml)
|
||||
|
||||
target_include_directories(${TARGET_NAME} PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/include/)
|
||||
diff --git a/src/plugins/intel_gpu/src/graph/CMakeLists.txt b/src/plugins/intel_gpu/src/graph/CMakeLists.txt
|
||||
index 7538f01b3b..576c3fae29 100644
|
||||
--- a/src/plugins/intel_gpu/src/graph/CMakeLists.txt
|
||||
+++ b/src/plugins/intel_gpu/src/graph/CMakeLists.txt
|
||||
@@ -116,8 +116,6 @@ ov_add_target(
|
||||
ROOT ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
EXCLUDED_SOURCE_PATHS
|
||||
${EXCLUDE_PATHS}
|
||||
- OBJECT_FILES
|
||||
- ${OBJ_FILES}
|
||||
INCLUDES
|
||||
PUBLIC
|
||||
${COMMON_INCLUDE_DIRS}
|
||||
@@ -139,3 +137,20 @@ ov_set_threading_interface_for(${TARGET_NAME})
|
||||
set_target_properties(${TARGET_NAME} PROPERTIES INTERPROCEDURAL_OPTIMIZATION_RELEASE ${ENABLE_LTO})
|
||||
|
||||
ov_install_static_lib(${TARGET_NAME} ${OV_CPACK_COMP_CORE})
|
||||
+
|
||||
+
|
||||
+# Link all object files from ./impls/* into a different library to avoid giant files
|
||||
+
|
||||
+add_library(${TARGET_NAME}_impls STATIC ${OBJ_FILES})
|
||||
+
|
||||
+target_link_libraries(${TARGET_NAME}_impls PUBLIC ${COMMON_LINK_LIBRARIES} ${EXTRA_LINK_LIBRARIES} openvino::reference)
|
||||
+
|
||||
+add_dependencies(${TARGET_NAME}_impls run_codegen_test)
|
||||
+
|
||||
+target_compile_options(${TARGET_NAME}_impls PRIVATE ${COMMON_COMPILE_OPTIONS})
|
||||
+
|
||||
+ov_set_threading_interface_for(${TARGET_NAME}_impls)
|
||||
+
|
||||
+set_target_properties(${TARGET_NAME}_impls PROPERTIES INTERPROCEDURAL_OPTIMIZATION_RELEASE ${ENABLE_LTO})
|
||||
+
|
||||
+ov_install_static_lib(${TARGET_NAME}_impls ${OV_CPACK_COMP_CORE})
|
||||
diff --git a/src/plugins/intel_gpu/tests/unit/CMakeLists.txt b/src/plugins/intel_gpu/tests/unit/CMakeLists.txt
|
||||
index 09f95d298a..3b3685875b 100644
|
||||
--- a/src/plugins/intel_gpu/tests/unit/CMakeLists.txt
|
||||
+++ b/src/plugins/intel_gpu/tests/unit/CMakeLists.txt
|
||||
@@ -69,6 +69,7 @@ endif()
|
||||
set_target_properties(${TARGET_NAME} PROPERTIES INTERPROCEDURAL_OPTIMIZATION_RELEASE ${ENABLE_LTO})
|
||||
|
||||
target_link_libraries(${TARGET_NAME} PRIVATE openvino_intel_gpu_graph
|
||||
+ openvino_intel_gpu_graph_impls
|
||||
OpenCL::OpenCL
|
||||
gtest
|
||||
gtest_main
|
||||
|
|
@ -7334,7 +7334,7 @@
|
|||
},
|
||||
"openvino": {
|
||||
"baseline": "2026.0.0",
|
||||
"port-version": 0
|
||||
"port-version": 1
|
||||
},
|
||||
"openvpn3": {
|
||||
"baseline": "3.10",
|
||||
|
|
|
|||
|
|
@ -1,5 +1,10 @@
|
|||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "4155b58ea06eda39584e3d35a37fbceec289bdb5",
|
||||
"version": "2026.0.0",
|
||||
"port-version": 1
|
||||
},
|
||||
{
|
||||
"git-tree": "6373049880cd0ffb4ec7ac796e9a1c59f2e2ccd0",
|
||||
"version": "2026.0.0",
|
||||
|
|
|
|||
Loading…
Reference in New Issue