Tests: Add Clang pragma for turning off optimizations

Clang does not accept `GCC optimize("O0")`, so it fails to build the
system with it.
This commit is contained in:
Daniel Bertalan 2021-07-22 08:39:58 +02:00 committed by Andreas Kling
parent 7fb41d6250
commit 5f2f460cc8
Notes: sideshowbarker 2024-07-18 07:16:56 +09:00

View file

@ -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>