| @@ -42,6 +42,35 @@ target_link_libraries(ge_proto_dump PRIVATE | |||||
| target_link_options(ge_proto_dump PRIVATE | target_link_options(ge_proto_dump PRIVATE | ||||
| -Wl,-Bsymbolic | -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 | |||||
| -Wl,-Bsymbolic | |||||
| ) | |||||
| ################################################################## | ################################################################## | ||||
| set(SRC_LIST | set(SRC_LIST | ||||
| @@ -198,7 +227,7 @@ set(SRC_LIST | |||||
| ) | ) | ||||
| ######## libge_executor.a ######## | ######## libge_executor.a ######## | ||||
| add_library(ge_executor STATIC ${SRC_LIST} ${PROTO_STATIC_HDRS} ${DUMP_PROTO_SRCS}) | |||||
| add_library(ge_executor STATIC ${SRC_LIST} ${PROTO_STATIC_HDRS}) | |||||
| target_compile_options(ge_executor PRIVATE | target_compile_options(ge_executor PRIVATE | ||||
| $<$<OR:$<STREQUAL:${TARGET_SYSTEM_NAME},Linux>,$<STREQUAL:${TARGET_SYSTEM_NAME},Android>>:-fvisibility=hidden -O2 -Werror -Wno-deprecated-declarations -fno-common> | $<$<OR:$<STREQUAL:${TARGET_SYSTEM_NAME},Linux>,$<STREQUAL:${TARGET_SYSTEM_NAME},Android>>:-fvisibility=hidden -O2 -Werror -Wno-deprecated-declarations -fno-common> | ||||
| @@ -241,6 +270,7 @@ target_link_libraries(ge_executor PRIVATE | |||||
| $<BUILD_INTERFACE:intf_pub> | $<BUILD_INTERFACE:intf_pub> | ||||
| json | json | ||||
| ascend_protobuf_static | ascend_protobuf_static | ||||
| ge_proto_dump_static | |||||
| c_sec | c_sec | ||||
| $<$<NOT:$<STREQUAL:${TARGET_SYSTEM_NAME},Android>>:-lrt> | $<$<NOT:$<STREQUAL:${TARGET_SYSTEM_NAME},Android>>:-lrt> | ||||
| -ldl | -ldl | ||||