import platform
-target_triple_components = config.target_triple.split('-')
-config.available_features.update(target_triple_components)
# Only run the tests in platforms where XRay instrumentation is supported.
supported_targets = [
'Linux', 'FreeBSD', 'Darwin'
]
-triple_set = set(target_triple_components)
+triple_set = set(config.target_triple.split('-'))
if len(triple_set.intersection(supported_targets)) == 0:
config.unsupported = True
// RUN: not %clang -o /dev/null -v -fxray-instrument -c %s
-// XFAIL: amd64-, x86_64-, x86_64h-, arm, aarch64, arm64, powerpc64le-, mips, mipsel, mips64, mips64el
+// XFAIL: target={{(amd64|x86_64|x86_64h|powerpc64le)-.*}}
+// XFAIL: target={{(arm|aarch64|arm64|mips|mipsel|mips64|mips64el)-.*}}
// REQUIRES: linux
typedef int a;
// RUN: not %clang -o /dev/null -v -fxray-instrument -c %s
-// XFAIL: -linux-, -freebsd, x86_64-apple-darwin, x86_64-apple-macos
-// REQUIRES: amd64 || x86_64 || x86_64h || arm || aarch64 || arm64
+// XFAIL: target={{.*-(linux|freebsd).*}}, target=x86_64-apple-{{(darwin|macos).*}}
+// REQUIRES: target={{(amd64|x86_64|x86_64h|arm|aarch64|arm64)-.*}}
typedef int a;