summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--meson.build8
-rw-r--r--meson_options.txt5
2 files changed, 9 insertions, 4 deletions
diff --git a/meson.build b/meson.build
index a6d21b8..e0311dd 100644
--- a/meson.build
+++ b/meson.build
@@ -15,10 +15,10 @@ cc_flags = [
'--param=ssp-buffer-size=4',
]
if host_machine.system() != 'windows'
- cc_flags += [
- '-Wp,-D_FORTIFY_SOURCE=2',
- '-fstack-protector',
- ]
+ cc_flags += [ '-Wp,-D_FORTIFY_SOURCE=2' ]
+ if not get_option('stack_protector').disabled()
+ cc_flags += [ '-fstack-protector' ]
+ endif
endif
# Check if we are building from .git
diff --git a/meson_options.txt b/meson_options.txt
index 63e8c85..34dd392 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -17,6 +17,11 @@ option('fuzzing-install-dir',
type : 'string',
description : 'Installation directory for fuzzing binaries')
+option('stack_protector',
+ type : 'feature',
+ value : 'enabled',
+ description : 'Build usbredir\'s with stack-protector')
+
option('tools',
type : 'feature',
value : 'enabled',