Work around build failure with newer cbindgen. bz#1773259
authorMike Hommey <mh@glandium.org>
Tue, 28 Jun 2022 22:30:11 +0000 (07:30 +0900)
committerRaspbian forward porter <root@raspbian.org>
Thu, 17 Nov 2022 10:01:08 +0000 (10:01 +0000)
Gbp-Pq: Topic debian-hacks
Gbp-Pq: Name Work-around-build-failure-with-newer-cbindgen.-bz-17.patch

build/moz.configure/bindgen.configure
gfx/webrender_bindings/webrender_ffi.h

index 193e1ad8d1af3116e279d198b4220dcb72003813..660090aa123146605ebf28a8a73fe5a402afc9fc 100644 (file)
@@ -91,6 +91,15 @@ def cbindgen(cbindgen_override, bootstrap_search_path, rust_search_path):
 
 set_config("CBINDGEN", cbindgen)
 
+set_define(
+    "CBINDGEN_0_24",
+    True,
+    when=depends(cbindgen)(
+        lambda c: Version(check_cmd_output(c, "--version").strip().split(" ")[1])
+        >= "0.24.0"
+    ),
+)
+
 # Bindgen can use rustfmt to format Rust file, but it's not required.
 option(env="RUSTFMT", nargs=1, help="Path to the rustfmt program")
 
index b1d67b17a4bde1863b8fe4a2d03c6ad6d6546b1e..ab3cfef99c3b81560272aa2abbc2d1cc5b9ae8da 100644 (file)
@@ -73,7 +73,9 @@ struct WrPipelineInfo;
 struct WrPipelineIdAndEpoch;
 using WrPipelineIdEpochs = nsTArray<WrPipelineIdAndEpoch>;
 
+#ifndef CBINDGEN_0_24
 const uint64_t ROOT_CLIP_CHAIN = ~0;
+#endif
 
 }  // namespace wr
 }  // namespace mozilla