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
Tá an tiomantas seo le fáil i:
Vladislav Sytchenko tiomanta 2021-06-07 14:22:53 -04:00
1 tuismitheoir c6eadce180
tiomantas bc5c8df20b
1 comhad athraithe
+3
+3
Féach ar an gComhad
@@ -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()