summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorArkadiusz Hiler <arkadiusz.hiler@intel.com>2019-05-08 11:09:42 +0300
committerArkadiusz Hiler <arkadiusz.hiler@intel.com>2019-05-10 10:58:54 +0300
commit615c7566c9753722d9b5fe0422e8e188ad91f2ba (patch)
tree753247ab080941ef81abdd95e87ff8cb11dd51bc /meson.build
parentb9b3646d4f04dd0204ead2a1a10f9e1806a0b622 (diff)
meson/cc: Disable memory-allocating builtins
Disable the memory allocating builtins as they may cause unexpected behavior with our framework. They *may* get optimized out in favor of a register or stack variable, making them effectively local. Local variables do not play well with longjmp, which we use for fixtures and subtests. Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build6
1 files changed, 6 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index cbc37f7e..c29b4c98 100644
--- a/meson.build
+++ b/meson.build
@@ -62,6 +62,12 @@ cc_args = [
'-Werror=sequence-point',
'-Werror=trigraphs',
'-Werror=write-strings',
+# Disable the memory allocating builtins as they may cause unexpected behavior
+# with our framework. They *may* get optimized out in favor of a register or
+# stack variable, making them effectively local. Local variables do not play
+# well with longjmp which is heavily used by IGT framework.
+ '-fno-builtin-malloc',
+ '-fno-builtin-calloc',
]
foreach cc_arg : cc_args