forked from mindspore-Ecosystem/mindspore
change debug.a to object
Signed-off-by: zhoufeng <zhoufeng54@huawei.com>
This commit is contained in:
parent
5b3a5787be
commit
da11e0f150
|
@ -259,7 +259,6 @@ endforeach()
|
||||||
set_property(SOURCE ${SUB_OBJECTS_SRC} PROPERTY COMPILE_DEFINITIONS SUBMODULE_ID=mindspore::SubModuleId::SM_ME)
|
set_property(SOURCE ${SUB_OBJECTS_SRC} PROPERTY COMPILE_DEFINITIONS SUBMODULE_ID=mindspore::SubModuleId::SM_ME)
|
||||||
add_library(mindspore STATIC ${SUB_OBJECTS_SRC})
|
add_library(mindspore STATIC ${SUB_OBJECTS_SRC})
|
||||||
|
|
||||||
add_subdirectory(debug)
|
|
||||||
set(COMMON_SUB_COMP
|
set(COMMON_SUB_COMP
|
||||||
transform/graph_ir
|
transform/graph_ir
|
||||||
utils
|
utils
|
||||||
|
@ -302,6 +301,7 @@ if(NOT WIN32)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(BACKEND_SUB_COMP
|
set(BACKEND_SUB_COMP
|
||||||
|
debug
|
||||||
profiler
|
profiler
|
||||||
ps
|
ps
|
||||||
fl
|
fl
|
||||||
|
@ -353,9 +353,7 @@ if(MODE_ASCEND_ACL)
|
||||||
add_library(mindspore_backend_static STATIC ${BACKEND_SUB_OBJECTS_SRC})
|
add_library(mindspore_backend_static STATIC ${BACKEND_SUB_OBJECTS_SRC})
|
||||||
endif()
|
endif()
|
||||||
if(CMAKE_SYSTEM_NAME MATCHES "Windows")
|
if(CMAKE_SYSTEM_NAME MATCHES "Windows")
|
||||||
target_link_libraries(mindspore_backend PRIVATE mindspore::pybind11_module mindspore_debug)
|
target_link_libraries(mindspore_backend PRIVATE mindspore::pybind11_module)
|
||||||
else()
|
|
||||||
target_link_libraries(mindspore_backend PRIVATE mindspore_debug)
|
|
||||||
endif()
|
endif()
|
||||||
target_link_libraries(mindspore_backend PRIVATE mindspore_core mindspore_common proto_input mindspore::protobuf)
|
target_link_libraries(mindspore_backend PRIVATE mindspore_core mindspore_common proto_input mindspore::protobuf)
|
||||||
target_link_libraries(mindspore_backend PRIVATE securec)
|
target_link_libraries(mindspore_backend PRIVATE securec)
|
||||||
|
|
|
@ -92,7 +92,7 @@ if(BUILD_LITE)
|
||||||
add_dependencies(mindspore_shared_lib _mindspore_transform_graph_ir_obj)
|
add_dependencies(mindspore_shared_lib _mindspore_transform_graph_ir_obj)
|
||||||
elseif(MODE_ASCEND_ACL)
|
elseif(MODE_ASCEND_ACL)
|
||||||
target_link_libraries(mindspore_shared_lib PRIVATE $<TARGET_OBJECTS:_mindspore_backend_graph_compiler_obj>
|
target_link_libraries(mindspore_shared_lib PRIVATE $<TARGET_OBJECTS:_mindspore_backend_graph_compiler_obj>
|
||||||
mindspore_backend_static mindspore_debug)
|
$<TARGET_OBJECTS:_mindspore_debug_obj> mindspore_backend_static)
|
||||||
endif()
|
endif()
|
||||||
if(NOT BUILD_LITE)
|
if(NOT BUILD_LITE)
|
||||||
set_target_properties(mindspore_shared_lib PROPERTIES OUTPUT_NAME mindspore)
|
set_target_properties(mindspore_shared_lib PROPERTIES OUTPUT_NAME mindspore)
|
||||||
|
|
|
@ -58,11 +58,11 @@ set_property(SOURCE ${_DEBUG_SRC_LIST} ${_RDR_SRC_LIST} PROPERTY COMPILE_DEFINIT
|
||||||
list(APPEND _DEBUG_SRC_LIST ${_RDR_SRC_LIST})
|
list(APPEND _DEBUG_SRC_LIST ${_RDR_SRC_LIST})
|
||||||
list(LENGTH _DEBUG_SRC_LIST debug_files_size)
|
list(LENGTH _DEBUG_SRC_LIST debug_files_size)
|
||||||
if(${debug_files_size} GREATER 0)
|
if(${debug_files_size} GREATER 0)
|
||||||
add_library(mindspore_debug STATIC ${_DEBUG_SRC_LIST})
|
add_library(_mindspore_debug_obj OBJECT ${_DEBUG_SRC_LIST})
|
||||||
if(CMAKE_SYSTEM_NAME MATCHES "Windows")
|
if(CMAKE_SYSTEM_NAME MATCHES "Windows")
|
||||||
target_compile_definitions(mindspore_debug PRIVATE BACKEND_DLL)
|
target_compile_definitions(_mindspore_debug_obj PRIVATE BACKEND_DLL)
|
||||||
endif()
|
endif()
|
||||||
add_dependencies(mindspore_debug proto_input)
|
add_dependencies(_mindspore_debug_obj proto_input)
|
||||||
endif()
|
endif()
|
||||||
if(ENABLE_DEBUGGER)
|
if(ENABLE_DEBUGGER)
|
||||||
if(NOT CMAKE_SYSTEM_NAME MATCHES "Windows")
|
if(NOT CMAKE_SYSTEM_NAME MATCHES "Windows")
|
||||||
|
|
|
@ -286,6 +286,7 @@ if(USE_GLOG)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_library(backend_static STATIC
|
add_library(backend_static STATIC
|
||||||
|
$<TARGET_OBJECTS:_mindspore_debug_obj>
|
||||||
$<TARGET_OBJECTS:_mindspore_common_debug_obj>
|
$<TARGET_OBJECTS:_mindspore_common_debug_obj>
|
||||||
$<TARGET_OBJECTS:_mindspore_profiler_obj>
|
$<TARGET_OBJECTS:_mindspore_profiler_obj>
|
||||||
$<TARGET_OBJECTS:_mindspore_ps_obj>
|
$<TARGET_OBJECTS:_mindspore_ps_obj>
|
||||||
|
@ -304,4 +305,4 @@ add_library(backend_static STATIC
|
||||||
$<TARGET_OBJECTS:_mindspore_runtime_pynative_obj>
|
$<TARGET_OBJECTS:_mindspore_runtime_pynative_obj>
|
||||||
$<TARGET_OBJECTS:_mindspore_runtime_recovery_obj>)
|
$<TARGET_OBJECTS:_mindspore_runtime_recovery_obj>)
|
||||||
target_link_libraries(ut_tests PRIVATE mindspore securec -Wl,--start-group proto_input mindspore::protobuf
|
target_link_libraries(ut_tests PRIVATE mindspore securec -Wl,--start-group proto_input mindspore::protobuf
|
||||||
mindspore_debug backend_static -Wl,--end-group)
|
backend_static -Wl,--end-group)
|
Loading…
Reference in New Issue