summaryrefslogtreecommitdiffstats
path: root/libcxx/utils
diff options
context:
space:
mode:
authorPetr Hosek <phosek@chromium.org>2019-02-09 02:50:09 +0000
committerPetr Hosek <phosek@chromium.org>2019-02-09 02:50:09 +0000
commitb34fed1a2eb2c33217938ec57cceecc33997cb1c (patch)
treeb8ec265aa46da0ff3d1e7d9d07555aca825cdf49 /libcxx/utils
parent191ba3cc03d22a197474fe8f627cf0c958a2baa2 (diff)
downloadbcm5719-llvm-b34fed1a2eb2c33217938ec57cceecc33997cb1c.tar.gz
bcm5719-llvm-b34fed1a2eb2c33217938ec57cceecc33997cb1c.zip
[libcxx] Support runtimes and monorepo locations for tests
The test configuration support currently searches for libc++ sources in <ROOT>/projects/libcxx. This change also additionally searches <ROOT>/runtimes/libcxx (so called runtimes layout) and <ROOT>/libcxx (monorepo layout). This matches the logic we already use in CMake, for example: https://github.com/llvm/llvm-project/blob/6fd4e7f/libcxx/CMakeLists.txt#L148 When the monorepo becomes the only supported layout in the future, we can simplify this logic again. Differential Revision: https://reviews.llvm.org/D57776 llvm-svn: 353600
Diffstat (limited to 'libcxx/utils')
-rw-r--r--libcxx/utils/libcxx/test/config.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/libcxx/utils/libcxx/test/config.py b/libcxx/utils/libcxx/test/config.py
index 5c7f4c3670a..c619086b61d 100644
--- a/libcxx/utils/libcxx/test/config.py
+++ b/libcxx/utils/libcxx/test/config.py
@@ -281,9 +281,15 @@ class Configuration(object):
self.project_obj_root = self.get_lit_conf('project_obj_root')
self.libcxx_obj_root = self.get_lit_conf('libcxx_obj_root')
if not self.libcxx_obj_root and self.project_obj_root is not None:
- possible_root = os.path.join(self.project_obj_root, 'projects', 'libcxx')
- if os.path.isdir(possible_root):
- self.libcxx_obj_root = possible_root
+ possible_roots = [
+ os.path.join(self.project_obj_root, 'libcxx'),
+ os.path.join(self.project_obj_root, 'projects', 'libcxx'),
+ os.path.join(self.project_obj_root, 'runtimes', 'libcxx'),
+ ]
+ for possible_root in possible_roots:
+ if os.path.isdir(possible_root):
+ self.libcxx_obj_root = possible_root
+ break
else:
self.libcxx_obj_root = self.project_obj_root
OpenPOWER on IntegriCloud