File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -15,4 +15,18 @@ if (NOT TARGET flashlight::flashlight-app-asr)
15
15
message (FATAL_ERROR "flashlight must be build with app/asr for wav2letter++" )
16
16
endif ()
17
17
18
+ include (CheckCXXCompilerFlag )
19
+ # All libraries should have their symbols exported so plugins can lazily
20
+ # symbols from any of them
21
+ check_cxx_compiler_flag ("-rdynamic" COMPILER_SUPPORTS_RDYNAMIC )
22
+ if (${COMPILER_SUPPORTS_RDYNAMIC} )
23
+ message (STATUS "-rdynamic supported." )
24
+ set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -rdynamic" )
25
+ set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -rdynamic" )
26
+ else ()
27
+ message (WARNING
28
+ "This compiler doesn't support dynamic symbol exports. "
29
+ "Plugin functionality likely won't work." )
30
+ endif ()
31
+
18
32
add_subdirectory (${PROJECT_SOURCE_DIR} /recipes )
You can’t perform that action at this time.
0 commit comments