Browse Source

!1543 Proto_dump link ascend_protobuf_static.

From: @zhao_zhixuan
Reviewed-by: @wqtshg,@ji_chen
Signed-off-by: @ji_chen
tags/v1.3.0
mindspore-ci-bot Gitee 3 years ago
parent
commit
a0cf591dfa
1 changed files with 2 additions and 31 deletions
  1. +2
    -31
      ge/executor/CMakeLists.txt

+ 2
- 31
ge/executor/CMakeLists.txt View File

@@ -35,42 +35,13 @@ target_compile_options(ge_proto_dump PRIVATE
)

target_link_libraries(ge_proto_dump PRIVATE
$<BUILD_INTERFACE:intf_pub>
ascend_protobuf
)

target_link_options(ge_proto_dump PRIVATE
-Wl,-Bsymbolic
)

add_library(ge_proto_dump_static STATIC
${DUMP_PROTO_SRCS}
)

target_compile_definitions(ge_proto_dump_static PRIVATE
PROTOBUF_INLINE_NOT_IN_HEADERS=0
google=ascend_private
$<IF:$<STREQUAL:${TARGET_SYSTEM_NAME},Windows>,OS_TYPE=WIN,OS_TYPE=0>
$<$<STREQUAL:${TARGET_SYSTEM_NAME},Windows>:SECUREC_USING_STD_SECURE_LIB=0 NOMINMAX>
)

target_compile_options(ge_proto_dump_static PRIVATE
-O2
-fno-common
-fvisibility=hidden
$<$<AND:$<STREQUAL:${TARGET_SYSTEM_NAME},Windows>,$<STREQUAL:${CMAKE_CONFIGURATION_TYPES},Debug>>:/MTd>
$<$<AND:$<STREQUAL:${TARGET_SYSTEM_NAME},Windows>,$<STREQUAL:${CMAKE_CONFIGURATION_TYPES},Release>>:/MT>
)

target_link_libraries(ge_proto_dump_static PRIVATE
$<BUILD_INTERFACE:intf_pub>
ascend_protobuf_static
)

target_link_options(ge_proto_dump_static PRIVATE
target_link_options(ge_proto_dump PRIVATE
-Wl,-Bsymbolic
)

##################################################################

set(SRC_LIST
@@ -270,7 +241,7 @@ target_link_libraries(ge_executor PRIVATE
$<BUILD_INTERFACE:intf_pub>
json
ascend_protobuf_static
ge_proto_dump_static
ge_proto_dump
c_sec
$<$<NOT:$<STREQUAL:${TARGET_SYSTEM_NAME},Android>>:-lrt>
-ldl


Loading…
Cancel
Save