|
| 1 | +From 7d0428070322d13d6bb187cf549e8e21d4bb1d4b Mon Sep 17 00:00:00 2001 |
| 2 | +From: Elliott Sales de Andrade < [email protected]> |
| 3 | +Date: Wed, 9 Sep 2026 00:47:33 -0400 |
| 4 | +Subject: [PATCH] Don't force any diagnostics to be errors |
| 5 | + |
| 6 | +We can't be certain that compilers won't add or change which diagnostics |
| 7 | +work for a flag. So disable Harfbuzz's pragmas that turn diagnostics |
| 8 | +into errors, as this is really something that only upstream should worry |
| 9 | +about. |
| 10 | + |
| 11 | +Also, backport the ignoring of `-Wunused-template`, or it spams a lot of |
| 12 | +the build log. |
| 13 | + |
| 14 | +Signed-off-by: Elliott Sales de Andrade < [email protected]> |
| 15 | +--- |
| 16 | + meson.build | 6 ++++++ |
| 17 | + src/hb.hh | 1 + |
| 18 | + 2 files changed, 7 insertions(+) |
| 19 | + |
| 20 | +diff --git a/meson.build b/meson.build |
| 21 | +index 78d1d41e6..08c078fbb 100644 |
| 22 | +--- a/meson.build |
| 23 | ++++ b/meson.build |
| 24 | +@@ -31,6 +31,12 @@ pkgmod = import('pkgconfig') |
| 25 | + cpp = meson.get_compiler('cpp') |
| 26 | + null_dep = dependency('', required: false) |
| 27 | + |
| 28 | ++# Matplotlib patch: Don't force any diagnostics to be errors. We can't be |
| 29 | ++# certain that compilers won't add or change which diagnostics work for a flag. |
| 30 | ++# So disable Harfbuzz's pragmas that turn diagnostics into errors, as this is |
| 31 | ++# really something that only upstream should worry about. |
| 32 | ++add_project_arguments('-DHB_NO_PRAGMA_GCC_DIAGNOSTIC_ERROR', language: 'cpp') |
| 33 | ++ |
| 34 | + # Includes Microsoft Clang compiler with GNU arguments, see |
| 35 | + # https://github.com/harfbuzz/harfbuzz/pull/4394 |
| 36 | + cpp_is_microsoft_compiler = host_machine.system() == 'windows' and cpp.get_define('_MSC_FULL_VER') != '' |
| 37 | +diff --git a/src/hb.hh b/src/hb.hh |
| 38 | +index 4a21ca90b..3e5c35aa4 100644 |
| 39 | +--- a/src/hb.hh |
| 40 | ++++ b/src/hb.hh |
| 41 | +@@ -151,6 +151,7 @@ |
| 42 | + #pragma GCC diagnostic ignored "-Wrange-loop-analysis" // https://github.com/harfbuzz/harfbuzz/issues/2834 |
| 43 | + #pragma GCC diagnostic ignored "-Wstrict-aliasing" |
| 44 | + #pragma GCC diagnostic ignored "-Wtype-limits" |
| 45 | ++#pragma GCC diagnostic ignored "-Wunused-template" |
| 46 | + #pragma GCC diagnostic ignored "-Wc++11-compat" // only gcc raises it |
| 47 | + #endif |
| 48 | + |
| 49 | +-- |
| 50 | +2.55.0 |
| 51 | + |
0 commit comments