summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorOndřej Čertík <ondrej@certik.us>2017-10-25 16:19:32 -0600
committerChristoph Junghans <christoph.junghans@gmail.com>2017-10-25 16:19:32 -0600
commit89b0a09de02e7381f44b65b5f60c6f51bd26ccbf (patch)
tree9da82e2b9ea54735d40023a475d0b5ec884891a9 /var
parentaa750f12de2f8fb5756030bd7031032a73c1e559 (diff)
downloadspack-89b0a09de02e7381f44b65b5f60c6f51bd26ccbf.tar.gz
spack-89b0a09de02e7381f44b65b5f60c6f51bd26ccbf.tar.bz2
spack-89b0a09de02e7381f44b65b5f60c6f51bd26ccbf.tar.xz
spack-89b0a09de02e7381f44b65b5f60c6f51bd26ccbf.zip
Make clang use libc++ by default (#5943)
Since LLVM 3.9 Clang can use the libc++ library by default using the CLANG_DEFAULT_CXX_STDLIB cmake configuration variable, without having to specify the -stdlib=libc++ option on the clang++ command line. This commit makes clang++ use libc++ by default for LLVM 3.9 and later if the libcxx variant is on. Fixes #5942.
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/llvm/package.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/llvm/package.py b/var/spack/repos/builtin/packages/llvm/package.py
index 450b2a0ec0..83e172018b 100644
--- a/var/spack/repos/builtin/packages/llvm/package.py
+++ b/var/spack/repos/builtin/packages/llvm/package.py
@@ -390,7 +390,10 @@ class Llvm(CMakePackage):
'-DLLVM_TOOL_LLDB_BUILD:Bool=OFF'])
if '+internal_unwind' not in spec:
cmake_args.append('-DLLVM_EXTERNAL_LIBUNWIND_BUILD:Bool=OFF')
- if '+libcxx' not in spec:
+ if '+libcxx' in spec:
+ if spec.satisfies('@3.9.0:'):
+ cmake_args.append('-DCLANG_DEFAULT_CXX_STDLIB=libc++')
+ else:
cmake_args.append('-DLLVM_EXTERNAL_LIBCXX_BUILD:Bool=OFF')
cmake_args.append('-DLLVM_EXTERNAL_LIBCXXABI_BUILD:Bool=OFF')
if '+compiler-rt' not in spec: