boost: add variant for symbol visibility (#11801)
Starting with 1.69.0, boost added a bjam option for the default symbol visibility. Up to 1.68.0, the value was always 'global'. 1.69.0 changed the default to 'hidden' but added an option. Most packages will work with hidden and won't notice. But some packages may discover that an interface that they rely on is now hidden and inaccessible. https://boostorg.github.io/build/manual/develop/index.html#bbv2.builtin.features.visibility
This commit is contained in:
parent
686eaff30c
commit
a76bacd594
@ -129,6 +129,12 @@ class Boost(Package):
|
||||
description='Generate position-independent code (PIC), useful '
|
||||
'for building static libraries')
|
||||
|
||||
# https://boostorg.github.io/build/manual/develop/index.html#bbv2.builtin.features.visibility
|
||||
variant('visibility', values=('global', 'protected', 'hidden'),
|
||||
default='hidden', multi=False,
|
||||
description='Default symbol visibility in compiled libraries '
|
||||
'(1.69.0 or later)')
|
||||
|
||||
depends_on('icu4c', when='+icu')
|
||||
depends_on('python', when='+python')
|
||||
depends_on('mpi', when='+mpi')
|
||||
@ -335,6 +341,10 @@ def determine_b2_options(self, spec, options):
|
||||
if cxxflags:
|
||||
options.append('cxxflags="{0}"'.format(' '.join(cxxflags)))
|
||||
|
||||
# Visibility was added in 1.69.0.
|
||||
if spec.satisfies('@1.69.0:'):
|
||||
options.append('visibility=%s' % spec.variants['visibility'].value)
|
||||
|
||||
return threading_opts
|
||||
|
||||
def add_buildopt_symlinks(self, prefix):
|
||||
|
Loading…
Reference in New Issue
Block a user