Linux: Fix deprecated-volatile error with older glib version
Fix "error: use of result of assignment to object of volatile- qualified type 'volatile gsize' (aka 'volatile unsigned long') is deprecated [-Werror,-Wdeprecated-volatile]" when building with use_sysroot=false on Ubuntu 18.04.
This commit is contained in:
parent
8b45f32b33
commit
1e4e18240d
|
@ -592,5 +592,13 @@ patches = [
|
|||
# Fix deadlock in EmbeddedTestServer::ShutdownAndWaitUntilComplete.
|
||||
# https://chromium-review.googlesource.com/c/chromium/src/+/3798752
|
||||
'name': 'net_test_server_3798752'
|
||||
},
|
||||
{
|
||||
# Linux: Fix "error: use of result of assignment to object of volatile-
|
||||
# qualified type 'volatile gsize' (aka 'volatile unsigned long') is
|
||||
# deprecated [-Werror,-Wdeprecated-volatile]" when building with
|
||||
# use_sysroot=false on Ubuntu 18.04.
|
||||
# https://chromium-review.googlesource.com/c/chromium/src/+/3960017
|
||||
'name': 'linux_glib_deprecated_volatile'
|
||||
}
|
||||
]
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
diff --git ui/accessibility/platform/BUILD.gn ui/accessibility/platform/BUILD.gn
|
||||
index 029fa1010dd78..8209782684ac4 100644
|
||||
--- ui/accessibility/platform/BUILD.gn
|
||||
+++ ui/accessibility/platform/BUILD.gn
|
||||
@@ -257,6 +257,10 @@ source_set("platform") {
|
||||
if (use_glib) {
|
||||
configs += [ "//build/config/linux:glib" ]
|
||||
}
|
||||
+
|
||||
+ if (is_clang) {
|
||||
+ cflags = [ "-Wno-deprecated-volatile" ]
|
||||
+ }
|
||||
}
|
||||
}
|
||||
}
|
||||
diff --git ui/gtk/BUILD.gn ui/gtk/BUILD.gn
|
||||
index 02ad9947176ea..5aa3096658af2 100644
|
||||
--- ui/gtk/BUILD.gn
|
||||
+++ ui/gtk/BUILD.gn
|
||||
@@ -176,4 +176,8 @@ component("gtk") {
|
||||
|
||||
# TODO: This should be removed.
|
||||
deps += [ "//ui/ozone" ]
|
||||
+
|
||||
+ if (is_clang) {
|
||||
+ cflags = [ "-Wno-deprecated-volatile" ]
|
||||
+ }
|
||||
}
|
Loading…
Reference in New Issue