summaryrefslogtreecommitdiff
path: root/utils/libcxx/test/config.py
diff options
context:
space:
mode:
authorLouis Dionne <ldionne@apple.com>2019-08-05 18:29:14 +0000
committerLouis Dionne <ldionne@apple.com>2019-08-05 18:29:14 +0000
commit56c0bbff3a77c3e78bc7645f1d61381f61bc3816 (patch)
tree9ca6c6adfb9bcb55a47842678e37fdf4b90dcd07 /utils/libcxx/test/config.py
parent8279a1399ec1db64f107b5f1d3966c3b8df28dd9 (diff)
[libc++] Take 2: Integrate the PSTL into libc++
Summary: This commit allows specifying LIBCXX_ENABLE_PARALLEL_ALGORITHMS when configuring libc++ in CMake. When that option is enabled, libc++ will assume that the PSTL can be found somewhere on the CMake module path, and it will provide the C++17 parallel algorithms based on the PSTL (that is assumed to be available). The commit also adds support for running the PSTL tests as part of the libc++ test suite. The first attempt to commit this failed because it exposed a bug in the tests for modules. Now that this has been fixed, it should be safe to commit this. Reviewers: EricWF Subscribers: mgorny, christof, jkorous, dexonsmith, libcxx-commits, mclow.lists, EricWF Tags: #libc Differential Revision: https://reviews.llvm.org/D60480 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@367903 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/libcxx/test/config.py')
-rw-r--r--utils/libcxx/test/config.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/utils/libcxx/test/config.py b/utils/libcxx/test/config.py
index 82951b765..09ba9cf80 100644
--- a/utils/libcxx/test/config.py
+++ b/utils/libcxx/test/config.py
@@ -581,6 +581,13 @@ class Configuration(object):
support_path = os.path.join(self.libcxx_src_root, 'test/support')
self.cxx.compile_flags += ['-I' + support_path]
+ # Add includes for the PSTL headers
+ pstl_root = self.get_lit_conf('pstl_root')
+ if pstl_root is not None:
+ self.cxx.compile_flags += ['-I' + os.path.join(pstl_root, 'include')]
+ self.cxx.compile_flags += ['-I' + os.path.join(pstl_root, 'test')]
+ self.config.available_features.add('parallel-algorithms')
+
# FIXME(EricWF): variant_size.pass.cpp requires a slightly larger
# template depth with older Clang versions.
self.cxx.addFlagIfSupported('-ftemplate-depth=270')