summaryrefslogtreecommitdiff
path: root/Tests/LibM
diff options
context:
space:
mode:
authorDaniel Bertalan <dani@danielbertalan.dev>2021-07-22 08:39:58 +0200
committerAndreas Kling <kling@serenityos.org>2021-08-08 10:55:36 +0200
commit5f2f460cc863c7ff2baf50224bb15f138cf1d732 (patch)
treeb94f36d25130fb029d8703c5ad4eeaa5e7f3be18 /Tests/LibM
parent7fb41d6250bf6bba7d12e4c3ff82fef27de53109 (diff)
downloadserenity-5f2f460cc863c7ff2baf50224bb15f138cf1d732.zip
Tests: Add Clang pragma for turning off optimizations
Clang does not accept `GCC optimize("O0")`, so it fails to build the system with it.
Diffstat (limited to 'Tests/LibM')
-rw-r--r--Tests/LibM/test-math.cpp7
1 files changed, 6 insertions, 1 deletions
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 <LibTest/TestCase.h>
#include <float.h>