[cairo-commit] 3 commits - meson.build

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Aug 16 20:10:01 UTC 2021


 meson.build |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 2dec76ddfe9499b5a6efc1ccc8e52536a314543b
Merge: e2f83446f 8ee4d5f1d
Author: Adrian Johnson <ajohnson at redneon.com>
Date:   Mon Aug 16 20:09:59 2021 +0000

    Merge branch 'warning-level' into 'master'
    
    meson: Use warning_level
    
    See merge request cairo/cairo!237

commit 8ee4d5f1d346c4933fed993ca3b132b4952c432d
Author: Emmanuele Bassi <ebassi at gnome.org>
Date:   Sun Aug 15 19:12:49 2021 +0100

    meson: Enable _FORTIFY_SOURCE for optimized builds
    
    Otherwise we are going to get warnings from the C library.

diff --git a/meson.build b/meson.build
index 2f618f75c..f10a0067b 100644
--- a/meson.build
+++ b/meson.build
@@ -70,7 +70,9 @@ if cc.get_id() != 'msvc'
     '-fno-common'
   ]
 
-  cflags += '-Wp,-D_FORTIFY_SOURCE=2'
+  if get_option('optimization') in ['1', '2', '3']
+    cflags += '-Wp,-D_FORTIFY_SOURCE=2'
+  endif
 
   supported_cflags = cc.get_supported_arguments(cflags)
   add_project_arguments(supported_cflags, language: 'c')
commit 8b5e285e26ca126a5ae40211bda074fe460a0614
Author: Emmanuele Bassi <ebassi at gnome.org>
Date:   Sun Aug 15 19:06:10 2021 +0100

    meson: Use warning_level
    
    Instead of using `-Wall` and `-Wextra` as compiler flags, set
    `warning_level=2` as the default warning option.

diff --git a/meson.build b/meson.build
index d78a5f2d6..2f618f75c 100644
--- a/meson.build
+++ b/meson.build
@@ -1,6 +1,7 @@
 project('cairo', 'c', 'cpp',
   meson_version: '>= 0.54.0',
   version: run_command(find_program('version.py'), check: true).stdout().strip(),
+  default_options: ['warning_level=2'],
 )
 
 # Keep in sync with configure.ac!
@@ -41,8 +42,6 @@ cc = meson.get_compiler('c')
 cflags = []
 if cc.get_id() != 'msvc'
   cflags += [
-    '-Wall',
-    '-Wextra',
     '-Wmissing-declarations',
     '-Werror-implicit-function-declaration',
     '-Wpointer-arith',


More information about the cairo-commit mailing list