aboutsummaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build14
1 files changed, 14 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index 4a06b1d..5798c49 100644
--- a/meson.build
+++ b/meson.build
@@ -10,6 +10,20 @@ if not get_option('debug')
add_project_arguments('-DQT_NO_DEBUG', language: 'cpp')
endif
+cxx = meson.get_compiler('cpp')
+
+# add some specific flags
+add_project_arguments(cxx.get_supported_arguments([
+ '-ffunction-sections', # Place each function into its own section
+ # Leads to better ASLR but larger executables
+ '-fstack-protector-all', # Emit code to check for buffer overflows on all functions
+ '-fstack-clash-protection', # Emit code to check for stack clash attacks
+
+ '-mspeculative-load-hardening', # Spectre v1 mitigation
+
+ '-Wimplicit-fallthrough',
+]), language: 'cpp')
+
mod_qt5 = import('qt5')
dep_qt5 = dependency('qt5', modules: ['Core', 'Network', 'Widgets', 'WebEngineWidgets', 'Concurrent'])