From 41173bc85349259c76604703a73fa9e670e75b5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20S=C5=82omi=C5=84ski?= Date: Fri, 27 Dec 2024 19:54:47 +0100 Subject: [PATCH] tests: Compile tests with -fno-builtin Some compiler optimizations done via builtins can cause the tests to fail (e.g. compiler optimizes out failing call to calloc, and assumes that it succeeds). --- tests/meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/meson.build b/tests/meson.build index a4f2a4a109..7813694341 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -147,10 +147,10 @@ extra_cflags_test_cases = { test_sources = [] test_link_args = [] -test_c_args = ['-D_GNU_SOURCE'] +test_c_args = ['-D_GNU_SOURCE', '-fno-builtin'] use_pie = false -host_test_c_args = [] +host_test_c_args = ['-fno-builtin'] c_compiler = meson.get_compiler('c')