forked from mindspore-Ecosystem/mindspore
!31563 change debug.a to object
Merge pull request !31563 from zhoufeng/backend-compile-independently
This commit is contained in:
commit
275285bca0
|
@ -259,7 +259,6 @@ endforeach()
|
|||
set_property(SOURCE ${SUB_OBJECTS_SRC} PROPERTY COMPILE_DEFINITIONS SUBMODULE_ID=mindspore::SubModuleId::SM_ME)
|
||||
add_library(mindspore STATIC ${SUB_OBJECTS_SRC})
|
||||
|
||||
add_subdirectory(debug)
|
||||
set(COMMON_SUB_COMP
|
||||
transform/graph_ir
|
||||
utils
|
||||
|
@ -302,6 +301,7 @@ if(NOT WIN32)
|
|||
endif()
|
||||
|
||||
set(BACKEND_SUB_COMP
|
||||
debug
|
||||
profiler
|
||||
ps
|
||||
fl
|
||||
|
@ -353,9 +353,7 @@ if(MODE_ASCEND_ACL)
|
|||
add_library(mindspore_backend_static STATIC ${BACKEND_SUB_OBJECTS_SRC})
|
||||
endif()
|
||||
if(CMAKE_SYSTEM_NAME MATCHES "Windows")
|
||||
target_link_libraries(mindspore_backend PRIVATE mindspore::pybind11_module mindspore_debug)
|
||||
else()
|
||||
target_link_libraries(mindspore_backend PRIVATE mindspore_debug)
|
||||
target_link_libraries(mindspore_backend PRIVATE mindspore::pybind11_module)
|
||||
endif()
|
||||
target_link_libraries(mindspore_backend PRIVATE mindspore_core mindspore_common proto_input mindspore::protobuf)
|
||||
target_link_libraries(mindspore_backend PRIVATE securec)
|
||||
|
|
|
@ -92,7 +92,7 @@ if(BUILD_LITE)
|
|||
add_dependencies(mindspore_shared_lib _mindspore_transform_graph_ir_obj)
|
||||
elseif(MODE_ASCEND_ACL)
|
||||
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()
|
||||
if(NOT BUILD_LITE)
|
||||
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(LENGTH _DEBUG_SRC_LIST debug_files_size)
|
||||
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")
|
||||
target_compile_definitions(mindspore_debug PRIVATE BACKEND_DLL)
|
||||
target_compile_definitions(_mindspore_debug_obj PRIVATE BACKEND_DLL)
|
||||
endif()
|
||||
add_dependencies(mindspore_debug proto_input)
|
||||
add_dependencies(_mindspore_debug_obj proto_input)
|
||||
endif()
|
||||
if(ENABLE_DEBUGGER)
|
||||
if(NOT CMAKE_SYSTEM_NAME MATCHES "Windows")
|
||||
|
|
|
@ -286,6 +286,7 @@ if(USE_GLOG)
|
|||
endif()
|
||||
|
||||
add_library(backend_static STATIC
|
||||
$<TARGET_OBJECTS:_mindspore_debug_obj>
|
||||
$<TARGET_OBJECTS:_mindspore_common_debug_obj>
|
||||
$<TARGET_OBJECTS:_mindspore_profiler_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_recovery_obj>)
|
||||
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