!10984 Fix 310 ubuntu undefined symbols

From: @zhoufeng54
Reviewed-by: @xu-yfei,@guoqi1024
Signed-off-by: @xu-yfei
This commit is contained in:
mindspore-ci-bot 2021-01-05 23:19:38 +08:00 committed by Gitee
commit e540ac46a3
2 changed files with 7 additions and 7 deletions

View File

@ -322,15 +322,15 @@ else ()
target_link_libraries(mindspore ibverbs rdmacm) target_link_libraries(mindspore ibverbs rdmacm)
endif() endif()
endif() endif()
target_link_libraries(_c_expression PRIVATE -Wl,--whole-archive mindspore proto_input -Wl,--no-whole-archive)
target_link_libraries(_c_expression PRIVATE mindspore::pybind11_module)
target_link_libraries(_c_expression PRIVATE mindspore_gvar)
if (ENABLE_D) if (ENABLE_D)
target_link_libraries(_c_expression PRIVATE -Wl,--no-as-needed ms_profile) target_link_libraries(_c_expression PRIVATE -Wl,--no-as-needed ms_profile)
endif () endif ()
if (ENABLE_ACL) if (ENABLE_ACL)
target_link_libraries(_c_expression PRIVATE graph) target_link_libraries(_c_expression PRIVATE -Wl,--no-as-needed graph)
endif () endif ()
target_link_libraries(_c_expression PRIVATE -Wl,--whole-archive mindspore proto_input -Wl,--no-whole-archive)
target_link_libraries(_c_expression PRIVATE mindspore::pybind11_module)
target_link_libraries(_c_expression PRIVATE mindspore_gvar)
endif () endif ()
if (USE_GLOG) if (USE_GLOG)

View File

@ -85,9 +85,9 @@ if (ENABLE_ACL)
find_library(libaicpu_engine_common libaicpu_engine_common.so ${ATC_DIR}/lib64 ${ATLAS_ATC_DIR}/lib64) find_library(libaicpu_engine_common libaicpu_engine_common.so ${ATC_DIR}/lib64 ${ATLAS_ATC_DIR}/lib64)
find_library(atc_protobuf libascend_protobuf.so.3.8.0.0 ${ATC_DIR}/lib64 ${ATLAS_ATC_DIR}/lib64) find_library(atc_protobuf libascend_protobuf.so.3.8.0.0 ${ATC_DIR}/lib64 ${ATLAS_ATC_DIR}/lib64)
target_link_libraries(mindspore_shared_lib PRIVATE graph ${ge_compiler} ${atc_protobuf} ${acl_retr} ${acl_cblas} target_link_libraries(mindspore_shared_lib PRIVATE -Wl,--no-as-needed graph ${ge_compiler} ${atc_protobuf}
${acl_dvpp} ${acl_runtime} ${libplatform} ${libcompress} ${libopskernel} ${libaicore_utils} ${acl_retr} ${acl_cblas} ${acl_dvpp} ${acl_runtime} ${libplatform} ${libcompress} ${libopskernel}
${libaicpu_engine_common} ${acl}) ${libaicore_utils} ${libaicpu_engine_common} ${acl})
add_dependencies(mindspore_shared_lib graph) add_dependencies(mindspore_shared_lib graph)
endif () endif ()