[gnome-text-editor: 1/2] build: move add_global_arguments() prior to build targets




commit 0446edd4c465bfafe6d0a2069c211cf3e5a4cccd
Author: Zachary <kleimanpolitics gmail com>
Date:   Mon Jul 18 23:56:04 2022 +0000

    build: move add_global_arguments() prior to build targets

 meson.build | 31 +++++++++++++++----------------
 1 file changed, 15 insertions(+), 16 deletions(-)
---
diff --git a/meson.build b/meson.build
index 4a3d449..ffc75dc 100644
--- a/meson.build
+++ b/meson.build
@@ -14,7 +14,21 @@ if get_option('development')
 else
   app_id = 'org.gnome.TextEditor'
 endif
-
+# Various optimizations for non-debug builds including disabling of
+# cast checks, asserts, and additional link options.
+release_link_args = []
+test_link_args = [
+  '-Wl,-z,defs',   # Detect and reject underlinking
+  '-Wl,-z,now',    # Disable lazy binding
+  '-Wl,-z,relro',  # Read-only segments after relocation
+]
+if not get_option('buildtype').startswith('debug')
+  add_global_arguments([
+    '-DG_DISABLE_ASSERT',
+    '-DG_DISABLE_CAST_CHECKS',
+  ], language: 'c')
+  test_link_args += ['-Wl,-Bsymbolic', '-fno-plt']
+endif
 # Check dependencies
 glib_req_version = '2.73'
 gtk_req_version = '4.7'
@@ -136,21 +150,6 @@ endif
 
 add_project_arguments(global_c_args, language: 'c')
 
-# Various optimizations for non-debug builds including disabling of
-# cast checks, asserts, and additional link options.
-release_link_args = []
-test_link_args = [
-  '-Wl,-z,defs',   # Detect and reject underlinking
-  '-Wl,-z,now',    # Disable lazy binding
-  '-Wl,-z,relro',  # Read-only segments after relocation
-]
-if not get_option('buildtype').startswith('debug')
-  add_global_arguments([
-    '-DG_DISABLE_ASSERT',
-    '-DG_DISABLE_CAST_CHECKS',
-  ], language: 'c')
-  test_link_args += ['-Wl,-Bsymbolic', '-fno-plt']
-endif
 foreach link_arg: test_link_args
   if cc.has_link_argument(link_arg)
     release_link_args += link_arg


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]