From 7acdcf5511747420edda6b96c0574975effbde6b Mon Sep 17 00:00:00 2001 From: Qyriad Date: Sat, 16 Mar 2024 19:23:19 -0600 Subject: [PATCH] meson: better match autotools cxxflags Change-Id: I667c8685b13b7bab91e281053f807a11616ae3d4 --- meson.build | 12 +++++++++++- src/libmain/meson.build | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index 5a09c0aee..7b8deeaf4 100644 --- a/meson.build +++ b/meson.build @@ -1,9 +1,10 @@ project('lix', 'cpp', version : run_command('bash', '-c', 'echo -n $(cat ./.version)$VERSION_SUFFIX', check : true).stdout().strip(), default_options : [ - 'buildtype=debugoptimized', 'cpp_std=c++20', 'warning_level=1', + 'debug=true', + 'optimization=3', ], ) @@ -206,6 +207,15 @@ add_project_arguments( '-Wno-unused-parameter', '-Wno-missing-field-initializers', '-Wno-deprecated-copy', + '-pthread', + #'-fPIC', + language : 'cpp', +) + +# FIXME(Qyriad): only if not Darwin, Solaris, or FreeBSD +# (...so only if Linux?) +add_project_link_arguments( + '-Wl,--no-copy-dt-needed-entries', language : 'cpp', ) diff --git a/src/libmain/meson.build b/src/libmain/meson.build index 2046fa424..7c354ea48 100644 --- a/src/libmain/meson.build +++ b/src/libmain/meson.build @@ -7,7 +7,7 @@ libmain_sources = files( ) libmain = library( - 'main', + 'nixmain', libmain_sources, dependencies : [ liblixutil,