Skip to content

Commit 0ce4d30

Browse files
bertmaherfacebook-github-bot
authored andcommitted
Hide all symbols in llvm namespace (pytorch#63272)
Summary: Pull Request resolved: pytorch#63272 Test Plan: Imported from OSS Reviewed By: nikithamalgifb Differential Revision: D30331695 Pulled By: bertmaher fbshipit-source-id: d35130c96f7e2a31fa86d9d80de59002e96301df
1 parent 045c4cb commit 0ce4d30

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

Diff for: caffe2/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -815,7 +815,7 @@ if(USE_LLVM AND LLVM_FOUND)
815815
elseif(UNIX)
816816
set(LINKER_SCRIPT "${CMAKE_CURRENT_SOURCE_DIR}/version_script.lds")
817817
set_target_properties(torch_cpu PROPERTIES LINK_DEPENDS ${LINKER_SCRIPT})
818-
set_target_properties(torch_cpu PROPERTIES LINK_FLAGS "-Wl,--version-script=${LINKER_SCRIPT}")
818+
target_link_libraries(torch_cpu PRIVATE "-Wl,--version-script=${LINKER_SCRIPT}")
819819
endif()
820820
endif(USE_LLVM AND LLVM_FOUND)
821821

Diff for: caffe2/unexported_symbols.lds

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
__ZN4llvm*
2-
__ZNK4llvm*
1+
*4llvm*

Diff for: caffe2/version_script.lds

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
pytorch {
2-
global:
3-
*;
42
local:
5-
_ZN4llvm*;
6-
_ZNK4llvm*;
3+
*4llvm*;
74
};

0 commit comments

Comments
 (0)