From 9f209387412a1966a7b0c3d3912796ec29c30ab7 Mon Sep 17 00:00:00 2001 From: "pgal.u-szeged" Date: Fri, 29 Aug 2014 05:05:41 -0700 Subject: [PATCH] Move GLIB_DISABLE_DEPRECATION_WARNINGS define to a more general place. The GLIB_DISABLE_DEPRECATION_WARNINGS define disables the deprecation warnings which is caused by the usage of the g_settings_list_schemas method. Moving the define to the build scripts avoids any future build errors (-Werror) and warning reports. BUG=391250 TEST=ninja -C out/Release chrome Review URL: https://codereview.chromium.org/367113004 Cr-Original-Commit-Position: refs/heads/master@{#292608} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: 3a31d8e495b1d04a01f9e6c57fac608fee0285e3 --- config/linux/BUILD.gn | 9 ++++++++- linux/system.gyp | 16 ++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/config/linux/BUILD.gn b/config/linux/BUILD.gn index ed13b18fa..8342f11e7 100644 --- a/config/linux/BUILD.gn +++ b/config/linux/BUILD.gn @@ -147,7 +147,14 @@ if (use_brlapi) { pkg_config("gio_config") { packages = [ "gio-2.0" ] - defines = [ "USE_GIO" ] + # glib >=2.40 deprecate g_settings_list_schemas in favor of + # g_settings_schema_source_list_schemas. This function is not available on + # earlier versions that we still need to support (specifically, 2.32), so + # disable the warning with the GLIB_DISABLE_DEPRECATION_WARNINGS define. + # TODO(mgiuca): Remove this suppression when we drop support for Ubuntu 13.10 + # (saucy) and earlier. Update the code to use + # g_settings_schema_source_list_schemas instead. + defines = [ "USE_GIO", "GLIB_DISABLE_DEPRECATION_WARNINGS" ] ignore_libs = true # Loader generated below. } diff --git a/linux/system.gyp b/linux/system.gyp index d33bdf420..58ac2fc69 100644 --- a/linux/system.gyp +++ b/linux/system.gyp @@ -567,12 +567,28 @@ 'cflags': [ '=2.40 deprecate g_settings_list_schemas in favor of + # g_settings_schema_source_list_schemas. This function is not + # available on earlier versions that we still need to support + # (specifically, 2.32), so disable the warning. + # TODO(mgiuca): Remove this suppression (and variable) when we + # drop support for Ubuntu 13.10 (saucy) and earlier. Update the + # code to use g_settings_schema_source_list_schemas instead. + 'GLIB_DISABLE_DEPRECATION_WARNINGS', + ], + }, + 'defines': [ + '<(gio_warning_define)', + ], 'direct_dependent_settings': { 'cflags': [ '