diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2019-10-11 17:29:41 +0300 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2019-10-11 17:29:41 +0300 |
commit | 0e2ded463e4b9ea995e0c4a947d461cbf636e39c (patch) | |
tree | 16338aae8a2a9419bb73cc7bc7bbbf212525ee7e | |
parent | Remove gen-qtcreator-config.py (diff) | |
download | smolbote-0e2ded463e4b9ea995e0c4a947d461cbf636e39c.tar.xz |
Add some cpp compiler options and warnings
-rw-r--r-- | meson.build | 14 |
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']) |