diff options
author | David Hows <howsdav@gmail.com> | 2017-10-17 19:40:09 +1100 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2017-10-17 01:40:09 -0700 |
commit | ffc4c31b824856f421a13e4e93e25e55f40921e4 (patch) | |
tree | 5608cdbf2c3a8aaf39b6bee12527d7c53d08627c | |
parent | 5f592fb911ca036e60d625bf34319a3d8e0f3ae1 (diff) | |
download | spack-ffc4c31b824856f421a13e4e93e25e55f40921e4.tar.gz spack-ffc4c31b824856f421a13e4e93e25e55f40921e4.tar.bz2 spack-ffc4c31b824856f421a13e4e93e25e55f40921e4.tar.xz spack-ffc4c31b824856f421a13e4e93e25e55f40921e4.zip |
Add a new +clanglibcpp option for Boost (#5708)
* Add a new +clanglibcpp option for Boost
Currently, the compile of boost with clang will use the stdlibc++. This patch adds an optional flag to use clangs included libc++ instead.
* Linting
Fix long lines and white space errors
-rw-r--r-- | var/spack/repos/builtin/packages/boost/package.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/boost/package.py b/var/spack/repos/builtin/packages/boost/package.py index c46c68a47b..766298c940 100644 --- a/var/spack/repos/builtin/packages/boost/package.py +++ b/var/spack/repos/builtin/packages/boost/package.py @@ -135,6 +135,8 @@ class Boost(Package): description="Augment library names with build options") variant('versionedlayout', default=False, description="Augment library layout with versioned subdirs") + variant('clanglibcpp', default=False, + description='Compile with clang libc++ instead of libstdc++') depends_on('icu4c', when='+icu') depends_on('python', when='+python') @@ -290,6 +292,10 @@ class Boost(Package): # https://svn.boost.org/trac/boost/ticket/12496 if spec.satisfies('%clang'): options.extend(['pch=off']) + if '+clanglibcpp' in spec: + options.extend(['toolset=clang', + 'cxxflags="-stdlib=libc++"', + 'linkflags="-stdlib=libc++"']) return threadingOpts |