Skip to content

Commit

Permalink
Hide non-necessary symbols from shared object (NVIDIA#1136)
Browse files Browse the repository at this point in the history
Signed-off-by: Kirthi Shankar Sivamani <[email protected]>
Signed-off-by: beinggod <[email protected]>
  • Loading branch information
ksivaman authored and BeingGod committed Aug 30, 2024
1 parent 136c7f0 commit e5d7971
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions transformer_engine/common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ if (CMAKE_BUILD_TYPE STREQUAL "Debug")
set(CMAKE_CUDA_FLAGS_DEBUG "${CMAKE_CUDA_FLAGS_DEBUG} -G")
endif()

# Hide non-necessary symbols in shared object.
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/libtransformer_engine.version")
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/libtransformer_engine.version")

# Transformer Engine library
project(transformer_engine LANGUAGES CUDA CXX)

Expand Down
4 changes: 4 additions & 0 deletions transformer_engine/common/libtransformer_engine.version
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
global: *nvte*; *transformer_engine*;
local: *;
};

0 comments on commit e5d7971

Please sign in to comment.