about summary refs log tree commit diff
path: root/third_party/nix
diff options
context:
space:
mode:
authorp01arst0rm <polar@ever3st.com>2019-10-25T13·42+0100
committerVincent Ambo <tazjin@google.com>2020-05-17T14·55+0100
commite52ce543a4a0ceda4cba7ddb2be48ee653336c12 (patch)
tree8255d4a94a09e48023fa12395c35f7c848bc7cc9 /third_party/nix
parent9974eca8a01e1c9567afea558aaf428d7fe07b5d (diff)
chore(3p/nix): more improvements r/728
(cherry picked from commit 507d28fd226e018d5927b49b1bd07833cbd49d25)
Diffstat (limited to 'third_party/nix')
-rw-r--r--third_party/nix/meson.build7
-rw-r--r--third_party/nix/meson_options.txt12
2 files changed, 9 insertions, 10 deletions
diff --git a/third_party/nix/meson.build b/third_party/nix/meson.build
index fac6c4fd30fb..8458312569bb 100644
--- a/third_party/nix/meson.build
+++ b/third_party/nix/meson.build
@@ -16,7 +16,9 @@ project(
     
     default_options : [
         'cpp_std=c++17',
-        'warning_level=3'
+        'warning_level=3',
+        'optimization=3',
+        'debug=true'
     ],
     version : run_command('cat', './.version').stdout().strip(),
     license : 'MIT'
@@ -26,7 +28,7 @@ project(
 #-------------------------------------------------
 cpp = meson.get_compiler('cpp')
 
-add_project_arguments('-g', '-Wdeprecated', '-Wno-non-virtual-dtor', '-include', 'config.h', language : 'cpp')
+add_project_arguments(get_option('cxxflags'), language : 'cpp')
 add_project_link_arguments(get_option('ldflags'), language: 'cpp')
 
 
@@ -535,6 +537,7 @@ install_headers(
     conf,
     install_dir : join_paths(includedir, 'nix'))
 
+add_project_arguments('-include', 'config.h', language : 'cpp')
 src_inc = [include_directories('.', 'src')]
 
 project_dirs = [
diff --git a/third_party/nix/meson_options.txt b/third_party/nix/meson_options.txt
index b7aa5bd27949..9bad1b2c4c65 100644
--- a/third_party/nix/meson_options.txt
+++ b/third_party/nix/meson_options.txt
@@ -25,19 +25,15 @@ option(
         '-L/lib'],
     description : 'Link flags')
 
-option(
-    'cflags',
-    type : 'array',
-    value : [
-        '-O3'],
-    description : 'C build flags')
 
 option(
     'cxxflags',
     type : 'array',
     value : [
-        '-O3'],
-    description : 'CXX build flags')
+        '-Wdeprecated', 
+        '-Wno-non-virtual-dtor',
+        '-Wno-unused-parameter'],
+    description : 'C build flags')