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.
This commit is contained in:
parent
aa750f12de
commit
89b0a09de0
@ -390,7 +390,10 @@ def cmake_args(self):
|
||||
'-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:
|
||||
|
Loading…
Reference in New Issue
Block a user