build(python): added fvisibility=hidden for python builds
In order to avoid massive binaries uploaded to pypi we have worked to reduce the number of symbols included in binaries
This commit is contained in:
@@ -20,8 +20,11 @@
|
|||||||
# *********************************************************************** #
|
# *********************************************************************** #
|
||||||
project('GridFire', ['c', 'cpp', 'fortran'], version: 'v0.7.4_rc2', default_options: ['cpp_std=c++23'], meson_version: '>=1.5.0')
|
project('GridFire', ['c', 'cpp', 'fortran'], version: 'v0.7.4_rc2', default_options: ['cpp_std=c++23'], meson_version: '>=1.5.0')
|
||||||
|
|
||||||
# Add default visibility for all C++ targets
|
if get_option('build-python')
|
||||||
|
add_project_arguments('-fvisibility=hidden', language: 'cpp')
|
||||||
|
else
|
||||||
add_project_arguments('-fvisibility=default', language: 'cpp')
|
add_project_arguments('-fvisibility=default', language: 'cpp')
|
||||||
|
endif
|
||||||
|
|
||||||
message('Found CXX compiler: ' + meson.get_compiler('cpp').get_id())
|
message('Found CXX compiler: ' + meson.get_compiler('cpp').get_id())
|
||||||
message('Found FORTRAN compiler: ' + meson.get_compiler('fortran').get_id())
|
message('Found FORTRAN compiler: ' + meson.get_compiler('fortran').get_id())
|
||||||
|
|||||||
@@ -64,10 +64,10 @@ install_subdir('include/gridfire', install_dir: get_option('includedir'))
|
|||||||
|
|
||||||
message('Configuring C API...')
|
message('Configuring C API...')
|
||||||
subdir('extern')
|
subdir('extern')
|
||||||
|
#
|
||||||
if get_option('build-python')
|
#if get_option('build-python')
|
||||||
message('Configuring Python bindings...')
|
# message('Configuring Python bindings...')
|
||||||
subdir('python')
|
# subdir('python')
|
||||||
else
|
#else
|
||||||
message('Skipping Python bindings...')
|
# message('Skipping Python bindings...')
|
||||||
endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user