SWDEV-289871 - Restore missing -Bsymbolic option

-Bsymbolic is required to make sure all AMD OpenCL runtime symbols are
resolved internally, otherwise ld might resolve them using symbols from
the OpenCL ICD. This will cause incorrect functions to be called.

Change-Id: I4ca0326a574ee2e537525bfda96ec20fabfe0158


[ROCm/clr commit: bc5c8df20b]
Este cometimento está contido em:
Vladislav Sytchenko cometeu 2021-06-07 14:22:53 -04:00
1 ascendente ca460b03ee
cometimento bb26e65554
1 ficheiro modificado
+3
+3
Ver ficheiro
@@ -97,6 +97,9 @@ if(BUILD_SHARED_LIBS)
if(WIN32)
target_sources(amdocl PRIVATE amdocl.def)
else()
# -Bsymbolic is required to make sure all AMD OpenCL runtime symbols are resolved internally
# Otherwise ld might resolve them using symbols from the OpenCL ICD
target_link_libraries(amdocl PRIVATE "-Wl,-Bsymbolic")
target_link_libraries(amdocl PRIVATE "-Wl,--version-script=${CMAKE_CURRENT_LIST_DIR}/amdocl.map")
set_target_properties(amdocl PROPERTIES LINK_DEPENDS "${CMAKE_CURRENT_LIST_DIR}/amdocl.map")
endif()