From 5f2f460cc863c7ff2baf50224bb15f138cf1d732 Mon Sep 17 00:00:00 2001 From: Daniel Bertalan Date: Thu, 22 Jul 2021 08:39:58 +0200 Subject: [PATCH] Tests: Add Clang pragma for turning off optimizations Clang does not accept `GCC optimize("O0")`, so it fails to build the system with it. --- Tests/LibM/test-math.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Tests/LibM/test-math.cpp b/Tests/LibM/test-math.cpp index 0c67727985..167dedf65c 100644 --- a/Tests/LibM/test-math.cpp +++ b/Tests/LibM/test-math.cpp @@ -4,7 +4,12 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#pragma GCC optimize("O0") +#ifdef __clang__ +# pragma clang optimize off +#else +# pragma GCC optimize("O0") +#endif + #include #include