ref: 6ceb29d2a6cabf5b9ee747f8286c7ea02080fe8c
parent: 9caabc7bda6d22c5bd1c0ea2b8e6c770654eb911
author: Martin Storsjö <martin@martin.st>
date: Wed Feb 13 17:06:17 EST 2019
meson: Add an undocumented option for overriding stack alignment This is intended only for use in CI testing.
--- a/meson.build
+++ b/meson.build
@@ -214,7 +214,9 @@
stackrealign_flag = []
if host_machine.cpu_family().startswith('x86')
- if host_machine.cpu_family() == 'x86_64'
+ if get_option('stack_alignment') > 0
+ stack_alignment = get_option('stack_alignment')
+ elif host_machine.cpu_family() == 'x86_64'
if cc.has_argument('-mpreferred-stack-boundary=5')
stackalign_flag = ['-mpreferred-stack-boundary=5']
stackrealign_flag = ['-mincoming-stack-boundary=4']
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -35,3 +35,7 @@
choices : ['none', 'libfuzzer', 'oss-fuzz'],
value: 'none',
description: 'Select the fuzzing engine')
+
+option('stack_alignment',
+ type: 'integer',
+ value: 0)