Skip to content

Commit b34fed1

Browse files
committed
[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
1 parent 191ba3c commit b34fed1

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

libcxx/utils/libcxx/test/config.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -281,9 +281,15 @@ def configure_obj_root(self):
281281
self.project_obj_root = self.get_lit_conf('project_obj_root')
282282
self.libcxx_obj_root = self.get_lit_conf('libcxx_obj_root')
283283
if not self.libcxx_obj_root and self.project_obj_root is not None:
284-
possible_root = os.path.join(self.project_obj_root, 'projects', 'libcxx')
285-
if os.path.isdir(possible_root):
286-
self.libcxx_obj_root = possible_root
284+
possible_roots = [
285+
os.path.join(self.project_obj_root, 'libcxx'),
286+
os.path.join(self.project_obj_root, 'projects', 'libcxx'),
287+
os.path.join(self.project_obj_root, 'runtimes', 'libcxx'),
288+
]
289+
for possible_root in possible_roots:
290+
if os.path.isdir(possible_root):
291+
self.libcxx_obj_root = possible_root
292+
break
287293
else:
288294
self.libcxx_obj_root = self.project_obj_root
289295

0 commit comments

Comments
 (0)