Browse Source

!15726 gpu python so is as needed

From: @zhoufeng54
Reviewed-by: @kisnwang,@wilfchen
Signed-off-by: @wilfchen
pull/15726/MERGE
mindspore-ci-bot Gitee 5 years ago
parent
commit
66d00ac9a2
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      mindspore/ccsrc/cxx_api/CMakeLists.txt

+ 1
- 1
mindspore/ccsrc/cxx_api/CMakeLists.txt View File

@@ -48,7 +48,7 @@ if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
-Wl,-force_load mindspore -Wl,-noall_load proto_input mindspore_gvar mindspore::protobuf)
else()
if(ENABLE_D OR ENABLE_GPU)
target_link_libraries(mindspore_shared_lib PRIVATE ${PYTHON_LIBRARIES} ${SECUREC_LIBRARY}
target_link_libraries(mindspore_shared_lib PRIVATE -Wl,--as-needed ${PYTHON_LIBRARIES} ${SECUREC_LIBRARY}
-Wl,--whole-archive mindspore -Wl,--no-whole-archive proto_input mindspore_gvar mindspore::protobuf)
else()
target_link_libraries(mindspore_shared_lib PRIVATE ${PYTHON_LIBRARIES} ${SECUREC_LIBRARY}


Loading…
Cancel
Save