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')
|
||||
|
||||
# Add default visibility for all C++ targets
|
||||
add_project_arguments('-fvisibility=default', language: 'cpp')
|
||||
if get_option('build-python')
|
||||
add_project_arguments('-fvisibility=hidden', language: 'cpp')
|
||||
else
|
||||
add_project_arguments('-fvisibility=default', language: 'cpp')
|
||||
endif
|
||||
|
||||
message('Found CXX compiler: ' + meson.get_compiler('cpp').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...')
|
||||
subdir('extern')
|
||||
|
||||
if get_option('build-python')
|
||||
message('Configuring Python bindings...')
|
||||
subdir('python')
|
||||
else
|
||||
message('Skipping Python bindings...')
|
||||
endif
|
||||
#
|
||||
#if get_option('build-python')
|
||||
# message('Configuring Python bindings...')
|
||||
# subdir('python')
|
||||
#else
|
||||
# message('Skipping Python bindings...')
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user