Skip to content

Commit

Permalink
Revert "Use hidden visibility in OBJECTCXX files (pytorch#127265)"
Browse files Browse the repository at this point in the history
This reverts commit 669560d.

Reverted pytorch#127265 on behalf of https://github.com/huydhn due to Sorry for reverting your change, but I suspect that it causes this failure pytorch/vision#8478 on vision where its C++ extension could not be loaded on macOS ([comment](pytorch#127265 (comment)))
  • Loading branch information
pytorchmergebot authored and TharinduRusira committed Jun 14, 2024
1 parent 647a718 commit f219f59
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions cmake/public/utils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -479,9 +479,7 @@ function(torch_compile_options libname)
# templated classes crossing library boundary get duplicated (but identical)
# definitions. It's easier to just disable it.
target_compile_options(${libname} PRIVATE
$<$<COMPILE_LANGUAGE:CXX>: -fvisibility=hidden>
$<$<COMPILE_LANGUAGE:OBJC>: -fvisibility=hidden>
$<$<COMPILE_LANGUAGE:OBJCXX>: -fvisibility=hidden>)
$<$<COMPILE_LANGUAGE:CXX>: -fvisibility=hidden>)
endif()

# Use -O2 for release builds (-O3 doesn't improve perf, and -Os results in perf regression)
Expand Down

0 comments on commit f219f59

Please sign in to comment.