[libcxx-commits] [PATCH] D102045: [libc++] Provide 'buildhost-<platform> feature for the tests.
Louis Dionne via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Sep 3 12:28:44 PDT 2021
ldionne updated this revision to Diff 370646.
ldionne edited the summary of this revision.
ldionne added a comment.
Apply comments.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102045/new/
https://reviews.llvm.org/D102045
Files:
libcxx/utils/libcxx/test/features.py
Index: libcxx/utils/libcxx/test/features.py
===================================================================
--- libcxx/utils/libcxx/test/features.py
+++ libcxx/utils/libcxx/test/features.py
@@ -149,6 +149,14 @@
Feature(name='freebsd', when=lambda cfg: '__FreeBSD__' in compilerMacros(cfg))
]
+# Add features representing the build host platform name.
+# The build host could differ from the target platform for cross-compilation.
+DEFAULT_FEATURES += [
+ Feature(name='buildhost={}'.format(sys.platform.lower().strip())),
+ # sys.platform can be represented by "sub-system" on Windows host, such as 'win32', 'cygwin', 'mingw' & etc.
+ # Here is a consolidated feature for the build host plaform name on Windows.
+ Feature(name='buildhost=windows', when=lambda cfg: platform.system().lower().startswith('windows'))
+]
# Detect whether GDB is on the system, and if so add a substitution to access it.
DEFAULT_FEATURES += [
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102045.370646.patch
Type: text/x-patch
Size: 939 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210903/e2fa6bcc/attachment.bin>
More information about the libcxx-commits
mailing list