未验证 提交 03fe3ce5 编写于 作者: zhenhailiu's avatar zhenhailiu 提交者: GitHub

fix brpc double link (#53512)

* polish

* polish

* polish

* polish

* polish

* polish

* polish

* polish

* polish

* polish

* polish
上级 12406cad
......@@ -92,6 +92,11 @@ message(STATUS "C compiler: ${CMAKE_C_COMPILER}, version: "
"${CMAKE_C_COMPILER_ID} ${CMAKE_C_COMPILER_VERSION}")
message(STATUS "AR tools: ${CMAKE_AR}")
if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND CMAKE_CXX_COMPILER_VERSION
VERSION_GREATER 10.4)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=uninitialized")
endif()
# MUSL build turn off warnings
if(WITH_MUSL)
set(CMAKE_CXX_FLAGS
......
......@@ -151,6 +151,14 @@ if(NOT APPLE AND NOT WIN32)
# TODO(liuyiqun): Temporarily disable the link flag because it is not support on Mac.
set(LINK_FLAGS
"-Wl,--version-script ${CMAKE_CURRENT_SOURCE_DIR}/paddle_inference.map")
# temporarily fix brpc double link issue(52842)
if(WITH_INFERENCE_API_TEST
AND (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 10.4)
set(LINK_FLAGS "${LINK_FLAGS} -Wl,-Bsymbolic")
endif()
set_target_properties(paddle_inference_shared PROPERTIES LINK_FLAGS
"${LINK_FLAGS}")
# check symbol hidden
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册