[gjs: 8/12] build: Provide fallback location for GLib Valgrind suppressions




commit 2182ddf8ccb791fee9932a235f0da0b361a9f54e
Author: Philip Chimento <philip chimento gmail com>
Date:   Sat Jul 31 21:22:00 2021 -0700

    build: Provide fallback location for GLib Valgrind suppressions
    
    If building GLib as a subproject, it won't have a pkgconfig file to tell
    where its install prefix is. It's most likely being built as a subproject
    because the host system has an outdated version, not because it has no
    version. Also, the user is most likely not running Valgrind. Given that,
    it's probably OK to just fall back to the suppressions file in /usr.

 meson.build | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/meson.build b/meson.build
index 9214a5fe..da5f4cfa 100644
--- a/meson.build
+++ b/meson.build
@@ -669,8 +669,9 @@ valgrind_environment.set('G_DEBUG',
     'fatal-warnings,fatal-criticals,gc-friendly')
 valgrind_environment.set('VALGRIND', 'valgrind')
 
-glib_suppresssions = (glib.get_pkgconfig_variable('prefix') / 'share' /
-    'glib-2.0' / 'valgrind' / 'glib.supp')
+glib_prefix = glib.get_variable(pkgconfig: 'prefix', default_value: '/usr')
+glib_suppresssions = (glib_prefix / 'share' / 'glib-2.0' / 'valgrind' /
+    'glib.supp')
 gjs_suppressions = (meson.current_source_dir() / 'installed-tests' / 'extra' /
     'gjs.supp')
 valgrind_args = [


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