Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0350707

Browse files
authored
Merge pull request #32324 from QuLogic/hb-no-diagnostic-error
Don't force any diagnostics to be errors in bundled Harfbuzz
2 parents f8791a8 + 292dc1c commit 0350707

2 files changed

Lines changed: 54 additions & 0 deletions

File tree

subprojects/harfbuzz.wrap

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,8 @@ source_hash = ee0eb3a1da2c5a28147f12dff55f6c7d60aeeeb29ac7ef334eabe84c8476c105
66
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/harfbuzz_14.1.0-1/harfbuzz-14.1.0.tar.xz
77
wrapdb_version = 14.1.0-1
88

9+
# Stop making some warnings into errors to avoid errors on latest clang.
10+
diff_files = 0001-Don-t-force-any-diagnostics-to-be-errors.patch
11+
912
[provide]
1013
dependency_names = harfbuzz, harfbuzz-cairo, harfbuzz-gobject, harfbuzz-gpu, harfbuzz-icu, harfbuzz-raster, harfbuzz-subset, harfbuzz-vector
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
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

Comments
 (0)