mirror of
https://github.com/ROCm/ROCm.git
synced 2026-04-05 03:01:17 -04:00
[Build] Strip the static libraries symbol from the triton shared library (#1240)
This is to solve https://github.com/openai/triton/issues/1236 This commit hides the symbols of the shared libraries for `libtriton.so`, so that when other object link against `libtriton.so`, it won't have confilct.
This commit is contained in:
@@ -238,6 +238,10 @@ if(TRITON_BUILD_PYTHON_MODULE)
|
||||
target_link_options(triton PRIVATE ${LLVM_LDFLAGS})
|
||||
endif()
|
||||
|
||||
if (UNIX AND NOT APPLE)
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--exclude-libs,ALL")
|
||||
endif()
|
||||
|
||||
if(TRITON_BUILD_PYTHON_MODULE AND NOT WIN32)
|
||||
set(CMAKE_SHARED_LIBRARY_SUFFIX ".so")
|
||||
# Check if the platform is MacOS
|
||||
|
||||
Reference in New Issue
Block a user