Skip to content

Commit 2238ea5

Browse files
committed
paddle fluid static lib symbol hidden
1 parent 7f93def commit 2238ea5

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

paddle/fluid/inference/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ endif()
1313

1414
# Create static library
1515
cc_library(paddle_fluid DEPS ${fluid_modules} paddle_fluid_api)
16+
if(NOT APPLE)
17+
# TODO(liuyiqu: Temporarily disable the link flag because it is not support on Mac.
18+
set(LINK_FLAGS "-Wl,--retain-symbols-file ${CMAKE_CURRENT_SOURCE_DIR}/paddle_fluid.sym")
19+
set_target_properties(paddle_fluid PROPERTIES LINK_FLAGS "${LINK_FLAGS}")
20+
endif()
21+
1622
# Create shared library
1723
cc_library(paddle_fluid_shared SHARED
1824
SRCS io.cc
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*paddle*

0 commit comments

Comments
 (0)