forked from mindspore-Ecosystem/mindspore
!6341 fix securec compile options, remove unused libraries from output package
Merge pull request !6341 from yanghaoran/master
This commit is contained in:
commit
228a41db1d
|
@ -1,8 +1,7 @@
|
|||
message(STATUS "ENABLE_GE set to FALSE, compiling GraphEngine")
|
||||
message(STATUS "compiling GraphEngine")
|
||||
set(GE_SOURCE_DIR ${CMAKE_SOURCE_DIR}/graphengine)
|
||||
|
||||
message(STATUS "ge dir: ${GE_SOURCE_DIR}")
|
||||
# download json headers, rather than whole repository
|
||||
include(${GE_SOURCE_DIR}/cmake/ge_utils.cmake)
|
||||
include(${GE_SOURCE_DIR}/cmake/external_libs/json.cmake)
|
||||
include(${GE_SOURCE_DIR}/cmake/external_libs/eigen.cmake)
|
||||
|
@ -11,7 +10,7 @@ include(${GE_SOURCE_DIR}/cmake/external_libs/protobuf.cmake)
|
|||
include(${GE_SOURCE_DIR}/cmake/external_libs/onnx.cmake)
|
||||
include(${GE_SOURCE_DIR}/cmake/external_libs/securec.cmake)
|
||||
|
||||
# for CPU/GPU mode, find slog from local prebuild
|
||||
# for UT, find slog and error_manager from local prebuild
|
||||
if (NOT ENABLE_D)
|
||||
set(GE_PREBUILD_PATH ${GE_SOURCE_DIR}/third_party/prebuild/${CMAKE_HOST_SYSTEM_PROCESSOR})
|
||||
find_library(slog libslog.so ${GE_PREBUILD_PATH})
|
||||
|
|
|
@ -183,16 +183,13 @@ if (NOT ENABLE_GE)
|
|||
set(ASCEND_PATH /usr/local/Ascend)
|
||||
endif ()
|
||||
set(ASCEND_DRIVER_PATH ${ASCEND_PATH}/driver/lib64/common)
|
||||
set(ASCEND_FWK_PATH ${ASCEND_PATH}/fwkacllib/lib64)
|
||||
|
||||
install(
|
||||
FILES
|
||||
${CMAKE_BINARY_DIR}/graphengine/src/common/graph/libgraph.so
|
||||
${CMAKE_BINARY_DIR}/graphengine/src/ge/common/libge_common.so
|
||||
${CMAKE_BINARY_DIR}/graphengine/src/ge/ge_runtime/libge_runtime.so
|
||||
${ASCEND_DRIVER_PATH}/libslog.so
|
||||
${ASCEND_DRIVER_PATH}/libc_sec.so
|
||||
${ASCEND_FWK_PATH}/liberror_manager.so
|
||||
${CMAKE_SOURCE_DIR}/build/graphengine/libc_sec.so
|
||||
DESTINATION ${INSTALL_LIB_DIR}
|
||||
COMPONENT mindspore
|
||||
)
|
||||
|
@ -200,8 +197,6 @@ if (NOT ENABLE_GE)
|
|||
install(
|
||||
FILES
|
||||
${CMAKE_BINARY_DIR}/graphengine/src/common/graph/libgraph.so
|
||||
${CMAKE_SOURCE_DIR}/graphengine/third_party/prebuild/${CMAKE_HOST_SYSTEM_PROCESSOR}/libslog.so
|
||||
${CMAKE_SOURCE_DIR}/graphengine/third_party/prebuild/${CMAKE_HOST_SYSTEM_PROCESSOR}/liberror_manager.so
|
||||
${CMAKE_SOURCE_DIR}/build/graphengine/libc_sec.so
|
||||
${LIBEVENT_LIB_LIST}
|
||||
DESTINATION ${INSTALL_LIB_DIR}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
SET(CMAKE_BUILD_TYPE "Debug")
|
||||
if (CMAKE_SYSTEM_NAME MATCHES "Windows")
|
||||
SET(CMAKE_C_FLAGS_DEBUG "$ENV{CFLAGS} -fPIC -O0 -Wall -Wno-deprecated-declarations -g2 -ggdb -fno-inline-functions -fno-omit-frame-pointer")
|
||||
SET(CMAKE_C_FLAGS_DEBUG "$ENV{CFLAGS} -fPIC -O0 -Wall -Wno-deprecated-declarations -g2 -ggdb -fno-inline-functions -fno-omit-frame-pointer -fstack-protector-all")
|
||||
else()
|
||||
SET(CMAKE_C_FLAGS_DEBUG "$ENV{CFLAGS} -fPIC -O0 -Wall -Wno-deprecated-declarations -g2 -ggdb -fno-inline-functions -fno-omit-frame-pointer -D_LIBCPP_INLINE_VISIBILITY='' -D'_LIBCPP_EXTERN_TEMPLATE(...)='")
|
||||
SET(CMAKE_C_FLAGS_DEBUG "$ENV{CFLAGS} -fPIC -O0 -Wall -Wno-deprecated-declarations -g2 -ggdb -fno-inline-functions -fno-omit-frame-pointer -fstack-protector-all -D_LIBCPP_INLINE_VISIBILITY='' -D'_LIBCPP_EXTERN_TEMPLATE(...)='")
|
||||
endif()
|
||||
SET(CMAKE_C_FLAGS_RELEASE "$ENV{CFLAGS} -fPIC -O3 -Wall -Wno-deprecated-declarations")
|
||||
SET(CMAKE_C_FLAGS_RELEASE "$ENV{CFLAGS} -fPIC -O3 -Wall -Wno-deprecated-declarations -fstack-protector-all")
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
|
||||
#add flags
|
||||
|
|
Loading…
Reference in New Issue