Skip to content

Commit 9d09af9

Browse files
cyyeverpytorchmergebot
authored andcommitted
Wrap torch_python with torch_compile_options (#136743)
Fixes #ISSUE_NUMBER Pull Request resolved: #136743 Approved by: https://github.com/ezyang
1 parent d0da40a commit 9d09af9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

torch/CMakeLists.txt

+5
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,11 @@ endif()
309309

310310

311311
add_library(torch_python SHARED ${TORCH_PYTHON_SRCS})
312+
torch_compile_options(torch_python) # see cmake/public/utils.cmake
313+
if(NOT WIN32)
314+
target_compile_options(torch_python PRIVATE
315+
$<$<COMPILE_LANGUAGE:CXX>: -fvisibility=default>)
316+
endif()
312317

313318
if(CAFFE2_USE_MKL AND BUILD_LIBTORCHLESS)
314319

0 commit comments

Comments
 (0)