Skip to content

Commit

Permalink
tests: Compile tests with -fno-builtin
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
qookei committed Dec 29, 2024
1 parent 884b3db commit 0a8bcda
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand Down

0 comments on commit 0a8bcda

Please sign in to comment.