Hide C++ symbols in libxgboost.so when building Python wheel (#5590)

* Hide C++ symbols in libxgboost.so when building Python wheel

* Update Jenkinsfile

* Add test

* Upgrade rabit

* Add setup.py option.

Co-authored-by: fis <jm.yuan@outlook.com>
This commit is contained in:
Philip Hyunsu Cho
2020-04-24 13:32:05 -07:00
committed by GitHub
parent 660be66207
commit ef26bc45bf
7 changed files with 37 additions and 7 deletions

View File

@@ -39,6 +39,12 @@ if (USE_CUDA)
)
endif (MSVC)
if (HIDE_CXX_SYMBOLS)
target_compile_options(objxgboost PRIVATE
$<$<COMPILE_LANGUAGE:CUDA>:-Xcompiler=-fvisibility=hidden>
)
endif (HIDE_CXX_SYMBOLS)
set_target_properties(objxgboost PROPERTIES
CUDA_SEPARABLE_COMPILATION OFF)
else (USE_CUDA)