summaryrefslogtreecommitdiff
path: root/test/builtins/Unit/divdc3_test.c
diff options
context:
space:
mode:
authorDan Liew <dan@su-root.co.uk>2019-10-17 18:12:49 +0000
committerDan Liew <dan@su-root.co.uk>2019-10-17 18:12:49 +0000
commit650d5e6d1a5b8f36cdeea4d94a7d4dbab3dcad6c (patch)
tree5b611bd76c74c9cfd60c2c3a616923c66b1ce127 /test/builtins/Unit/divdc3_test.c
parent3bd385c6f182169886bec74afd1115df10b95b80 (diff)
downloadcompiler-rt-650d5e6d1a5b8f36cdeea4d94a7d4dbab3dcad6c.tar.gz
[Builtins] Provide a mechanism to selectively disable tests based on whether an implementation is provided by a builtin library.
Summary: If a platform removes some builtin implementations (e.g. via the Darwin-excludes mechanism) then this can lead to test failures because the test expects an implementation to be available. To solve this lit features are added for each configuration based on which sources are included in the builtin library. The features are of the form `librt_has_<name>` where `<name>` is the name of the source file with the file extension removed. This handles C and assembly sources. With the lit features in place it is possible to make certain tests require them. Example: ``` REQUIRES: librt_has_comparedf2 ``` All top-level tests in `test/builtins/Unit` (i.e. not under `arm`, `ppc`, and `riscv`) have been annotated with the appropriate `REQUIRES: librt_has_*` statement. rdar://problem/55520987 Reviewers: beanz, steven_wu, arphaman, dexonsmith, phosek, thakis Subscribers: mgorny, #sanitizers, llvm-commits Tags: #llvm, #sanitizers Differential Revision: https://reviews.llvm.org/D68064 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@375150 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/builtins/Unit/divdc3_test.c')
-rw-r--r--test/builtins/Unit/divdc3_test.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/builtins/Unit/divdc3_test.c b/test/builtins/Unit/divdc3_test.c
index 6a59691c4..1f3cb225f 100644
--- a/test/builtins/Unit/divdc3_test.c
+++ b/test/builtins/Unit/divdc3_test.c
@@ -1,4 +1,5 @@
// RUN: %clang_builtins %s %librt -o %t && %run %t
+// REQUIRES: librt_has_divdc3
//===-- divdc3_test.c - Test __divdc3 -------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.