From a76bacd594a24921914c24b72db2e6f4e7854e60 Mon Sep 17 00:00:00 2001 From: "Mark W. Krentel" Date: Thu, 20 Jun 2019 16:43:25 -0500 Subject: 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 --- var/spack/repos/builtin/packages/boost/package.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/boost/package.py b/var/spack/repos/builtin/packages/boost/package.py index f62d66db1b..d646967da0 100644 --- a/var/spack/repos/builtin/packages/boost/package.py +++ b/var/spack/repos/builtin/packages/boost/package.py @@ -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 @@ class Boost(Package): 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): -- cgit v1.2.3-70-g09d2