user/zotero: patch cleanup
This commit is contained in:
parent
800e0ff1b4
commit
e1c9e01b27
9 changed files with 0 additions and 1518 deletions
|
@ -1,172 +0,0 @@
|
||||||
Submitted By: Douglas R. Reno <renodr at linuxfromscratch dot org>
|
|
||||||
Date: 2022-03-19
|
|
||||||
Initial Package Version: 102.9.0esr
|
|
||||||
Upstream Status: Applied
|
|
||||||
Origin: rust-bindgen upstream (#2338 and #2319), Self
|
|
||||||
Description: Updates the bundled rust-bindgen crate to be compatible
|
|
||||||
with Clang/LLVM 16.
|
|
||||||
|
|
||||||
Without this patch, you will encounter "not a valid
|
|
||||||
Ident" errors when building Firefox, and it will come
|
|
||||||
out of fallback.rs in proc-macro2. This references
|
|
||||||
mfbt/Vector.h (symlinked to
|
|
||||||
firefox-build-dir/dist/include/mozilla/Vector.h) in
|
|
||||||
it's error output, but it is because LLVM changed how
|
|
||||||
it reports anonymous items.
|
|
||||||
|
|
||||||
diff -Naurp firefox-102.9.0.orig/third_party/rust/bindgen/.cargo-checksum.json firefox-102.9.0/third_party/rust/bindgen/.cargo-checksum.json
|
|
||||||
--- firefox-102.9.0.orig/third_party/rust/bindgen/.cargo-checksum.json 2023-03-09 17:59:38.000000000 -0600
|
|
||||||
+++ firefox-102.9.0/third_party/rust/bindgen/.cargo-checksum.json 2023-03-19 21:04:15.981453212 -0500
|
|
||||||
@@ -1 +1 @@
|
|
||||||
-{"files":{"Cargo.lock":"836e8f8431bd4ebdac9b1251676f6afa755757e401455259fe659e7280be8230","Cargo.toml":"3a585a6e27a177f08dedcb21f7d555e9db58fa158203273b228db91ebee4e6b3","LICENSE":"c23953d9deb0a3312dbeaf6c128a657f3591acee45067612fa68405eaa4525db","README.md":"29fe30d7a2729922b13a578bc8f5eedc808fd0f2ef67a3f12017548baf8f293a","build.rs":"3fe1e534c99df4ee207606794f133fb187c0948e055389f74c904994ecaed38a","csmith-fuzzing/README.md":"7107b70fedb0c0a0cadb3c439a49c1bd0119a6d38dc63b1aecc74d1942256ef2","src/callbacks.rs":"1e5a118b94977938751758ac0495b1d41ce5e280c066614a4a7cbd930f326350","src/clang.rs":"aa0644278a8319506be08904c0f6706fbcdcd72eb1e85564b8c7488bd810e126","src/codegen/bitfield_unit.rs":"a8fb1a2d97a99685106fcaac87d2013f79d2690d6a46ff05ad1e3629b6075664","src/codegen/bitfield_unit_tests.rs":"dd252134118450800b516e375c872e17b4c1aee63a7b8adbe5b2cd53434bbc7e","src/codegen/dyngen.rs":"15149bc927e5b2706f93e52a6b26ef55384b3baf40bfc9bc4343e9820479f26b","src/codegen/error.rs":"5e308b8c54b68511fc8ea2ad15ddac510172c4ff460a80a265336440b0c9653d","src/codegen/helpers.rs":"ea83104addb8af31736aaeb850e10c694cd434befe7ffaaa206208f722d72c58","src/codegen/impl_debug.rs":"1ff9ec754b610c98c757b114c6509473ead0e1a9375e9089a7fa40a41a753709","src/codegen/impl_partialeq.rs":"5e526fd88dd15dd1f04addd3c6ecea1d3da92293fadf04346d6c716791f436f9","src/codegen/mod.rs":"19fd11feefab0ff9ecaf8a01583583008269adce805508fb61b9a8acc49da586","src/codegen/struct_layout.rs":"b62c3569dcfb011daa4d09f1aa9eb732da69546c3deb9f247fa8ce7114dbc7b9","src/extra_assertions.rs":"494534bd4f18b80d89b180c8a93733e6617edcf7deac413e9a73fd6e7bc9ced7","src/features.rs":"fafb85510b1dfc9a41ed71f7d765fca49b236deb4ee567e00204e751362aaf23","src/ir/analysis/derive.rs":"ff4821d810961696008a57ae496f95ebcdc14b4c439fe87d78a84817442fa759","src/ir/analysis/has_destructor.rs":"d9a3a24bd4cabc87cddb0c76d27da1691f8f37ffb8eadf5b5975a1c44dea99c2","src/ir/analysis/has_float.rs":"5242cc07ec4d4bdf5a792e1f8ee5758a87838314917d42dbb9dcfc19620520ce","src/ir/analysis/has_type_param_in_array.rs":"ec3fb67f782abb4c866da91bce3f7ee6f8e2310c47a54065282431b909233f7d","src/ir/analysis/has_vtable.rs":"63e2d0f62171811893615c11453bc7b39438d0d83c3eb444dec2346140d86efe","src/ir/analysis/mod.rs":"2c54f0cd6f3d86cf3fcb07d9d0be06cde839cab4170671c80d806a3f27820faf","src/ir/analysis/sizedness.rs":"17f1f2b6affd025f73853b9b5a76b3f157b5f9e563e9eaa374735fcb84c13308","src/ir/analysis/template_params.rs":"da949976a7fd04d6fc564ea6a77dfdbf4f5bf05db64687ed7a0616cba598a42d","src/ir/annotations.rs":"1c931d7bbba1e1613e9cccaab58d14f75e79b831b5c881e41f5b5257a9cbced7","src/ir/comment.rs":"31d64a49ae3d9c3c348fa2539e03306ca3a23fae429cab452e42b31ecf632145","src/ir/comp.rs":"abaa90e27dc6416f1b8db003f87888e7651d5b46c4d4526153980e5621612e54","src/ir/context.rs":"3a76458a5aa74075a60a5cd752ed59ad3943054f55b017700389f78072935215","src/ir/derive.rs":"e5581852eec87918901a129284b4965aefc8a19394187a8095779a084f28fabe","src/ir/dot.rs":"e25ff72ac174a798894c9673d81bdfb86fa9f4228b34a14ce0dc741a186a52bd","src/ir/enum_ty.rs":"e49e3c6ffc0289584e2f836fe56a4b7ebf6ca3f8b602248141d67b9f533770cc","src/ir/function.rs":"aa454ace56bda8074b2865933282aa124624310c8bc0c994d454f5799f4e88be","src/ir/int.rs":"68a86182743ec338d58e42203364dc7c8970cb7ec3550433ca92f0c9489b4442","src/ir/item.rs":"a71bdacc7419ec86d52ac534158cf4bfa4600e9cbc214c0075766700f5b053b0","src/ir/item_kind.rs":"7666a1ff1b8260978b790a08b4139ab56b5c65714a5652bbcec7faa7443adc36","src/ir/layout.rs":"755e3787c262de434a53a8c326f0e825f95415ed6b0f925c1cddf208ca8e3bc4","src/ir/mod.rs":"713cd537434567003197a123cbae679602c715e976d22f7b23dafd0826ea4c70","src/ir/module.rs":"70cf6ddfeabe6cdc13fdc767c783216c073404848d827e85fc6c2de3a19b5c3f","src/ir/objc.rs":"195fb2a3e4371b90244f3a8f295fd80cc77e0f2daf8fd27e3d8e5b78bd6b55d6","src/ir/template.rs":"44bd7214cf1e7f70e60694115082aac5b8a6c1687fff584cd08cdcfadabc5734","src/ir/traversal.rs":"5ac088277f4dfe2918d81b9294aaee41fd83db8e46def66a05f89de078bf4c49","src/ir/ty.rs":"8f2b970da76850685c4d334289af6dede7742862d7a81f2236115afaa1a92fa9","src/ir/var.rs":"86e9f19403fb9231ba60dec0a04e5b56fe28a37c7a5e6f676c978789c9d93c5a","src/lib.rs":"ed2d0aeb48b28b4a96b8e76a10e00b10cb6cc32c0a686d536f9021463b7ee0e8","src/log_stubs.rs":"6dfdd908b7c6453da416cf232893768f9480e551ca4add0858ef88bf71ee6ceb","src/main.rs":"74e582c37b146090332b1496f5b4bca02c7629d03a4ae40302cb4a723f08e445","src/options.rs":"119358b741601dafc13560856f6e4b4f78b6cd2b19067893c2672ba8f5dc6de1","src/parse.rs":"4ffc54415eadb622ee488603862788c78361ef2c889de25259441a340c2a010f","src/regex_set.rs":"6c46357fb1ee68250e5e017cbf691f340041489ae78599eee7a5665a6ddce27f","src/time.rs":"8efe317e7c6b5ba8e0865ce7b49ca775ee8a02590f4241ef62f647fa3c22b68e"},"package":"2da379dbebc0b76ef63ca68d8fc6e71c0f13e59432e0987e508c1820e6ab5239"}
|
|
||||||
\ No newline at end of file
|
|
||||||
+{"files":{"Cargo.lock":"836e8f8431bd4ebdac9b1251676f6afa755757e401455259fe659e7280be8230","Cargo.toml":"3a585a6e27a177f08dedcb21f7d555e9db58fa158203273b228db91ebee4e6b3","LICENSE":"c23953d9deb0a3312dbeaf6c128a657f3591acee45067612fa68405eaa4525db","README.md":"29fe30d7a2729922b13a578bc8f5eedc808fd0f2ef67a3f12017548baf8f293a","build.rs":"3fe1e534c99df4ee207606794f133fb187c0948e055389f74c904994ecaed38a","csmith-fuzzing/README.md":"7107b70fedb0c0a0cadb3c439a49c1bd0119a6d38dc63b1aecc74d1942256ef2","src/callbacks.rs":"1e5a118b94977938751758ac0495b1d41ce5e280c066614a4a7cbd930f326350","src/clang.rs":"30fdc473ff70dcbc394927d6fb674d70a62c1a3847e855becd988dc476997815","src/codegen/bitfield_unit.rs":"a8fb1a2d97a99685106fcaac87d2013f79d2690d6a46ff05ad1e3629b6075664","src/codegen/bitfield_unit_tests.rs":"dd252134118450800b516e375c872e17b4c1aee63a7b8adbe5b2cd53434bbc7e","src/codegen/dyngen.rs":"15149bc927e5b2706f93e52a6b26ef55384b3baf40bfc9bc4343e9820479f26b","src/codegen/error.rs":"5e308b8c54b68511fc8ea2ad15ddac510172c4ff460a80a265336440b0c9653d","src/codegen/helpers.rs":"ea83104addb8af31736aaeb850e10c694cd434befe7ffaaa206208f722d72c58","src/codegen/impl_debug.rs":"1ff9ec754b610c98c757b114c6509473ead0e1a9375e9089a7fa40a41a753709","src/codegen/impl_partialeq.rs":"5e526fd88dd15dd1f04addd3c6ecea1d3da92293fadf04346d6c716791f436f9","src/codegen/mod.rs":"19fd11feefab0ff9ecaf8a01583583008269adce805508fb61b9a8acc49da586","src/codegen/struct_layout.rs":"b62c3569dcfb011daa4d09f1aa9eb732da69546c3deb9f247fa8ce7114dbc7b9","src/extra_assertions.rs":"494534bd4f18b80d89b180c8a93733e6617edcf7deac413e9a73fd6e7bc9ced7","src/features.rs":"fafb85510b1dfc9a41ed71f7d765fca49b236deb4ee567e00204e751362aaf23","src/ir/analysis/derive.rs":"ff4821d810961696008a57ae496f95ebcdc14b4c439fe87d78a84817442fa759","src/ir/analysis/has_destructor.rs":"d9a3a24bd4cabc87cddb0c76d27da1691f8f37ffb8eadf5b5975a1c44dea99c2","src/ir/analysis/has_float.rs":"5242cc07ec4d4bdf5a792e1f8ee5758a87838314917d42dbb9dcfc19620520ce","src/ir/analysis/has_type_param_in_array.rs":"ec3fb67f782abb4c866da91bce3f7ee6f8e2310c47a54065282431b909233f7d","src/ir/analysis/has_vtable.rs":"63e2d0f62171811893615c11453bc7b39438d0d83c3eb444dec2346140d86efe","src/ir/analysis/mod.rs":"2c54f0cd6f3d86cf3fcb07d9d0be06cde839cab4170671c80d806a3f27820faf","src/ir/analysis/sizedness.rs":"17f1f2b6affd025f73853b9b5a76b3f157b5f9e563e9eaa374735fcb84c13308","src/ir/analysis/template_params.rs":"da949976a7fd04d6fc564ea6a77dfdbf4f5bf05db64687ed7a0616cba598a42d","src/ir/annotations.rs":"1c931d7bbba1e1613e9cccaab58d14f75e79b831b5c881e41f5b5257a9cbced7","src/ir/comment.rs":"31d64a49ae3d9c3c348fa2539e03306ca3a23fae429cab452e42b31ecf632145","src/ir/comp.rs":"232300be66abbbc3d7ef948c24f000dd8a50d78e72aa0e4b2cc43ffd4f800226","src/ir/context.rs":"3a76458a5aa74075a60a5cd752ed59ad3943054f55b017700389f78072935215","src/ir/derive.rs":"e5581852eec87918901a129284b4965aefc8a19394187a8095779a084f28fabe","src/ir/dot.rs":"e25ff72ac174a798894c9673d81bdfb86fa9f4228b34a14ce0dc741a186a52bd","src/ir/enum_ty.rs":"e49e3c6ffc0289584e2f836fe56a4b7ebf6ca3f8b602248141d67b9f533770cc","src/ir/function.rs":"aa454ace56bda8074b2865933282aa124624310c8bc0c994d454f5799f4e88be","src/ir/int.rs":"68a86182743ec338d58e42203364dc7c8970cb7ec3550433ca92f0c9489b4442","src/ir/item.rs":"a71bdacc7419ec86d52ac534158cf4bfa4600e9cbc214c0075766700f5b053b0","src/ir/item_kind.rs":"7666a1ff1b8260978b790a08b4139ab56b5c65714a5652bbcec7faa7443adc36","src/ir/layout.rs":"755e3787c262de434a53a8c326f0e825f95415ed6b0f925c1cddf208ca8e3bc4","src/ir/mod.rs":"713cd537434567003197a123cbae679602c715e976d22f7b23dafd0826ea4c70","src/ir/module.rs":"70cf6ddfeabe6cdc13fdc767c783216c073404848d827e85fc6c2de3a19b5c3f","src/ir/objc.rs":"195fb2a3e4371b90244f3a8f295fd80cc77e0f2daf8fd27e3d8e5b78bd6b55d6","src/ir/template.rs":"44bd7214cf1e7f70e60694115082aac5b8a6c1687fff584cd08cdcfadabc5734","src/ir/traversal.rs":"5ac088277f4dfe2918d81b9294aaee41fd83db8e46def66a05f89de078bf4c49","src/ir/ty.rs":"8d7e7883316245c54e5dfa2fd150df1be2dc559c7df0828da736dd6b18d2165b","src/ir/var.rs":"1e7be8eedba72effa995b48c581504e61e407867d8794a8528975688742b0420","src/lib.rs":"ed2d0aeb48b28b4a96b8e76a10e00b10cb6cc32c0a686d536f9021463b7ee0e8","src/log_stubs.rs":"6dfdd908b7c6453da416cf232893768f9480e551ca4add0858ef88bf71ee6ceb","src/main.rs":"74e582c37b146090332b1496f5b4bca02c7629d03a4ae40302cb4a723f08e445","src/options.rs":"119358b741601dafc13560856f6e4b4f78b6cd2b19067893c2672ba8f5dc6de1","src/parse.rs":"4ffc54415eadb622ee488603862788c78361ef2c889de25259441a340c2a010f","src/regex_set.rs":"6c46357fb1ee68250e5e017cbf691f340041489ae78599eee7a5665a6ddce27f","src/time.rs":"8efe317e7c6b5ba8e0865ce7b49ca775ee8a02590f4241ef62f647fa3c22b68e"},"package":"2da379dbebc0b76ef63ca68d8fc6e71c0f13e59432e0987e508c1820e6ab5239"}
|
|
||||||
diff -Naurp firefox-102.9.0.orig/third_party/rust/bindgen/src/clang.rs firefox-102.9.0/third_party/rust/bindgen/src/clang.rs
|
|
||||||
--- firefox-102.9.0.orig/third_party/rust/bindgen/src/clang.rs 2023-03-09 17:59:38.000000000 -0600
|
|
||||||
+++ firefox-102.9.0/third_party/rust/bindgen/src/clang.rs 2023-03-19 20:26:47.405305678 -0500
|
|
||||||
@@ -54,6 +54,11 @@ impl Cursor {
|
|
||||||
unsafe { clang_isDeclaration(self.kind()) != 0 }
|
|
||||||
}
|
|
||||||
|
|
||||||
+ /// Is this cursor's referent an anonymous record or so?
|
|
||||||
+ pub fn is_anonymous(&self) -> bool {
|
|
||||||
+ unsafe { clang_Cursor_isAnonymous(self.x) != 0 }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
/// Get this cursor's referent's spelling.
|
|
||||||
pub fn spelling(&self) -> String {
|
|
||||||
unsafe { cxstring_into_string(clang_getCursorSpelling(self.x)) }
|
|
||||||
diff -Naurp firefox-102.9.0.orig/third_party/rust/bindgen/src/ir/comp.rs firefox-102.9.0/third_party/rust/bindgen/src/ir/comp.rs
|
|
||||||
--- firefox-102.9.0.orig/third_party/rust/bindgen/src/ir/comp.rs 2023-03-09 17:59:38.000000000 -0600
|
|
||||||
+++ firefox-102.9.0/third_party/rust/bindgen/src/ir/comp.rs 2023-03-19 20:27:20.660487032 -0500
|
|
||||||
@@ -1372,8 +1372,7 @@ impl CompInfo {
|
|
||||||
|
|
||||||
// A declaration of an union or a struct without name could
|
|
||||||
// also be an unnamed field, unfortunately.
|
|
||||||
- if cur.spelling().is_empty() &&
|
|
||||||
- cur.kind() != CXCursor_EnumDecl
|
|
||||||
+ if cur.is_anonymous() && cur.kind() != CXCursor_EnumDecl
|
|
||||||
{
|
|
||||||
let ty = cur.cur_type();
|
|
||||||
let offset = cur.offset_of_field().ok();
|
|
||||||
diff -Naurp firefox-102.9.0.orig/third_party/rust/bindgen/src/ir/ty.rs firefox-102.9.0/third_party/rust/bindgen/src/ir/ty.rs
|
|
||||||
--- firefox-102.9.0.orig/third_party/rust/bindgen/src/ir/ty.rs 2023-03-09 17:59:38.000000000 -0600
|
|
||||||
+++ firefox-102.9.0/third_party/rust/bindgen/src/ir/ty.rs 2023-03-19 21:02:47.947103359 -0500
|
|
||||||
@@ -737,7 +737,12 @@ impl Type {
|
|
||||||
|
|
||||||
let layout = ty.fallible_layout(ctx).ok();
|
|
||||||
let cursor = ty.declaration();
|
|
||||||
- let mut name = cursor.spelling();
|
|
||||||
+ let is_anonymous = cursor.is_anonymous();
|
|
||||||
+ let mut name = if is_anonymous {
|
|
||||||
+ None
|
|
||||||
+ } else {
|
|
||||||
+ Some(cursor.spelling()).filter(|n| !n.is_empty())
|
|
||||||
+ };
|
|
||||||
|
|
||||||
debug!(
|
|
||||||
"from_clang_ty: {:?}, ty: {:?}, loc: {:?}",
|
|
||||||
@@ -771,7 +776,7 @@ impl Type {
|
|
||||||
if is_canonical_objcpointer && is_template_type_param {
|
|
||||||
// Objective-C generics are just ids with fancy name.
|
|
||||||
// To keep it simple, just name them ids
|
|
||||||
- name = "id".to_owned();
|
|
||||||
+ name = Some("id".to_owned());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -900,7 +905,7 @@ impl Type {
|
|
||||||
return Err(ParseError::Recurse);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
- name = location.spelling();
|
|
||||||
+ name = Some(location.spelling());
|
|
||||||
}
|
|
||||||
|
|
||||||
let complex = CompInfo::from_ty(
|
|
||||||
@@ -942,7 +947,7 @@ impl Type {
|
|
||||||
CXType_Typedef
|
|
||||||
);
|
|
||||||
|
|
||||||
- name = current.spelling();
|
|
||||||
+ name = Some(location.spelling());
|
|
||||||
|
|
||||||
let inner_ty = cur
|
|
||||||
.typedef_type()
|
|
||||||
@@ -1126,10 +1131,10 @@ impl Type {
|
|
||||||
CXType_Enum => {
|
|
||||||
let enum_ = Enum::from_ty(ty, ctx).expect("Not an enum?");
|
|
||||||
|
|
||||||
- if name.is_empty() {
|
|
||||||
+ if !is_anonymous {
|
|
||||||
let pretty_name = ty.spelling();
|
|
||||||
if clang::is_valid_identifier(&pretty_name) {
|
|
||||||
- name = pretty_name;
|
|
||||||
+ name = Some(pretty_name);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1144,12 +1149,12 @@ impl Type {
|
|
||||||
)
|
|
||||||
.expect("Not a complex type?");
|
|
||||||
|
|
||||||
- if name.is_empty() {
|
|
||||||
+ if !is_anonymous {
|
|
||||||
// The pretty-printed name may contain typedefed name,
|
|
||||||
// but may also be "struct (anonymous at .h:1)"
|
|
||||||
let pretty_name = ty.spelling();
|
|
||||||
if clang::is_valid_identifier(&pretty_name) {
|
|
||||||
- name = pretty_name;
|
|
||||||
+ name = Some(pretty_name);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1161,8 +1166,7 @@ impl Type {
|
|
||||||
location,
|
|
||||||
None,
|
|
||||||
ctx,
|
|
||||||
- )
|
|
||||||
- .expect("Not able to resolve vector element?");
|
|
||||||
+ )?;
|
|
||||||
TypeKind::Vector(inner, ty.num_elements().unwrap())
|
|
||||||
}
|
|
||||||
CXType_ConstantArray => {
|
|
||||||
@@ -1189,7 +1193,9 @@ impl Type {
|
|
||||||
CXType_ObjCClass | CXType_ObjCInterface => {
|
|
||||||
let interface = ObjCInterface::from_ty(&location, ctx)
|
|
||||||
.expect("Not a valid objc interface?");
|
|
||||||
- name = interface.rust_name();
|
|
||||||
+ if !is_anonymous {
|
|
||||||
+ name = Some(interface.rust_name());
|
|
||||||
+ }
|
|
||||||
TypeKind::ObjCInterface(interface)
|
|
||||||
}
|
|
||||||
CXType_Dependent => {
|
|
||||||
@@ -1207,7 +1213,7 @@ impl Type {
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
- let name = if name.is_empty() { None } else { Some(name) };
|
|
||||||
+ name = name.filter(|n| !n.is_empty());
|
|
||||||
|
|
||||||
let is_const = ty.is_const() ||
|
|
||||||
(ty.kind() == CXType_ConstantArray &&
|
|
||||||
diff -Naurp firefox-102.9.0.orig/third_party/rust/bindgen/src/ir/var.rs firefox-102.9.0/third_party/rust/bindgen/src/ir/var.rs
|
|
||||||
--- firefox-102.9.0.orig/third_party/rust/bindgen/src/ir/var.rs 2023-03-09 17:59:38.000000000 -0600
|
|
||||||
+++ firefox-102.9.0/third_party/rust/bindgen/src/ir/var.rs 2023-03-19 21:03:37.413299390 -0500
|
|
||||||
@@ -301,11 +301,11 @@ impl ClangSubItemParser for Var {
|
|
||||||
let ty = match Item::from_ty(&ty, cursor, None, ctx) {
|
|
||||||
Ok(ty) => ty,
|
|
||||||
Err(e) => {
|
|
||||||
- assert_eq!(
|
|
||||||
- ty.kind(),
|
|
||||||
- CXType_Auto,
|
|
||||||
+ assert!(
|
|
||||||
+ matches!(ty.kind(), CXType_Auto | CXType_Unexposed),
|
|
||||||
"Couldn't resolve constant type, and it \
|
|
||||||
- wasn't an nondeductible auto type!"
|
|
||||||
+ wasn't an nondeductible auto type or unexposed \
|
|
||||||
+ type!"
|
|
||||||
);
|
|
||||||
return Err(e);
|
|
||||||
}
|
|
|
@ -1,44 +0,0 @@
|
||||||
diff --git a/app/build.sh.orig b/app/build.sh
|
|
||||||
index 649d629..642ce81 100755
|
|
||||||
--- a/app/build.sh.orig
|
|
||||||
+++ b/app/build.sh
|
|
||||||
@@ -59,10 +59,7 @@ function abspath {
|
|
||||||
}
|
|
||||||
|
|
||||||
function check_lfs_file {
|
|
||||||
- if [ "$(head --bytes 5 "$1")" = "versi" ]; then
|
|
||||||
- echo "$1 not checked out -- install Git LFS and run 'git lfs pull'" >&2
|
|
||||||
- exit 1
|
|
||||||
- fi
|
|
||||||
+ return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
SOURCE_DIR=""
|
|
||||||
@@ -840,18 +837,13 @@ if [ $BUILD_LINUX == 1 ]; then
|
|
||||||
cp -r "$runtime_path/"!(application.ini|browser|defaults|devtools-files|crashreporter|crashreporter.ini|firefox|pingsender|precomplete|removed-files|run-mozilla.sh|update-settings.ini|updater|updater.ini) "$APPDIR"
|
|
||||||
|
|
||||||
# Use our own launcher that calls the original Firefox executable with -app
|
|
||||||
- mv "$APPDIR"/firefox-bin "$APPDIR"/zotero-bin
|
|
||||||
+ mv "$APPDIR"/firefox-esr "$APPDIR"/zotero-bin
|
|
||||||
cp "$CALLDIR/linux/zotero" "$APPDIR"/zotero
|
|
||||||
|
|
||||||
# Copy Ubuntu launcher files
|
|
||||||
cp "$CALLDIR/linux/zotero.desktop" "$APPDIR"
|
|
||||||
cp "$CALLDIR/linux/set_launcher_icon" "$APPDIR"
|
|
||||||
|
|
||||||
- # Use our own updater, because Mozilla's requires updates signed by Mozilla
|
|
||||||
- check_lfs_file "$CALLDIR/linux/updater.tar.xz"
|
|
||||||
- tar xf "$CALLDIR/linux/updater.tar.xz" --to-stdout updater-$arch > "$APPDIR/updater"
|
|
||||||
- chmod 755 "$APPDIR/updater"
|
|
||||||
-
|
|
||||||
# Copy app files
|
|
||||||
rsync -a "$base_dir/" "$APPDIR/"
|
|
||||||
|
|
||||||
@@ -860,6 +852,7 @@ if [ $BUILD_LINUX == 1 ]; then
|
|
||||||
cp -RH "$CALLDIR/modules/zotero-libreoffice-integration/install" "$APPDIR/integration/libreoffice"
|
|
||||||
|
|
||||||
# Copy icons
|
|
||||||
+ mkdir -p "$APPDIR"/icons
|
|
||||||
cp "$CALLDIR/linux/icons/icon128.png" "$APPDIR/icons/"
|
|
||||||
cp "$CALLDIR/linux/icons/symbolic.svg" "$APPDIR/icons/"
|
|
||||||
|
|
|
@ -1,343 +0,0 @@
|
||||||
Submitted By: Xi Ruoyao <xry111 at xry111 dot site>
|
|
||||||
Date: 2023-05-14
|
|
||||||
Initial Package Version: 102.12.0esr
|
|
||||||
Upstream Status: Applied for nightly, but not ESR
|
|
||||||
Origin:
|
|
||||||
- The first patch comes from
|
|
||||||
- https://github.com/rust-lang/rust-bindgen/pull/2319
|
|
||||||
- https://github.com/rust-lang/rust-bindgen/pull/2339
|
|
||||||
And they are integrated into mozilla at
|
|
||||||
- https://hg.mozilla.org/mozilla-central/rev/bd3481bf45fb
|
|
||||||
- The second patch comes from
|
|
||||||
- https://hg.mozilla.org/mozilla-central/rev/61f052c26dd1
|
|
||||||
- https://hg.mozilla.org/mozilla-central/rev/9fffd4b92c43
|
|
||||||
- The third patch comes from
|
|
||||||
- https://hg.mozilla.org/mozilla-central/rev/1a15f95b880f
|
|
||||||
- The fourth patch comes from
|
|
||||||
- https://github.com/mozilla/mp4parse-rust/commit/8d58b2d5fc7f
|
|
||||||
And it's integrated into mozilla at
|
|
||||||
- https://hg.mozilla.org/mozilla-central/rev/a651d4323066
|
|
||||||
A hack is added for Cargo.{toml,lock} to suppress sha256 check
|
|
||||||
|
|
||||||
Description: The first patch updates the bundled rust-bindgen
|
|
||||||
crate to be compatible with Clang/LLVM 16.
|
|
||||||
Without this patch, you will encounter "not a valid
|
|
||||||
Ident" errors when building Firefox, and it will
|
|
||||||
come out of fallback.rs in proc-macro2. This
|
|
||||||
references mfbt/Vector.h (symlinked to
|
|
||||||
firefox-build-dir/dist/include/mozilla/Vector.h) in
|
|
||||||
it's error output, but it is because LLVM changed
|
|
||||||
how it reports anonymous items.
|
|
||||||
|
|
||||||
The second patch adds missing "#include <cstdint>"
|
|
||||||
for three C++ headers and source files. Without
|
|
||||||
this patch, it will fail to build with C++ headers
|
|
||||||
from GCC 13.
|
|
||||||
|
|
||||||
The third and fourth patches work around build
|
|
||||||
failures with Rustc-1.70.0.
|
|
||||||
|
|
||||||
From 8e0b55b6029226d448ffc1c5465bf475ea0852c5 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Xi Ruoyao <xry111@xry111.site>
|
|
||||||
Date: Sun, 14 May 2023 03:37:24 +0800
|
|
||||||
Subject: [PATCH 1/4] cbindgen patch
|
|
||||||
|
|
||||||
---
|
|
||||||
third_party/rust/bindgen/src/clang.rs | 5 ++++
|
|
||||||
third_party/rust/bindgen/src/ir/comp.rs | 3 +-
|
|
||||||
third_party/rust/bindgen/src/ir/ty.rs | 30 +++++++++++--------
|
|
||||||
third_party/rust/bindgen/src/ir/var.rs | 8 ++---
|
|
||||||
5 files changed, 29 insertions(+), 19 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/third_party/rust/bindgen/src/clang.rs b/third_party/rust/bindgen/src/clang.rs
|
|
||||||
index 488660c434..ef74ac08c2 100644
|
|
||||||
--- a/third_party/rust/bindgen/src/clang.rs
|
|
||||||
+++ b/third_party/rust/bindgen/src/clang.rs
|
|
||||||
@@ -54,6 +54,11 @@ impl Cursor {
|
|
||||||
unsafe { clang_isDeclaration(self.kind()) != 0 }
|
|
||||||
}
|
|
||||||
|
|
||||||
+ /// Is this cursor's referent an anonymous record or so?
|
|
||||||
+ pub fn is_anonymous(&self) -> bool {
|
|
||||||
+ unsafe { clang_Cursor_isAnonymous(self.x) != 0 }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
/// Get this cursor's referent's spelling.
|
|
||||||
pub fn spelling(&self) -> String {
|
|
||||||
unsafe { cxstring_into_string(clang_getCursorSpelling(self.x)) }
|
|
||||||
diff --git a/third_party/rust/bindgen/src/ir/comp.rs b/third_party/rust/bindgen/src/ir/comp.rs
|
|
||||||
index 22c124fa36..b715616c5e 100644
|
|
||||||
--- a/third_party/rust/bindgen/src/ir/comp.rs
|
|
||||||
+++ b/third_party/rust/bindgen/src/ir/comp.rs
|
|
||||||
@@ -1372,8 +1372,7 @@ impl CompInfo {
|
|
||||||
|
|
||||||
// A declaration of an union or a struct without name could
|
|
||||||
// also be an unnamed field, unfortunately.
|
|
||||||
- if cur.spelling().is_empty() &&
|
|
||||||
- cur.kind() != CXCursor_EnumDecl
|
|
||||||
+ if cur.is_anonymous() && cur.kind() != CXCursor_EnumDecl
|
|
||||||
{
|
|
||||||
let ty = cur.cur_type();
|
|
||||||
let offset = cur.offset_of_field().ok();
|
|
||||||
diff --git a/third_party/rust/bindgen/src/ir/ty.rs b/third_party/rust/bindgen/src/ir/ty.rs
|
|
||||||
index e6eecc3c50..f3e1193ce2 100644
|
|
||||||
--- a/third_party/rust/bindgen/src/ir/ty.rs
|
|
||||||
+++ b/third_party/rust/bindgen/src/ir/ty.rs
|
|
||||||
@@ -737,7 +737,12 @@ impl Type {
|
|
||||||
|
|
||||||
let layout = ty.fallible_layout(ctx).ok();
|
|
||||||
let cursor = ty.declaration();
|
|
||||||
- let mut name = cursor.spelling();
|
|
||||||
+ let is_anonymous = cursor.is_anonymous();
|
|
||||||
+ let mut name = if is_anonymous {
|
|
||||||
+ None
|
|
||||||
+ } else {
|
|
||||||
+ Some(cursor.spelling()).filter(|n| !n.is_empty())
|
|
||||||
+ };
|
|
||||||
|
|
||||||
debug!(
|
|
||||||
"from_clang_ty: {:?}, ty: {:?}, loc: {:?}",
|
|
||||||
@@ -771,7 +776,7 @@ impl Type {
|
|
||||||
if is_canonical_objcpointer && is_template_type_param {
|
|
||||||
// Objective-C generics are just ids with fancy name.
|
|
||||||
// To keep it simple, just name them ids
|
|
||||||
- name = "id".to_owned();
|
|
||||||
+ name = Some("id".to_owned());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -900,7 +905,7 @@ impl Type {
|
|
||||||
return Err(ParseError::Recurse);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
- name = location.spelling();
|
|
||||||
+ name = Some(location.spelling());
|
|
||||||
}
|
|
||||||
|
|
||||||
let complex = CompInfo::from_ty(
|
|
||||||
@@ -942,7 +947,7 @@ impl Type {
|
|
||||||
CXType_Typedef
|
|
||||||
);
|
|
||||||
|
|
||||||
- name = current.spelling();
|
|
||||||
+ name = Some(location.spelling());
|
|
||||||
|
|
||||||
let inner_ty = cur
|
|
||||||
.typedef_type()
|
|
||||||
@@ -1126,10 +1131,10 @@ impl Type {
|
|
||||||
CXType_Enum => {
|
|
||||||
let enum_ = Enum::from_ty(ty, ctx).expect("Not an enum?");
|
|
||||||
|
|
||||||
- if name.is_empty() {
|
|
||||||
+ if !is_anonymous {
|
|
||||||
let pretty_name = ty.spelling();
|
|
||||||
if clang::is_valid_identifier(&pretty_name) {
|
|
||||||
- name = pretty_name;
|
|
||||||
+ name = Some(pretty_name);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1144,12 +1149,12 @@ impl Type {
|
|
||||||
)
|
|
||||||
.expect("Not a complex type?");
|
|
||||||
|
|
||||||
- if name.is_empty() {
|
|
||||||
+ if !is_anonymous {
|
|
||||||
// The pretty-printed name may contain typedefed name,
|
|
||||||
// but may also be "struct (anonymous at .h:1)"
|
|
||||||
let pretty_name = ty.spelling();
|
|
||||||
if clang::is_valid_identifier(&pretty_name) {
|
|
||||||
- name = pretty_name;
|
|
||||||
+ name = Some(pretty_name);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1161,8 +1166,7 @@ impl Type {
|
|
||||||
location,
|
|
||||||
None,
|
|
||||||
ctx,
|
|
||||||
- )
|
|
||||||
- .expect("Not able to resolve vector element?");
|
|
||||||
+ )?;
|
|
||||||
TypeKind::Vector(inner, ty.num_elements().unwrap())
|
|
||||||
}
|
|
||||||
CXType_ConstantArray => {
|
|
||||||
@@ -1189,7 +1193,9 @@ impl Type {
|
|
||||||
CXType_ObjCClass | CXType_ObjCInterface => {
|
|
||||||
let interface = ObjCInterface::from_ty(&location, ctx)
|
|
||||||
.expect("Not a valid objc interface?");
|
|
||||||
- name = interface.rust_name();
|
|
||||||
+ if !is_anonymous {
|
|
||||||
+ name = Some(interface.rust_name());
|
|
||||||
+ }
|
|
||||||
TypeKind::ObjCInterface(interface)
|
|
||||||
}
|
|
||||||
CXType_Dependent => {
|
|
||||||
@@ -1207,7 +1213,7 @@ impl Type {
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
- let name = if name.is_empty() { None } else { Some(name) };
|
|
||||||
+ name = name.filter(|n| !n.is_empty());
|
|
||||||
|
|
||||||
let is_const = ty.is_const() ||
|
|
||||||
(ty.kind() == CXType_ConstantArray &&
|
|
||||||
diff --git a/third_party/rust/bindgen/src/ir/var.rs b/third_party/rust/bindgen/src/ir/var.rs
|
|
||||||
index c6f121d74e..30fb0b5ee8 100644
|
|
||||||
--- a/third_party/rust/bindgen/src/ir/var.rs
|
|
||||||
+++ b/third_party/rust/bindgen/src/ir/var.rs
|
|
||||||
@@ -301,11 +301,11 @@ impl ClangSubItemParser for Var {
|
|
||||||
let ty = match Item::from_ty(&ty, cursor, None, ctx) {
|
|
||||||
Ok(ty) => ty,
|
|
||||||
Err(e) => {
|
|
||||||
- assert_eq!(
|
|
||||||
- ty.kind(),
|
|
||||||
- CXType_Auto,
|
|
||||||
+ assert!(
|
|
||||||
+ matches!(ty.kind(), CXType_Auto | CXType_Unexposed),
|
|
||||||
"Couldn't resolve constant type, and it \
|
|
||||||
- wasn't an nondeductible auto type!"
|
|
||||||
+ wasn't an nondeductible auto type or unexposed \
|
|
||||||
+ type!"
|
|
||||||
);
|
|
||||||
return Err(e);
|
|
||||||
}
|
|
||||||
--
|
|
||||||
2.40.1
|
|
||||||
|
|
||||||
From 2c22f8cc4756d3e492fe6be4be634fb592b4b0e3 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Xi Ruoyao <xry111@xry111.site>
|
|
||||||
Date: Sun, 14 May 2023 03:37:04 +0800
|
|
||||||
Subject: [PATCH 2/4] add missing <cstdint>
|
|
||||||
|
|
||||||
---
|
|
||||||
dom/media/webrtc/sdp/RsdparsaSdpGlue.cpp | 1 +
|
|
||||||
gfx/2d/Rect.h | 1 +
|
|
||||||
toolkit/components/telemetry/pingsender/pingsender.cpp | 1 +
|
|
||||||
3 files changed, 3 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/dom/media/webrtc/sdp/RsdparsaSdpGlue.cpp b/dom/media/webrtc/sdp/RsdparsaSdpGlue.cpp
|
|
||||||
index 8c8a0369c3..d43b4a1e0d 100644
|
|
||||||
--- a/dom/media/webrtc/sdp/RsdparsaSdpGlue.cpp
|
|
||||||
+++ b/dom/media/webrtc/sdp/RsdparsaSdpGlue.cpp
|
|
||||||
@@ -3,6 +3,7 @@
|
|
||||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
||||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
||||||
+#include <cstdint>
|
|
||||||
#include <string>
|
|
||||||
|
|
||||||
#include "sdp/RsdparsaSdpInc.h"
|
|
||||||
diff --git a/gfx/2d/Rect.h b/gfx/2d/Rect.h
|
|
||||||
index 4875ad6714..f52437bbdc 100644
|
|
||||||
--- a/gfx/2d/Rect.h
|
|
||||||
+++ b/gfx/2d/Rect.h
|
|
||||||
@@ -15,6 +15,7 @@
|
|
||||||
#include "mozilla/Maybe.h"
|
|
||||||
|
|
||||||
#include <cmath>
|
|
||||||
+#include <cstdint>
|
|
||||||
|
|
||||||
namespace mozilla {
|
|
||||||
|
|
||||||
diff --git a/toolkit/components/telemetry/pingsender/pingsender.cpp b/toolkit/components/telemetry/pingsender/pingsender.cpp
|
|
||||||
index 01fdb63c29..ceda3b1945 100644
|
|
||||||
--- a/toolkit/components/telemetry/pingsender/pingsender.cpp
|
|
||||||
+++ b/toolkit/components/telemetry/pingsender/pingsender.cpp
|
|
||||||
@@ -3,6 +3,7 @@
|
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
||||||
|
|
||||||
+#include <cstdint>
|
|
||||||
#include <cstdlib>
|
|
||||||
#include <cstring>
|
|
||||||
#include <ctime>
|
|
||||||
--
|
|
||||||
2.40.1
|
|
||||||
|
|
||||||
# HG changeset patch
|
|
||||||
# User Emilio Cobos Álvarez <emilio@crisal.io>
|
|
||||||
# Date 1682520906 0
|
|
||||||
# Node ID 1a15f95b880f3d4b5a427c750932c53a01b4897a
|
|
||||||
# Parent 17ea6f29654b2ff39d374073cec3e7116c1ec548
|
|
||||||
[PATCH 3/4] Bug 1829964 - Allow ambiguous glob reexports for now in autogenerated bindings. r=glandium
|
|
||||||
|
|
||||||
I started looking into removing these glob re-exports, but I couldn't
|
|
||||||
convince myself that the result was particularly better...
|
|
||||||
|
|
||||||
Differential Revision: https://phabricator.services.mozilla.com/D176473
|
|
||||||
|
|
||||||
diff --git a/layout/style/ServoBindings.toml b/layout/style/ServoBindings.toml
|
|
||||||
--- a/layout/style/ServoBindings.toml
|
|
||||||
+++ b/layout/style/ServoBindings.toml
|
|
||||||
@@ -35,16 +35,17 @@ headers = [
|
|
||||||
"mozilla/SizeOfState.h",
|
|
||||||
"nsCSSProps.h",
|
|
||||||
"nsMappedAttributes.h",
|
|
||||||
"nsNameSpaceManager.h",
|
|
||||||
]
|
|
||||||
raw-lines = [
|
|
||||||
# FIXME(emilio): Incrementally remove these "pub use"s. Probably
|
|
||||||
# mozilla::css and mozilla::dom are easier.
|
|
||||||
+ "#[allow(unknown_lints, ambiguous_glob_reexports)]",
|
|
||||||
"pub use self::root::*;",
|
|
||||||
"pub use self::root::mozilla::*;",
|
|
||||||
"pub use self::root::mozilla::css::*;",
|
|
||||||
"pub use self::root::mozilla::dom::*;",
|
|
||||||
]
|
|
||||||
hide-types = [
|
|
||||||
".*char_traits",
|
|
||||||
".*incompatible_char_type",
|
|
||||||
|
|
||||||
From 8b5b652d38e007e736bb442ccd5aa5ed699db100 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Matthew Gregan <kinetik@flim.org>
|
|
||||||
Date: Thu, 16 Jun 2022 13:54:02 +1200
|
|
||||||
Subject: [PATCH 4/4] Fix `unstable-name-collisions` warning by using fully
|
|
||||||
qualified path.
|
|
||||||
|
|
||||||
---
|
|
||||||
mp4parse/src/lib.rs | 9 +++++++--
|
|
||||||
1 file changed, 7 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/third_party/rust/mp4parse/src/lib.rs b/third_party/rust/mp4parse/src/lib.rs
|
|
||||||
index 567ee21d..4f3d7153 100644
|
|
||||||
--- a/third_party/rust/mp4parse/src/lib.rs
|
|
||||||
+++ b/third_party/rust/mp4parse/src/lib.rs
|
|
||||||
@@ -3506,8 +3506,13 @@ macro_rules! impl_mul {
|
|
||||||
type Output = $output;
|
|
||||||
|
|
||||||
fn mul(self, rhs: $rhs) -> Self::Output {
|
|
||||||
- static_assertions::const_assert!(<$output>::MAX <= <$inner>::MAX as u64);
|
|
||||||
- static_assertions::const_assert!(<$lhs>::MAX * <$rhs>::MAX <= <$output>::MAX);
|
|
||||||
+ static_assertions::const_assert!(
|
|
||||||
+ <$output as UpperBounded>::MAX <= <$inner>::MAX as u64
|
|
||||||
+ );
|
|
||||||
+ static_assertions::const_assert!(
|
|
||||||
+ <$lhs as UpperBounded>::MAX * <$rhs as UpperBounded>::MAX
|
|
||||||
+ <= <$output as UpperBounded>::MAX
|
|
||||||
+ );
|
|
||||||
|
|
||||||
let lhs: $inner = self.get().into();
|
|
||||||
let rhs: $inner = rhs.get().into();
|
|
||||||
|
|
||||||
--- firefox-102.12.0.orig/Cargo.lock 2023-05-30 01:34:26.000000000 +0800
|
|
||||||
+++ firefox-102.12.0/Cargo.lock 2023-06-04 18:52:58.494327811 +0800
|
|
||||||
@@ -3407,7 +3407,6 @@
|
|
||||||
[[package]]
|
|
||||||
name = "mp4parse"
|
|
||||||
version = "0.13.0"
|
|
||||||
-source = "git+https://github.com/mozilla/mp4parse-rust?rev=3bfc47d9a571d0842676043ba60716318e946c06#3bfc47d9a571d0842676043ba60716318e946c06"
|
|
||||||
dependencies = [
|
|
||||||
"bitreader",
|
|
||||||
"byteorder",
|
|
||||||
|
|
||||||
--- firefox-102.12.0.orig/Cargo.toml 2023-05-30 01:34:26.000000000 +0800
|
|
||||||
+++ firefox-102.12.0/Cargo.toml 2023-06-04 18:52:44.365719856 +0800
|
|
||||||
@@ -128,3 +128,7 @@
|
|
||||||
# Patch fallible_collections for issues with rustc 1.65.
|
|
||||||
[patch.crates-io.fallible_collections]
|
|
||||||
path = "third_party/rust/fallible_collections"
|
|
||||||
+
|
|
||||||
+# Patch mp4parse for issues with rustc-1.70.
|
|
||||||
+[patch."https://github.com/mozilla/mp4parse-rust"]
|
|
||||||
+mp4parse = { path = "third_party/rust/mp4parse" }
|
|
|
@ -1,32 +0,0 @@
|
||||||
Patch-Source: https://github.com/mozilla/mp4parse-rust/commit/8d58b2d5fc7f552d585964354d8269bcca3d9251
|
|
||||||
--
|
|
||||||
From 8d58b2d5fc7f552d585964354d8269bcca3d9251 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Matthew Gregan <kinetik@flim.org>
|
|
||||||
Date: Thu, 16 Jun 2022 13:54:02 +1200
|
|
||||||
Subject: [PATCH] Fix `unstable-name-collisions` warning by using fully
|
|
||||||
qualified path.
|
|
||||||
|
|
||||||
---
|
|
||||||
mp4parse/src/lib.rs | 9 +++++++--
|
|
||||||
1 file changed, 7 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/mp4parse/src/lib.rs b/mp4parse/src/lib.rs
|
|
||||||
index 567ee21d..4f3d7153 100644
|
|
||||||
--- a/third_party/rust/mp4parse/src/lib.rs
|
|
||||||
+++ b/third_party/rust/mp4parse/src/lib.rs
|
|
||||||
@@ -3506,8 +3506,13 @@ macro_rules! impl_mul {
|
|
||||||
type Output = $output;
|
|
||||||
|
|
||||||
fn mul(self, rhs: $rhs) -> Self::Output {
|
|
||||||
- static_assertions::const_assert!(<$output>::MAX <= <$inner>::MAX as u64);
|
|
||||||
- static_assertions::const_assert!(<$lhs>::MAX * <$rhs>::MAX <= <$output>::MAX);
|
|
||||||
+ static_assertions::const_assert!(
|
|
||||||
+ <$output as UpperBounded>::MAX <= <$inner>::MAX as u64
|
|
||||||
+ );
|
|
||||||
+ static_assertions::const_assert!(
|
|
||||||
+ <$lhs as UpperBounded>::MAX * <$rhs as UpperBounded>::MAX
|
|
||||||
+ <= <$output as UpperBounded>::MAX
|
|
||||||
+ );
|
|
||||||
|
|
||||||
let lhs: $inner = self.get().into();
|
|
||||||
let rhs: $inner = rhs.get().into();
|
|
|
@ -1,13 +0,0 @@
|
||||||
prevents a call to ccache
|
|
||||||
diff --git a/python/mozbuild/mozbuild/controller/building.py b/python/mozbuild/mozbuild/controller/building.py
|
|
||||||
index bf7009a..011c012 100644
|
|
||||||
--- a/python/mozbuild/mozbuild/controller/building.py
|
|
||||||
+++ b/python/mozbuild/mozbuild/controller/building.py
|
|
||||||
@@ -570,6 +570,7 @@ class BuildMonitor(MozbuildObject):
|
|
||||||
)
|
|
||||||
|
|
||||||
def ccache_stats(self, ccache=None):
|
|
||||||
+ return None
|
|
||||||
ccache_stats = None
|
|
||||||
|
|
||||||
if ccache is None:
|
|
|
@ -1,30 +0,0 @@
|
||||||
Patch-Source: https://github.com/chimera-linux/cports/blob/506127954653ccebf9b82df1452cce4ed0dae3b1/contrib/thunderbird/patches/ppc-musttail.patch
|
|
||||||
--
|
|
||||||
commit 5e66655e1456c9d26637ceaed3f4533b537322c4
|
|
||||||
Author: Daniel Kolesa <daniel@octaforge.org>
|
|
||||||
Date: Sat May 13 23:00:04 2023 +0200
|
|
||||||
|
|
||||||
disable musttail on ppc
|
|
||||||
|
|
||||||
41:38.04 LLVM ERROR: failed to perform tail call elimination on a call site marked musttail
|
|
||||||
41:38.04 PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
|
|
||||||
41:38.04 Stack dump:
|
|
||||||
41:38.04 0. Running pass 'Function Pass Manager' on module '/builddir/thunderbird-114.0_beta1/obj-powerpc64le-unknown-linux-musl/toolkit/library/build/../../../gfx/skia/SkOpts.o'.
|
|
||||||
41:38.04 1. Running pass 'PowerPC DAG->DAG Pattern Instruction Selection' on function '@_ZN8portableL15init_lane_masksEPNS_6ParamsEP21SkRasterPipelineStageffff'
|
|
||||||
41:38.95 clang-16: error: unable to execute command: Aborted
|
|
||||||
|
|
||||||
To be investigated later.
|
|
||||||
|
|
||||||
diff --git a/gfx/skia/skia/src/core/SkRasterPipeline.h b/gfx/skia/skia/src/core/SkRasterPipeline.h
|
|
||||||
index 766bb0c..88c6cb2 100644
|
|
||||||
--- a/gfx/skia/skia/src/core/SkRasterPipeline.h
|
|
||||||
+++ b/gfx/skia/skia/src/core/SkRasterPipeline.h
|
|
||||||
@@ -24,7 +24,7 @@ enum SkColorType : int;
|
|
||||||
struct SkImageInfo;
|
|
||||||
struct skcms_TransferFunction;
|
|
||||||
|
|
||||||
-#if __has_cpp_attribute(clang::musttail) && !defined(__EMSCRIPTEN__) && !defined(SK_CPU_ARM32)
|
|
||||||
+#if __has_cpp_attribute(clang::musttail) && !defined(__EMSCRIPTEN__) && !defined(SK_CPU_ARM32) && !defined(__powerpc__)
|
|
||||||
#define SK_HAS_MUSTTAIL 1
|
|
||||||
#else
|
|
||||||
#define SK_HAS_MUSTTAIL 0
|
|
|
@ -1,23 +0,0 @@
|
||||||
Patch-Source: https://github.com/chimera-linux/cports/blob/506127954653ccebf9b82df1452cce4ed0dae3b1/contrib/thunderbird/patches/ppc64-webrtc.patch
|
|
||||||
--
|
|
||||||
commit 010bfb0441168d51e0fffe98d1f50e0602e7947f
|
|
||||||
Author: Daniel Kolesa <daniel@octaforge.org>
|
|
||||||
Date: Sat May 13 23:40:41 2023 +0200
|
|
||||||
|
|
||||||
fix webrtc on ppc64
|
|
||||||
|
|
||||||
diff --git a/third_party/libwebrtc/moz.build b/third_party/libwebrtc/moz.build
|
|
||||||
index 976cf37..d35d447 100644
|
|
||||||
--- a/third_party/libwebrtc/moz.build
|
|
||||||
+++ b/third_party/libwebrtc/moz.build
|
|
||||||
@@ -643,3 +643,10 @@ if CONFIG["CPU_ARCH"] == "x86_64" and CONFIG["OS_TARGET"] == "WINNT":
|
|
||||||
"/third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/vector_math_avx2_gn",
|
|
||||||
"/third_party/libwebrtc/modules/desktop_capture/desktop_capture_differ_sse2_gn"
|
|
||||||
]
|
|
||||||
+
|
|
||||||
+if CONFIG["CPU_ARCH"] == "ppc64" and CONFIG["OS_TARGET"] == "Linux":
|
|
||||||
+
|
|
||||||
+ DIRS += [
|
|
||||||
+ "/third_party/libwebrtc/modules/desktop_capture/desktop_capture_gn",
|
|
||||||
+ "/third_party/libwebrtc/modules/desktop_capture/primitives_gn"
|
|
||||||
+ ]
|
|
|
@ -1,798 +0,0 @@
|
||||||
--- a/.cargo/config.in
|
|
||||||
+++ b/.cargo/config.in
|
|
||||||
@@ -55,19 +55,19 @@ git = "https://github.com/mozilla-spider
|
|
||||||
rev = "64ba08e24749616de2344112f226d1ef4ba893ae"
|
|
||||||
replace-with = "vendored-sources"
|
|
||||||
|
|
||||||
[source."git+https://github.com/mozilla/application-services?rev=c82bccfa500813f273f4db0ead64fc73bfa2b34c"]
|
|
||||||
git = "https://github.com/mozilla/application-services"
|
|
||||||
rev = "c82bccfa500813f273f4db0ead64fc73bfa2b34c"
|
|
||||||
replace-with = "vendored-sources"
|
|
||||||
|
|
||||||
-[source."git+https://github.com/mozilla/audioipc?rev=ec6af6ecf8ba50b51f13d18f417de8cfb8460543"]
|
|
||||||
+[source."git+https://github.com/mozilla/audioipc?rev=6be424d75f1367e70f2f5ddcacd6d0237e81a6a9"]
|
|
||||||
git = "https://github.com/mozilla/audioipc"
|
|
||||||
-rev = "ec6af6ecf8ba50b51f13d18f417de8cfb8460543"
|
|
||||||
+rev = "6be424d75f1367e70f2f5ddcacd6d0237e81a6a9"
|
|
||||||
replace-with = "vendored-sources"
|
|
||||||
|
|
||||||
[source."git+https://github.com/mozilla/cubeb-coreaudio-rs?rev=93b5c01a131f65c83c11aeb317f4583405c5eb79"]
|
|
||||||
git = "https://github.com/mozilla/cubeb-coreaudio-rs"
|
|
||||||
rev = "93b5c01a131f65c83c11aeb317f4583405c5eb79"
|
|
||||||
replace-with = "vendored-sources"
|
|
||||||
|
|
||||||
[source."git+https://github.com/mozilla/cubeb-pulse-rs?rev=cf48897be5cbe147d051ebbbe1eaf5fd8fb6bbc9"]
|
|
||||||
--- a/Cargo.lock
|
|
||||||
+++ b/Cargo.lock
|
|
||||||
@@ -230,32 +230,32 @@ version = "0.1.3"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "c41dc008c1973ce58ff3cfc52df53814a9b7b78d73d95b071b5ff0ed4b2db3e1"
|
|
||||||
dependencies = [
|
|
||||||
"bitflags 1.999.999",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "audio_thread_priority"
|
|
||||||
-version = "0.26.1"
|
|
||||||
-source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
-checksum = "8b7cd1bfd03dab20ad72e0c5e58d65818d62c0d199d8dec8361053d0f073dbae"
|
|
||||||
-dependencies = [
|
|
||||||
- "cfg-if 0.1.999",
|
|
||||||
+version = "0.30.0"
|
|
||||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
+checksum = "a7e6839a6e8e72338137b3126c7fe61af95b9acc3076d2b7109696f808d1234f"
|
|
||||||
+dependencies = [
|
|
||||||
+ "cfg-if 1.0.0",
|
|
||||||
"dbus",
|
|
||||||
"libc",
|
|
||||||
"log",
|
|
||||||
"mach",
|
|
||||||
- "winapi",
|
|
||||||
+ "windows-sys",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "audioipc2"
|
|
||||||
version = "0.5.0"
|
|
||||||
-source = "git+https://github.com/mozilla/audioipc?rev=ec6af6ecf8ba50b51f13d18f417de8cfb8460543#ec6af6ecf8ba50b51f13d18f417de8cfb8460543"
|
|
||||||
+source = "git+https://github.com/mozilla/audioipc?rev=6be424d75f1367e70f2f5ddcacd6d0237e81a6a9#6be424d75f1367e70f2f5ddcacd6d0237e81a6a9"
|
|
||||||
dependencies = [
|
|
||||||
"arrayvec",
|
|
||||||
"ashmem",
|
|
||||||
"audio_thread_priority",
|
|
||||||
"bincode",
|
|
||||||
"byteorder",
|
|
||||||
"bytes",
|
|
||||||
"cc",
|
|
||||||
@@ -273,28 +273,28 @@ dependencies = [
|
|
||||||
"serde_derive",
|
|
||||||
"slab",
|
|
||||||
"windows-sys",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "audioipc2-client"
|
|
||||||
version = "0.5.0"
|
|
||||||
-source = "git+https://github.com/mozilla/audioipc?rev=ec6af6ecf8ba50b51f13d18f417de8cfb8460543#ec6af6ecf8ba50b51f13d18f417de8cfb8460543"
|
|
||||||
+source = "git+https://github.com/mozilla/audioipc?rev=6be424d75f1367e70f2f5ddcacd6d0237e81a6a9#6be424d75f1367e70f2f5ddcacd6d0237e81a6a9"
|
|
||||||
dependencies = [
|
|
||||||
"audio_thread_priority",
|
|
||||||
"audioipc2",
|
|
||||||
"cubeb-backend",
|
|
||||||
"log",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "audioipc2-server"
|
|
||||||
version = "0.5.0"
|
|
||||||
-source = "git+https://github.com/mozilla/audioipc?rev=ec6af6ecf8ba50b51f13d18f417de8cfb8460543#ec6af6ecf8ba50b51f13d18f417de8cfb8460543"
|
|
||||||
+source = "git+https://github.com/mozilla/audioipc?rev=6be424d75f1367e70f2f5ddcacd6d0237e81a6a9#6be424d75f1367e70f2f5ddcacd6d0237e81a6a9"
|
|
||||||
dependencies = [
|
|
||||||
"audio_thread_priority",
|
|
||||||
"audioipc2",
|
|
||||||
"cubeb-core",
|
|
||||||
"error-chain",
|
|
||||||
"log",
|
|
||||||
"once_cell",
|
|
||||||
"slab",
|
|
||||||
--- a/supply-chain/imports.lock
|
|
||||||
+++ b/supply-chain/imports.lock
|
|
||||||
@@ -38,16 +38,23 @@ user-name = "Amanieu d'Antras"
|
|
||||||
|
|
||||||
[[publisher.audio_thread_priority]]
|
|
||||||
version = "0.26.1"
|
|
||||||
when = "2022-03-22"
|
|
||||||
user-id = 1258
|
|
||||||
user-login = "padenot"
|
|
||||||
user-name = "Paul Adenot"
|
|
||||||
|
|
||||||
+[[publisher.audio_thread_priority]]
|
|
||||||
+version = "0.30.0"
|
|
||||||
+when = "2023-11-06"
|
|
||||||
+user-id = 1258
|
|
||||||
+user-login = "padenot"
|
|
||||||
+user-name = "Paul Adenot"
|
|
||||||
+
|
|
||||||
[[publisher.authenticator]]
|
|
||||||
version = "0.4.0-alpha.20"
|
|
||||||
when = "2023-08-24"
|
|
||||||
user-id = 175410
|
|
||||||
user-login = "jschanck"
|
|
||||||
user-name = "John Schanck"
|
|
||||||
|
|
||||||
[[publisher.authenticator]]
|
|
||||||
--- a/third_party/rust/audio_thread_priority/.cargo-checksum.json
|
|
||||||
+++ b/third_party/rust/audio_thread_priority/.cargo-checksum.json
|
|
||||||
@@ -1,1 +1,1 @@
|
|
||||||
-{"files":{"Cargo.toml":"f2a927f4fdf4171eb2111ad9f770fd113d058d6d7dffa10fce7bd7577edda582","LICENSE":"32ee9dbf6196874fc9d406c54a888a6c4cbb9aa4a7f35b46befeaff43a78fe85","Makefile":"0f9a771cfb30c7c4b9961d82fdca4e9e229a955bb2e636474a4101389e18e938","README.md":"c123692b3b50dd621b896a8269814d609cbf1e532b461bf4a77854ddd607eb7a","atp_test.cpp":"8075a040941a65fb9e3f7cbf0535853ca6661c3ac442ec35569b42b24bbec797","audio_thread_priority.h":"f0ecaf1b674f794cde0dc834028e074d4e4675d22ae96acf08b2ae1dceb3474e","generate_osx_bindings.sh":"06e4e03450f788ced18d31fff5660919e6f6ec1119ddace363ffeb82f0518a71","src/lib.rs":"975de6a74e0adb999a08bc41f08a3bd68fe11c154731bc12c43df546ddb32949","src/mach_sys.rs":"352560fcb9b41d877cff92e5b3b04d6dc68b1f30508ce4b9aed78940120a883e","src/rt_linux.rs":"4ea9f6eb1902aff0126d1b957be7f723d599e9a8bbd75ca8013a2820ef5fe68a","src/rt_mach.rs":"e4587fdf640df37f251e50c6c9313f6a73eae4d54f4b8a84cefc6bc730e94be8","src/rt_win.rs":"c41f6e277051a92f8d38939cf9d78ee6deea736a4686b3bcd185492e47e1650a"},"package":"8b7cd1bfd03dab20ad72e0c5e58d65818d62c0d199d8dec8361053d0f073dbae"}
|
|
||||||
\ No newline at end of file
|
|
||||||
+{"files":{"Cargo.toml":"b66cf5a2203f39d8425d2b2170f64a5c7220ef76efa7ea14ad20ba99d3435e84","LICENSE":"32ee9dbf6196874fc9d406c54a888a6c4cbb9aa4a7f35b46befeaff43a78fe85","Makefile":"0f9a771cfb30c7c4b9961d82fdca4e9e229a955bb2e636474a4101389e18e938","README.md":"c123692b3b50dd621b896a8269814d609cbf1e532b461bf4a77854ddd607eb7a","atp_test.cpp":"8075a040941a65fb9e3f7cbf0535853ca6661c3ac442ec35569b42b24bbec797","audio_thread_priority.h":"f0ecaf1b674f794cde0dc834028e074d4e4675d22ae96acf08b2ae1dceb3474e","generate_osx_bindings.sh":"06e4e03450f788ced18d31fff5660919e6f6ec1119ddace363ffeb82f0518a71","src/lib.rs":"fe417e81a6677c581d9f617ff7989f08780465401b6fa22b6e3abfedf9e3e221","src/mach_sys.rs":"352560fcb9b41d877cff92e5b3b04d6dc68b1f30508ce4b9aed78940120a883e","src/rt_linux.rs":"27004821a29e6af73f9e13f4d1f060e024152c4cc379d6a0df38d6f5b61039ad","src/rt_mach.rs":"29f8c0397f14cecbac1f76394c2abfe0e05903b54486cf735f9a94a10c168643","src/rt_win.rs":"f2ba097cebf65252c27d9d6dcfbe1fcc041c4b312724bd98e080e114a4de3bb6"},"package":"a7e6839a6e8e72338137b3126c7fe61af95b9acc3076d2b7109696f808d1234f"}
|
|
||||||
\ No newline at end of file
|
|
||||||
--- a/third_party/rust/audio_thread_priority/Cargo.toml
|
|
||||||
+++ b/third_party/rust/audio_thread_priority/Cargo.toml
|
|
||||||
@@ -7,53 +7,59 @@
|
|
||||||
#
|
|
||||||
# If you are reading this file be aware that the original Cargo.toml
|
|
||||||
# will likely look very different (and much more reasonable).
|
|
||||||
# See Cargo.toml.orig for the original contents.
|
|
||||||
|
|
||||||
[package]
|
|
||||||
edition = "2018"
|
|
||||||
name = "audio_thread_priority"
|
|
||||||
-version = "0.26.1"
|
|
||||||
+version = "0.30.0"
|
|
||||||
authors = ["Paul Adenot <paul@paul.cx>"]
|
|
||||||
description = "Bump a thread to real-time priority, for audio work, on Linux, Windows and macOS"
|
|
||||||
+readme = "README.md"
|
|
||||||
license = "MPL-2.0"
|
|
||||||
repository = "https://github.com/padenot/audio_thread_priority"
|
|
||||||
|
|
||||||
[lib]
|
|
||||||
name = "audio_thread_priority"
|
|
||||||
-crate-type = ["staticlib", "rlib"]
|
|
||||||
+crate-type = [
|
|
||||||
+ "staticlib",
|
|
||||||
+ "rlib",
|
|
||||||
+]
|
|
||||||
+
|
|
||||||
[dependencies.cfg-if]
|
|
||||||
-version = "0.1"
|
|
||||||
+version = "1.0"
|
|
||||||
|
|
||||||
[dependencies.log]
|
|
||||||
version = "0.4"
|
|
||||||
|
|
||||||
[dependencies.simple_logger]
|
|
||||||
version = "0.4"
|
|
||||||
optional = true
|
|
||||||
+
|
|
||||||
[dev-dependencies.nix]
|
|
||||||
-version = "0.15.0"
|
|
||||||
+version = "0.26"
|
|
||||||
|
|
||||||
[features]
|
|
||||||
-default = ["with_dbus", "winapi"]
|
|
||||||
+default = ["with_dbus"]
|
|
||||||
terminal-logging = ["simple_logger"]
|
|
||||||
with_dbus = ["dbus"]
|
|
||||||
+
|
|
||||||
[target."cfg(target_os = \"linux\")".dependencies.dbus]
|
|
||||||
version = "0.6.4"
|
|
||||||
optional = true
|
|
||||||
|
|
||||||
[target."cfg(target_os = \"linux\")".dependencies.libc]
|
|
||||||
version = "0.2"
|
|
||||||
+
|
|
||||||
[target."cfg(target_os = \"macos\")".dependencies.libc]
|
|
||||||
version = "0.2"
|
|
||||||
|
|
||||||
[target."cfg(target_os = \"macos\")".dependencies.mach]
|
|
||||||
version = "0.3"
|
|
||||||
-[target."cfg(target_os = \"windows\")".dependencies.winapi]
|
|
||||||
-version = "0.3"
|
|
||||||
-features = ["avrt", "errhandlingapi", "minwindef"]
|
|
||||||
-optional = true
|
|
||||||
|
|
||||||
-[target."cfg(target_os = \"windows\")".dependencies.windows]
|
|
||||||
-version = "^0.32.0"
|
|
||||||
-features = ["Win32_Foundation", "Win32_System_Threading"]
|
|
||||||
-optional = true
|
|
||||||
+[target."cfg(target_os = \"windows\")".dependencies.windows-sys]
|
|
||||||
+version = "0.48"
|
|
||||||
+features = [
|
|
||||||
+ "Win32_Foundation",
|
|
||||||
+ "Win32_System_Threading",
|
|
||||||
+]
|
|
||||||
--- a/third_party/rust/audio_thread_priority/src/lib.rs
|
|
||||||
+++ b/third_party/rust/audio_thread_priority/src/lib.rs
|
|
||||||
@@ -253,34 +253,43 @@ pub extern "C" fn atp_get_current_thread
|
|
||||||
///
|
|
||||||
/// # Arguments
|
|
||||||
///
|
|
||||||
/// thread_info: the `atp_thread_info` structure to free.
|
|
||||||
///
|
|
||||||
/// # Return value
|
|
||||||
///
|
|
||||||
/// 0 in case of success, 1 otherwise (if `thread_info` is NULL).
|
|
||||||
+///
|
|
||||||
+/// # Safety
|
|
||||||
+///
|
|
||||||
+/// This function is safe only and only if the pointer comes from this library, of if is null.
|
|
||||||
#[no_mangle]
|
|
||||||
pub unsafe extern "C" fn atp_free_thread_info(thread_info: *mut atp_thread_info) -> i32 {
|
|
||||||
if thread_info.is_null() {
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
- Box::from_raw(thread_info);
|
|
||||||
+ drop(Box::from_raw(thread_info));
|
|
||||||
0
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Return a byte buffer containing serialized information about a thread, to promote it to
|
|
||||||
/// real-time from elsewhere, with a C API.
|
|
||||||
///
|
|
||||||
/// `bytes` MUST be `std::mem::size_of<RtPriorityThreadInfo>()` bytes long.
|
|
||||||
///
|
|
||||||
/// This is exposed in the C API as `ATP_THREAD_INFO_SIZE`.
|
|
||||||
///
|
|
||||||
/// This call is useful on Linux desktop only, when the process is sandboxed, cannot promote itself
|
|
||||||
/// directly, and the `atp_thread_info` struct must be passed via IPC.
|
|
||||||
+///
|
|
||||||
+/// # Safety
|
|
||||||
+///
|
|
||||||
+/// This function is safe only and only if the first pointer comes from this library, and the
|
|
||||||
+/// second pointer is at least ATP_THREAD_INFO_SIZE bytes long.
|
|
||||||
#[no_mangle]
|
|
||||||
pub unsafe extern "C" fn atp_serialize_thread_info(
|
|
||||||
thread_info: *mut atp_thread_info,
|
|
||||||
bytes: *mut libc::c_void,
|
|
||||||
) {
|
|
||||||
let thread_info = &mut *thread_info;
|
|
||||||
let source = thread_info.0.serialize();
|
|
||||||
std::ptr::copy(source.as_ptr(), bytes as *mut u8, source.len());
|
|
||||||
@@ -289,16 +298,20 @@ pub unsafe extern "C" fn atp_serialize_t
|
|
||||||
/// From a byte buffer, return a `RtPriorityThreadInfo`, with a C API.
|
|
||||||
///
|
|
||||||
/// This call is useful on Linux desktop only, when the process is sandboxed and
|
|
||||||
/// cannot promote itself directly.
|
|
||||||
///
|
|
||||||
/// # Arguments
|
|
||||||
///
|
|
||||||
/// A byte buffer containing a serializezd `RtPriorityThreadInfo`.
|
|
||||||
+///
|
|
||||||
+/// # Safety
|
|
||||||
+///
|
|
||||||
+/// This function is safe only and only if pointer is at least ATP_THREAD_INFO_SIZE bytes long.
|
|
||||||
#[no_mangle]
|
|
||||||
pub unsafe extern "C" fn atp_deserialize_thread_info(
|
|
||||||
in_bytes: *mut u8,
|
|
||||||
) -> *mut atp_thread_info {
|
|
||||||
let bytes = *(in_bytes as *mut [u8; std::mem::size_of::<RtPriorityThreadInfoInternal>()]);
|
|
||||||
let thread_info = RtPriorityThreadInfoInternal::deserialize(bytes);
|
|
||||||
Box::into_raw(Box::new(atp_thread_info(thread_info)))
|
|
||||||
}
|
|
||||||
@@ -364,16 +377,20 @@ pub struct atp_thread_info(RtPriorityThr
|
|
||||||
/// `atp_get_current_thread_info` on the thread to promote.
|
|
||||||
/// * `audio_buffer_frames` - the exact or an upper limit on the number of frames that have to be
|
|
||||||
/// rendered each callback, or 0 for a sensible default value.
|
|
||||||
/// * `audio_samplerate_hz` - the sample-rate for this audio stream, in Hz.
|
|
||||||
///
|
|
||||||
/// # Return value
|
|
||||||
///
|
|
||||||
/// A pointer to an `atp_handle` in case of success, NULL otherwise.
|
|
||||||
+///
|
|
||||||
+/// # Safety
|
|
||||||
+///
|
|
||||||
+/// This function is safe as long as the first pointer comes from this library.
|
|
||||||
#[no_mangle]
|
|
||||||
pub unsafe extern "C" fn atp_promote_thread_to_real_time(
|
|
||||||
thread_info: *mut atp_thread_info,
|
|
||||||
audio_buffer_frames: u32,
|
|
||||||
audio_samplerate_hz: u32,
|
|
||||||
) -> *mut atp_handle {
|
|
||||||
let thread_info = &mut *thread_info;
|
|
||||||
match promote_thread_to_real_time(thread_info.0, audio_buffer_frames, audio_samplerate_hz) {
|
|
||||||
@@ -386,16 +403,20 @@ pub unsafe extern "C" fn atp_promote_thr
|
|
||||||
///
|
|
||||||
/// # Arguments
|
|
||||||
///
|
|
||||||
/// `handle` - an opaque struct received from a promoting function.
|
|
||||||
///
|
|
||||||
/// # Return value
|
|
||||||
///
|
|
||||||
/// 0 in case of success, non-zero otherwise.
|
|
||||||
+///
|
|
||||||
+/// # Safety
|
|
||||||
+///
|
|
||||||
+/// This function is safe as long as the first pointer comes from this library, or is null.
|
|
||||||
#[no_mangle]
|
|
||||||
pub unsafe extern "C" fn atp_demote_thread_from_real_time(thread_info: *mut atp_thread_info) -> i32 {
|
|
||||||
if thread_info.is_null() {
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
let thread_info = (*thread_info).0;
|
|
||||||
|
|
||||||
match demote_thread_from_real_time(thread_info) {
|
|
||||||
@@ -631,22 +652,22 @@ mod tests {
|
|
||||||
let info2 = thread_info_deserialize(bytes);
|
|
||||||
assert!(info == info2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#[test]
|
|
||||||
fn test_remote_promotion() {
|
|
||||||
let (rd, wr) = pipe().unwrap();
|
|
||||||
|
|
||||||
- match fork().expect("fork failed") {
|
|
||||||
+ match unsafe { fork().expect("fork failed") } {
|
|
||||||
ForkResult::Parent{ child } => {
|
|
||||||
eprintln!("Parent PID: {}", getpid());
|
|
||||||
let mut bytes = [0_u8; std::mem::size_of::<RtPriorityThreadInfo>()];
|
|
||||||
match read(rd, &mut bytes) {
|
|
||||||
- Ok(_) => {
|
|
||||||
+ Ok(_) => {
|
|
||||||
let info = RtPriorityThreadInfo::deserialize(bytes);
|
|
||||||
match promote_thread_to_real_time(info, 0, 44100) {
|
|
||||||
Ok(_) => {
|
|
||||||
eprintln!("thread promotion in the child from the parent succeeded");
|
|
||||||
assert!(true);
|
|
||||||
}
|
|
||||||
Err(_) => {
|
|
||||||
eprintln!("promotion Err");
|
|
||||||
--- a/third_party/rust/audio_thread_priority/src/rt_linux.rs
|
|
||||||
+++ b/third_party/rust/audio_thread_priority/src/rt_linux.rs
|
|
||||||
@@ -3,16 +3,17 @@
|
|
||||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
||||||
|
|
||||||
/* Widely copied from dbus-rs/dbus/examples/rtkit.rs */
|
|
||||||
|
|
||||||
extern crate dbus;
|
|
||||||
extern crate libc;
|
|
||||||
|
|
||||||
use std::cmp;
|
|
||||||
+use std::convert::TryInto;
|
|
||||||
use std::error::Error;
|
|
||||||
use std::io::Error as OSError;
|
|
||||||
|
|
||||||
use dbus::{BusType, Connection, Message, MessageItem, Props};
|
|
||||||
|
|
||||||
use crate::AudioThreadPriorityError;
|
|
||||||
|
|
||||||
const DBUS_SOCKET_TIMEOUT: i32 = 10_000;
|
|
||||||
@@ -107,27 +108,27 @@ fn rtkit_set_realtime(thread: u64, pid:
|
|
||||||
};
|
|
||||||
let c = Connection::get_private(BusType::System)?;
|
|
||||||
c.send_with_reply_and_block(m, DBUS_SOCKET_TIMEOUT)?;
|
|
||||||
Ok(())
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Returns the maximum priority, maximum real-time time slice, and the current real-time time
|
|
||||||
/// slice for this process.
|
|
||||||
-fn get_limits() -> Result<(i64, u64, libc::rlimit64), AudioThreadPriorityError> {
|
|
||||||
+fn get_limits() -> Result<(i64, u64, libc::rlimit), AudioThreadPriorityError> {
|
|
||||||
let c = Connection::get_private(BusType::System)?;
|
|
||||||
|
|
||||||
let p = Props::new(
|
|
||||||
&c,
|
|
||||||
"org.freedesktop.RealtimeKit1",
|
|
||||||
"/org/freedesktop/RealtimeKit1",
|
|
||||||
"org.freedesktop.RealtimeKit1",
|
|
||||||
DBUS_SOCKET_TIMEOUT,
|
|
||||||
);
|
|
||||||
- let mut current_limit = libc::rlimit64 {
|
|
||||||
+ let mut current_limit = libc::rlimit {
|
|
||||||
rlim_cur: 0,
|
|
||||||
rlim_max: 0,
|
|
||||||
};
|
|
||||||
|
|
||||||
let max_prio = item_as_i64(p.get("MaxRealtimePriority")?)?;
|
|
||||||
if max_prio < 0 {
|
|
||||||
return Err(AudioThreadPriorityError::new(
|
|
||||||
"invalid negative MaxRealtimePriority",
|
|
||||||
@@ -136,36 +137,41 @@ fn get_limits() -> Result<(i64, u64, lib
|
|
||||||
|
|
||||||
let max_rttime = item_as_i64(p.get("RTTimeUSecMax")?)?;
|
|
||||||
if max_rttime < 0 {
|
|
||||||
return Err(AudioThreadPriorityError::new(
|
|
||||||
"invalid negative RTTimeUSecMax",
|
|
||||||
));
|
|
||||||
}
|
|
||||||
|
|
||||||
- if unsafe { libc::getrlimit64(libc::RLIMIT_RTTIME, &mut current_limit) } < 0 {
|
|
||||||
+ if unsafe { libc::getrlimit(libc::RLIMIT_RTTIME, &mut current_limit) } < 0 {
|
|
||||||
return Err(AudioThreadPriorityError::new_with_inner(
|
|
||||||
- "getrlimit64",
|
|
||||||
+ "getrlimit",
|
|
||||||
Box::new(OSError::last_os_error()),
|
|
||||||
));
|
|
||||||
}
|
|
||||||
|
|
||||||
Ok((max_prio, (max_rttime as u64), current_limit))
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_limits(request: u64, max: u64) -> Result<(), AudioThreadPriorityError> {
|
|
||||||
// Set a soft limit to the limit requested, to be able to handle going over the limit using
|
|
||||||
- // SIGXCPU. Set the hard limit to the maxium slice to prevent getting SIGKILL.
|
|
||||||
- let new_limit = libc::rlimit64 {
|
|
||||||
- rlim_cur: request,
|
|
||||||
- rlim_max: max,
|
|
||||||
+ // SIGXCPU. Set the hard limit to the maximum slice to prevent getting SIGKILL.
|
|
||||||
+ #[allow(clippy::useless_conversion)]
|
|
||||||
+ let new_limit = libc::rlimit {
|
|
||||||
+ rlim_cur: request
|
|
||||||
+ .try_into()
|
|
||||||
+ .map_err(|_| AudioThreadPriorityError::new("setrlimit"))?,
|
|
||||||
+ rlim_max: max
|
|
||||||
+ .try_into()
|
|
||||||
+ .map_err(|_| AudioThreadPriorityError::new("setrlimit"))?,
|
|
||||||
};
|
|
||||||
- if unsafe { libc::setrlimit64(libc::RLIMIT_RTTIME, &new_limit) } < 0 {
|
|
||||||
+ if unsafe { libc::setrlimit(libc::RLIMIT_RTTIME, &new_limit) } < 0 {
|
|
||||||
return Err(AudioThreadPriorityError::new_with_inner(
|
|
||||||
- "setrlimit64",
|
|
||||||
+ "setrlimit",
|
|
||||||
Box::new(OSError::last_os_error()),
|
|
||||||
));
|
|
||||||
}
|
|
||||||
|
|
||||||
Ok(())
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn promote_current_thread_to_real_time_internal(
|
|
||||||
@@ -267,43 +273,45 @@ pub fn set_real_time_hard_limit_internal
|
|
||||||
};
|
|
||||||
let budget_us = (buffer_frames * 1_000_000 / audio_samplerate_hz) as u64;
|
|
||||||
|
|
||||||
// It's only necessary to set RLIMIT_RTTIME to something when in the child, skip it if it's a
|
|
||||||
// remoting call.
|
|
||||||
let (_, max_rttime, _) = get_limits()?;
|
|
||||||
|
|
||||||
// Only take what we need, or cap at the system limit, no further.
|
|
||||||
- let rttime_request = cmp::min(budget_us, max_rttime as u64);
|
|
||||||
+ let rttime_request = cmp::min(budget_us, max_rttime);
|
|
||||||
set_limits(rttime_request, max_rttime)?;
|
|
||||||
|
|
||||||
Ok(())
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Promote a thread (possibly in another process) identified by its tid, to real-time.
|
|
||||||
pub fn promote_thread_to_real_time_internal(
|
|
||||||
thread_info: RtPriorityThreadInfoInternal,
|
|
||||||
audio_buffer_frames: u32,
|
|
||||||
audio_samplerate_hz: u32,
|
|
||||||
) -> Result<RtPriorityHandleInternal, AudioThreadPriorityError> {
|
|
||||||
let RtPriorityThreadInfoInternal { pid, thread_id, .. } = thread_info;
|
|
||||||
|
|
||||||
let handle = RtPriorityHandleInternal { thread_info };
|
|
||||||
|
|
||||||
- let (_, _, limits) = get_limits()?;
|
|
||||||
set_real_time_hard_limit_internal(audio_buffer_frames, audio_samplerate_hz)?;
|
|
||||||
|
|
||||||
let r = rtkit_set_realtime(thread_id as u64, pid as u64, RT_PRIO_DEFAULT);
|
|
||||||
|
|
||||||
match r {
|
|
||||||
Ok(_) => Ok(handle),
|
|
||||||
Err(e) => {
|
|
||||||
- if unsafe { libc::setrlimit64(libc::RLIMIT_RTTIME, &limits) } < 0 {
|
|
||||||
+ let (_, _, limits) = get_limits()?;
|
|
||||||
+ if limits.rlim_cur != libc::RLIM_INFINITY
|
|
||||||
+ && unsafe { libc::setrlimit(libc::RLIMIT_RTTIME, &limits) } < 0
|
|
||||||
+ {
|
|
||||||
return Err(AudioThreadPriorityError::new_with_inner(
|
|
||||||
- "setrlimit64",
|
|
||||||
+ "setrlimit",
|
|
||||||
Box::new(OSError::last_os_error()),
|
|
||||||
));
|
|
||||||
}
|
|
||||||
Err(AudioThreadPriorityError::new_with_inner(
|
|
||||||
"Thread promotion error",
|
|
||||||
e,
|
|
||||||
))
|
|
||||||
}
|
|
||||||
--- a/third_party/rust/audio_thread_priority/src/rt_mach.rs
|
|
||||||
+++ b/third_party/rust/audio_thread_priority/src/rt_mach.rs
|
|
||||||
@@ -65,17 +65,17 @@ pub fn demote_current_thread_from_real_t
|
|
||||||
unsafe {
|
|
||||||
let mut h = rt_priority_handle;
|
|
||||||
let rv: kern_return_t = thread_policy_set(
|
|
||||||
h.tid,
|
|
||||||
THREAD_TIME_CONSTRAINT_POLICY,
|
|
||||||
(&mut h.previous_time_constraint_policy) as *mut _ as thread_policy_t,
|
|
||||||
THREAD_TIME_CONSTRAINT_POLICY_COUNT!(),
|
|
||||||
);
|
|
||||||
- if rv != KERN_SUCCESS as i32 {
|
|
||||||
+ if rv != KERN_SUCCESS {
|
|
||||||
return Err(AudioThreadPriorityError::new(
|
|
||||||
"thread demotion error: thread_policy_get: RT",
|
|
||||||
));
|
|
||||||
}
|
|
||||||
|
|
||||||
info!("thread {} priority restored.", h.tid);
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -114,17 +114,17 @@ pub fn promote_current_thread_to_real_ti
|
|
||||||
let mut rv: kern_return_t = thread_policy_get(
|
|
||||||
tid,
|
|
||||||
THREAD_TIME_CONSTRAINT_POLICY,
|
|
||||||
(&mut time_constraints) as *mut _ as thread_policy_t,
|
|
||||||
&mut count,
|
|
||||||
&mut get_default,
|
|
||||||
);
|
|
||||||
|
|
||||||
- if rv != KERN_SUCCESS as i32 {
|
|
||||||
+ if rv != KERN_SUCCESS {
|
|
||||||
return Err(AudioThreadPriorityError::new(
|
|
||||||
"thread promotion error: thread_policy_get: time_constraint",
|
|
||||||
));
|
|
||||||
}
|
|
||||||
|
|
||||||
rt_priority_handle.previous_time_constraint_policy = time_constraints;
|
|
||||||
|
|
||||||
let cb_duration = buffer_frames as f32 / (audio_samplerate_hz as f32) * 1000.;
|
|
||||||
@@ -144,17 +144,17 @@ pub fn promote_current_thread_to_real_ti
|
|
||||||
};
|
|
||||||
|
|
||||||
rv = thread_policy_set(
|
|
||||||
tid,
|
|
||||||
THREAD_TIME_CONSTRAINT_POLICY,
|
|
||||||
(&mut time_constraints) as *mut _ as thread_policy_t,
|
|
||||||
THREAD_TIME_CONSTRAINT_POLICY_COUNT!(),
|
|
||||||
);
|
|
||||||
- if rv != KERN_SUCCESS as i32 {
|
|
||||||
+ if rv != KERN_SUCCESS {
|
|
||||||
return Err(AudioThreadPriorityError::new(
|
|
||||||
"thread promotion error: thread_policy_set: time_constraint",
|
|
||||||
));
|
|
||||||
}
|
|
||||||
|
|
||||||
info!("thread {} bumped to real time priority.", tid);
|
|
||||||
}
|
|
||||||
|
|
||||||
--- a/third_party/rust/audio_thread_priority/src/rt_win.rs
|
|
||||||
+++ b/third_party/rust/audio_thread_priority/src/rt_win.rs
|
|
||||||
@@ -1,72 +1,43 @@
|
|
||||||
-#[cfg(feature = "windows")]
|
|
||||||
-mod os {
|
|
||||||
- pub use windows::Win32::Foundation::GetLastError;
|
|
||||||
- pub use windows::Win32::Foundation::HANDLE;
|
|
||||||
- pub use windows::Win32::Foundation::PSTR;
|
|
||||||
- pub use windows::Win32::System::Threading::{
|
|
||||||
- AvRevertMmThreadCharacteristics, AvSetMmThreadCharacteristicsA,
|
|
||||||
- };
|
|
||||||
-
|
|
||||||
- pub fn ok(rv: windows::Win32::Foundation::BOOL) -> bool {
|
|
||||||
- rv.as_bool()
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- pub fn invalid_handle(handle: HANDLE) -> bool {
|
|
||||||
- handle.is_invalid()
|
|
||||||
- }
|
|
||||||
-}
|
|
||||||
-#[cfg(feature = "winapi")]
|
|
||||||
-mod os {
|
|
||||||
- pub use winapi::shared::ntdef::HANDLE;
|
|
||||||
- pub use winapi::um::avrt::{AvRevertMmThreadCharacteristics, AvSetMmThreadCharacteristicsA};
|
|
||||||
- pub use winapi::um::errhandlingapi::GetLastError;
|
|
||||||
-
|
|
||||||
- pub fn ok(rv: winapi::shared::minwindef::BOOL) -> bool {
|
|
||||||
- rv != 0
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- #[allow(non_snake_case)]
|
|
||||||
- pub fn PSTR(ptr: *const u8) -> *const i8 {
|
|
||||||
- ptr as _
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- pub fn invalid_handle(handle: HANDLE) -> bool {
|
|
||||||
- handle.is_null()
|
|
||||||
- }
|
|
||||||
-}
|
|
||||||
+use windows_sys::s;
|
|
||||||
+use windows_sys::Win32::Foundation::GetLastError;
|
|
||||||
+use windows_sys::Win32::Foundation::FALSE;
|
|
||||||
+use windows_sys::Win32::Foundation::HANDLE;
|
|
||||||
+use windows_sys::Win32::System::Threading::{
|
|
||||||
+ AvRevertMmThreadCharacteristics, AvSetMmThreadCharacteristicsA,
|
|
||||||
+};
|
|
||||||
|
|
||||||
use crate::AudioThreadPriorityError;
|
|
||||||
|
|
||||||
use log::info;
|
|
||||||
|
|
||||||
#[derive(Debug)]
|
|
||||||
pub struct RtPriorityHandleInternal {
|
|
||||||
mmcss_task_index: u32,
|
|
||||||
- task_handle: os::HANDLE,
|
|
||||||
+ task_handle: HANDLE,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl RtPriorityHandleInternal {
|
|
||||||
- pub fn new(mmcss_task_index: u32, task_handle: os::HANDLE) -> RtPriorityHandleInternal {
|
|
||||||
+ pub fn new(mmcss_task_index: u32, task_handle: HANDLE) -> RtPriorityHandleInternal {
|
|
||||||
RtPriorityHandleInternal {
|
|
||||||
mmcss_task_index,
|
|
||||||
task_handle,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn demote_current_thread_from_real_time_internal(
|
|
||||||
rt_priority_handle: RtPriorityHandleInternal,
|
|
||||||
) -> Result<(), AudioThreadPriorityError> {
|
|
||||||
- let rv = unsafe { os::AvRevertMmThreadCharacteristics(rt_priority_handle.task_handle) };
|
|
||||||
- if !os::ok(rv) {
|
|
||||||
+ let rv = unsafe { AvRevertMmThreadCharacteristics(rt_priority_handle.task_handle) };
|
|
||||||
+ if rv == FALSE {
|
|
||||||
return Err(AudioThreadPriorityError::new(&format!(
|
|
||||||
"Unable to restore the thread priority ({:?})",
|
|
||||||
- unsafe { os::GetLastError() }
|
|
||||||
+ unsafe { GetLastError() }
|
|
||||||
)));
|
|
||||||
}
|
|
||||||
|
|
||||||
info!(
|
|
||||||
"task {} priority restored.",
|
|
||||||
rt_priority_handle.mmcss_task_index
|
|
||||||
);
|
|
||||||
|
|
||||||
@@ -74,24 +45,23 @@ pub fn demote_current_thread_from_real_t
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn promote_current_thread_to_real_time_internal(
|
|
||||||
_audio_buffer_frames: u32,
|
|
||||||
_audio_samplerate_hz: u32,
|
|
||||||
) -> Result<RtPriorityHandleInternal, AudioThreadPriorityError> {
|
|
||||||
let mut task_index = 0u32;
|
|
||||||
|
|
||||||
- let handle =
|
|
||||||
- unsafe { os::AvSetMmThreadCharacteristicsA(os::PSTR("Audio\0".as_ptr()), &mut task_index) };
|
|
||||||
+ let handle = unsafe { AvSetMmThreadCharacteristicsA(s!("Audio"), &mut task_index) };
|
|
||||||
let handle = RtPriorityHandleInternal::new(task_index, handle);
|
|
||||||
|
|
||||||
- if os::invalid_handle(handle.task_handle) {
|
|
||||||
+ if handle.task_handle == 0 {
|
|
||||||
return Err(AudioThreadPriorityError::new(&format!(
|
|
||||||
"Unable to restore the thread priority ({:?})",
|
|
||||||
- unsafe { os::GetLastError() }
|
|
||||||
+ unsafe { GetLastError() }
|
|
||||||
)));
|
|
||||||
}
|
|
||||||
|
|
||||||
info!(
|
|
||||||
"task {} bumped to real time priority.",
|
|
||||||
handle.mmcss_task_index
|
|
||||||
);
|
|
||||||
|
|
||||||
--- a/third_party/rust/audioipc2-client/.cargo-checksum.json
|
|
||||||
+++ b/third_party/rust/audioipc2-client/.cargo-checksum.json
|
|
||||||
@@ -1,1 +1,1 @@
|
|
||||||
-{"files":{"Cargo.toml":"234b81b986ab93768ccacc68d973d6125e3769337d4b0a7b137d19d1666db8a4","cbindgen.toml":"fb6abe1671497f432a06e40b1db7ed7cd2cceecbd9a2382193ad7534e8855e34","src/context.rs":"86d31460a48a9bdc0ac4fbef522d267c26f68dd79a12e0cbc35b3a4b6f6449dc","src/lib.rs":"c4a6797734489280f6b97dd72c9e51a7bd7be4104592eece3929e29d45cbca4a","src/send_recv.rs":"859abe75b521eb4297c84b30423814b5b87f3c7741ad16fe72189212e123e1ac","src/stream.rs":"3101f4052e35c1600adafedc67aed92d7d5531ff0ff4845de0a5ea3cedef872d"},"package":null}
|
|
||||||
\ No newline at end of file
|
|
||||||
+{"files":{"Cargo.toml":"d7cfe88a0f0086d4216e3f4ad3de0620417fcbda61c9852476459a9249131996","cbindgen.toml":"fb6abe1671497f432a06e40b1db7ed7cd2cceecbd9a2382193ad7534e8855e34","src/context.rs":"86d31460a48a9bdc0ac4fbef522d267c26f68dd79a12e0cbc35b3a4b6f6449dc","src/lib.rs":"c4a6797734489280f6b97dd72c9e51a7bd7be4104592eece3929e29d45cbca4a","src/send_recv.rs":"859abe75b521eb4297c84b30423814b5b87f3c7741ad16fe72189212e123e1ac","src/stream.rs":"3101f4052e35c1600adafedc67aed92d7d5531ff0ff4845de0a5ea3cedef872d"},"package":null}
|
|
||||||
\ No newline at end of file
|
|
||||||
--- a/third_party/rust/audioipc2-client/Cargo.toml
|
|
||||||
+++ b/third_party/rust/audioipc2-client/Cargo.toml
|
|
||||||
@@ -16,15 +16,18 @@ version = "0.5.0"
|
|
||||||
authors = [
|
|
||||||
"Matthew Gregan <kinetik@flim.org>",
|
|
||||||
"Dan Glastonbury <dan.glastonbury@gmail.com>",
|
|
||||||
]
|
|
||||||
description = "Cubeb Backend for talking to remote cubeb server."
|
|
||||||
license = "ISC"
|
|
||||||
|
|
||||||
[dependencies]
|
|
||||||
-audio_thread_priority = "0.26"
|
|
||||||
cubeb-backend = "0.10"
|
|
||||||
log = "0.4"
|
|
||||||
|
|
||||||
+[dependencies.audio_thread_priority]
|
|
||||||
+version = "0.30"
|
|
||||||
+default-features = false
|
|
||||||
+
|
|
||||||
[dependencies.audioipc]
|
|
||||||
path = "../audioipc"
|
|
||||||
package = "audioipc2"
|
|
||||||
--- a/third_party/rust/audioipc2-server/.cargo-checksum.json
|
|
||||||
+++ b/third_party/rust/audioipc2-server/.cargo-checksum.json
|
|
||||||
@@ -1,1 +1,1 @@
|
|
||||||
-{"files":{"Cargo.toml":"9c801164c20a9af8c43135848244112002bd07a05b1c7165c2eb7be2db23898b","cbindgen.toml":"fb6abe1671497f432a06e40b1db7ed7cd2cceecbd9a2382193ad7534e8855e34","src/lib.rs":"06aff4fd1326aeabb16b01f81a6f3c59c1717ebe96285a063724830cdf30303a","src/server.rs":"ea839fe4607ba6b70a1ef5dfb2305eb668b148820c5590b87192609fbe3c9edd"},"package":null}
|
|
||||||
\ No newline at end of file
|
|
||||||
+{"files":{"Cargo.toml":"4e66d9ec1e8baa7ad01ace373a921bc019e38bcb23f782be1daa8578f40b6086","cbindgen.toml":"fb6abe1671497f432a06e40b1db7ed7cd2cceecbd9a2382193ad7534e8855e34","src/lib.rs":"06aff4fd1326aeabb16b01f81a6f3c59c1717ebe96285a063724830cdf30303a","src/server.rs":"ea839fe4607ba6b70a1ef5dfb2305eb668b148820c5590b87192609fbe3c9edd"},"package":null}
|
|
||||||
\ No newline at end of file
|
|
||||||
--- a/third_party/rust/audioipc2-server/Cargo.toml
|
|
||||||
+++ b/third_party/rust/audioipc2-server/Cargo.toml
|
|
||||||
@@ -16,21 +16,24 @@ version = "0.5.0"
|
|
||||||
authors = [
|
|
||||||
"Matthew Gregan <kinetik@flim.org>",
|
|
||||||
"Dan Glastonbury <dan.glastonbury@gmail.com>",
|
|
||||||
]
|
|
||||||
description = "Remote cubeb server"
|
|
||||||
license = "ISC"
|
|
||||||
|
|
||||||
[dependencies]
|
|
||||||
-audio_thread_priority = "0.26"
|
|
||||||
cubeb-core = "0.10.0"
|
|
||||||
log = "0.4"
|
|
||||||
once_cell = "1.2.0"
|
|
||||||
slab = "0.4"
|
|
||||||
|
|
||||||
+[dependencies.audio_thread_priority]
|
|
||||||
+version = "0.30"
|
|
||||||
+default-features = false
|
|
||||||
+
|
|
||||||
[dependencies.audioipc]
|
|
||||||
path = "../audioipc"
|
|
||||||
package = "audioipc2"
|
|
||||||
|
|
||||||
[dependencies.error-chain]
|
|
||||||
version = "0.12.0"
|
|
||||||
default-features = false
|
|
||||||
--- a/third_party/rust/audioipc2/.cargo-checksum.json
|
|
||||||
+++ b/third_party/rust/audioipc2/.cargo-checksum.json
|
|
||||||
@@ -1,1 +1,1 @@
|
|
||||||
-{"files":{"Cargo.toml":"8434bf0fc2131bdca6655fc0e6ff3b87218c92f342785dd453a4018ed1a70b52","benches/serialization.rs":"d56855d868dab6aa22c8b03a61084535351b76c94b68d8b1d20764e352fe473f","build.rs":"65df9a97c6cdaa3faf72581f04ac289197b0b1797d69d22c1796e957ff1089e2","src/codec.rs":"38408b512d935cd7889a03b25dd14b36083ec4e6d2fcabd636182cf45e3d50bc","src/errors.rs":"67a4a994d0724397657581cde153bdfc05ce86e7efc467f23fafc8f64df80fa4","src/ipccore.rs":"ba339eebdc2d8a6d0cb9b294344809e63e404e220fda643b63a8a3ff63a755e8","src/lib.rs":"3881e9069f37e824cbb5dacf1c37192c08b84068098fef96ede6f2ae284edfe3","src/messages.rs":"452362da2cace9a0f2e3134c190ecb6a9997f8be4036cde06643e17c6c238240","src/rpccore.rs":"025b6614f1c42b96b0a8e74fd7881032d338c66e0d67ec0af70f910a9e30ebe1","src/shm.rs":"f8bc0ab17e04b86a746aea7aa4eb15f402e29d80e0d2f9d7c22ac8375a0cea85","src/sys/mod.rs":"e6fa1d260abf093e1f7b50185195e2d3aee0eb8c9774c6f253953b5896d838f3","src/sys/unix/cmsg.rs":"6f0236bf6cd66ccd237b268348a826ae1d266073c2adadcfaae703c556230065","src/sys/unix/cmsghdr.c":"d7344b3dc15cdce410c68669b848bb81f7fe36362cd3699668cb613fa05180f8","src/sys/unix/mod.rs":"59835f0d5509940078b1820a54f49fc5514adeb3e45e7d21e3ab917431da2e74","src/sys/unix/msg.rs":"0e297d73bae9414184f85c2209cca0a3fde6d999a3f1d3f42faa3f56b6d57233","src/sys/windows/mod.rs":"7eaabb76e62c6962b636320e2bbf79a78fce61659c799a798f7dd6d56b0be8a1"},"package":null}
|
|
||||||
\ No newline at end of file
|
|
||||||
+{"files":{"Cargo.toml":"4d025a5bf0f59f660b3b52ec6a0da028f61269b17e4e33041b768ea07b8a9448","benches/serialization.rs":"d56855d868dab6aa22c8b03a61084535351b76c94b68d8b1d20764e352fe473f","build.rs":"65df9a97c6cdaa3faf72581f04ac289197b0b1797d69d22c1796e957ff1089e2","src/codec.rs":"38408b512d935cd7889a03b25dd14b36083ec4e6d2fcabd636182cf45e3d50bc","src/errors.rs":"67a4a994d0724397657581cde153bdfc05ce86e7efc467f23fafc8f64df80fa4","src/ipccore.rs":"ba339eebdc2d8a6d0cb9b294344809e63e404e220fda643b63a8a3ff63a755e8","src/lib.rs":"3881e9069f37e824cbb5dacf1c37192c08b84068098fef96ede6f2ae284edfe3","src/messages.rs":"452362da2cace9a0f2e3134c190ecb6a9997f8be4036cde06643e17c6c238240","src/rpccore.rs":"025b6614f1c42b96b0a8e74fd7881032d338c66e0d67ec0af70f910a9e30ebe1","src/shm.rs":"f8bc0ab17e04b86a746aea7aa4eb15f402e29d80e0d2f9d7c22ac8375a0cea85","src/sys/mod.rs":"e6fa1d260abf093e1f7b50185195e2d3aee0eb8c9774c6f253953b5896d838f3","src/sys/unix/cmsg.rs":"6f0236bf6cd66ccd237b268348a826ae1d266073c2adadcfaae703c556230065","src/sys/unix/cmsghdr.c":"d7344b3dc15cdce410c68669b848bb81f7fe36362cd3699668cb613fa05180f8","src/sys/unix/mod.rs":"59835f0d5509940078b1820a54f49fc5514adeb3e45e7d21e3ab917431da2e74","src/sys/unix/msg.rs":"0e297d73bae9414184f85c2209cca0a3fde6d999a3f1d3f42faa3f56b6d57233","src/sys/windows/mod.rs":"7eaabb76e62c6962b636320e2bbf79a78fce61659c799a798f7dd6d56b0be8a1"},"package":null}
|
|
||||||
\ No newline at end of file
|
|
||||||
--- a/third_party/rust/audioipc2/Cargo.toml
|
|
||||||
+++ b/third_party/rust/audioipc2/Cargo.toml
|
|
||||||
@@ -58,17 +58,17 @@ features = ["html_reports"]
|
|
||||||
|
|
||||||
[build-dependencies]
|
|
||||||
cc = "1.0"
|
|
||||||
|
|
||||||
[target."cfg(target_os = \"android\")".dependencies]
|
|
||||||
ashmem = "0.1.2"
|
|
||||||
|
|
||||||
[target."cfg(target_os = \"linux\")".dependencies.audio_thread_priority]
|
|
||||||
-version = "0.26.1"
|
|
||||||
+version = "0.30"
|
|
||||||
default-features = false
|
|
||||||
|
|
||||||
[target."cfg(unix)".dependencies]
|
|
||||||
arrayvec = "0.7"
|
|
||||||
iovec = "0.1"
|
|
||||||
libc = "0.2"
|
|
||||||
memmap2 = "0.5"
|
|
||||||
|
|
||||||
--- a/toolkit/library/rust/shared/Cargo.toml
|
|
||||||
+++ b/toolkit/library/rust/shared/Cargo.toml
|
|
||||||
@@ -20,18 +20,18 @@ xpcom = { path = "../../../../xpcom/rust
|
|
||||||
prefs_parser = { path = "../../../../modules/libpref/parser" }
|
|
||||||
static_prefs = { path = "../../../../modules/libpref/init/static_prefs" }
|
|
||||||
profiler_helper = { path = "../../../../tools/profiler/rust-helper", optional = true }
|
|
||||||
mozurl = { path = "../../../../netwerk/base/mozurl" }
|
|
||||||
webrender_bindings = { path = "../../../../gfx/webrender_bindings" }
|
|
||||||
cubeb-coreaudio = { git = "https://github.com/mozilla/cubeb-coreaudio-rs", rev = "93b5c01a131f65c83c11aeb317f4583405c5eb79", optional = true }
|
|
||||||
cubeb-pulse = { git = "https://github.com/mozilla/cubeb-pulse-rs", rev="cf48897be5cbe147d051ebbbe1eaf5fd8fb6bbc9", optional = true, features=["pulse-dlopen"] }
|
|
||||||
cubeb-sys = { version = "0.10.3", optional = true, features=["gecko-in-tree"] }
|
|
||||||
-audioipc2-client = { git = "https://github.com/mozilla/audioipc", rev = "ec6af6ecf8ba50b51f13d18f417de8cfb8460543", optional = true }
|
|
||||||
-audioipc2-server = { git = "https://github.com/mozilla/audioipc", rev = "ec6af6ecf8ba50b51f13d18f417de8cfb8460543", optional = true }
|
|
||||||
+audioipc2-client = { git = "https://github.com/mozilla/audioipc", rev = "6be424d75f1367e70f2f5ddcacd6d0237e81a6a9", optional = true }
|
|
||||||
+audioipc2-server = { git = "https://github.com/mozilla/audioipc", rev = "6be424d75f1367e70f2f5ddcacd6d0237e81a6a9", optional = true }
|
|
||||||
encoding_glue = { path = "../../../../intl/encoding_glue" }
|
|
||||||
authrs_bridge = { path = "../../../../dom/webauthn/authrs_bridge" }
|
|
||||||
gkrust_utils = { path = "../../../../xpcom/rust/gkrust_utils" }
|
|
||||||
gecko_logger = { path = "../../../../xpcom/rust/gecko_logger" }
|
|
||||||
rsdparsa_capi = { path = "../../../../dom/media/webrtc/sdp/rsdparsa_capi" }
|
|
||||||
# We have these to enforce common feature sets for said crates.
|
|
||||||
log = {version = "0.4", features = ["release_max_level_info"]}
|
|
||||||
cose-c = { version = "0.1.5" }
|
|
||||||
@@ -39,17 +39,17 @@ jsrust_shared = { path = "../../../../js
|
|
||||||
cascade_bloom_filter = { path = "../../../components/cascade_bloom_filter" }
|
|
||||||
cert_storage = { path = "../../../../security/manager/ssl/cert_storage" }
|
|
||||||
crypto_hash = { path = "../../../../security/manager/ssl/crypto_hash" }
|
|
||||||
data_storage = { path = "../../../../security/manager/ssl/data_storage" }
|
|
||||||
bitsdownload = { path = "../../../components/bitsdownload", optional = true }
|
|
||||||
storage = { path = "../../../../storage/rust" }
|
|
||||||
bookmark_sync = { path = "../../../components/places/bookmark_sync", optional = true }
|
|
||||||
chardetng_c = "0.1.1"
|
|
||||||
-audio_thread_priority = { version = "0.26.1", default_features = false, features = ["winapi"] }
|
|
||||||
+audio_thread_priority = { version = "0.30", default_features = false }
|
|
||||||
mdns_service = { path="../../../../dom/media/webrtc/transport/mdns_service", optional = true }
|
|
||||||
neqo_glue = { path = "../../../../netwerk/socket/neqo_glue" }
|
|
||||||
wgpu_bindings = { path = "../../../../gfx/wgpu_bindings" }
|
|
||||||
mapped_hyph = { git = "https://github.com/jfkthame/mapped_hyph.git", rev = "c7651a0cffff41996ad13c44f689bd9cd2192c01" }
|
|
||||||
fog_control = { path = "../../../components/glean" }
|
|
||||||
app_services_logger = { path = "../../../../services/common/app_services_logger" }
|
|
||||||
http_sfv = { path = "../../../../netwerk/base/http-sfv" }
|
|
||||||
unic-langid = { version = "0.9", features = ["likelysubtags"] }
|
|
|
@ -1,63 +0,0 @@
|
||||||
diff --git a/app/scripts/fetch_xulrunner.orig b/app/scripts/fetch_xulrunner
|
|
||||||
index 8b3d918..c6a96ff 100755
|
|
||||||
--- a/app/scripts/fetch_xulrunner.orig
|
|
||||||
+++ b/app/scripts/fetch_xulrunner
|
|
||||||
@@ -132,15 +132,6 @@ function modify_omni {
|
|
||||||
# Continue using app.update.auto in prefs.js on Windows
|
|
||||||
replace_line 'PER_INSTALLATION_PREFS_PLATFORMS = \["win"\]' 'PER_INSTALLATION_PREFS_PLATFORMS = []' modules/UpdateUtils.jsm
|
|
||||||
|
|
||||||
- # Prompt if major update is available instead of installing automatically on restart
|
|
||||||
- replace_line 'if \(!updateAuto\) \{' 'if (update.type == "major") {
|
|
||||||
- LOG("UpdateService:_selectAndInstallUpdate - prompting because it is a major update");
|
|
||||||
- AUSTLMY.pingCheckCode(this._pingSuffix, AUSTLMY.CHK_SHOWPROMPT_PREF);
|
|
||||||
- Services.obs.notifyObservers(update, "update-available", "show-prompt");
|
|
||||||
- return;
|
|
||||||
- }
|
|
||||||
- if (!updateAuto) {' modules/UpdateService.jsm
|
|
||||||
-
|
|
||||||
# Avoid console warning about resource://gre/modules/FxAccountsCommon.js
|
|
||||||
replace_line 'const logins = this._data.logins;' 'const logins = this._data.logins; if (this._data.logins.length != -1) return;' modules/LoginStore.jsm
|
|
||||||
|
|
||||||
@@ -470,36 +461,15 @@ fi
|
|
||||||
|
|
||||||
if [ $BUILD_LINUX == 1 ]; then
|
|
||||||
GECKO_VERSION="$GECKO_VERSION_LINUX"
|
|
||||||
- DOWNLOAD_URL="https://ftp.mozilla.org/pub/firefox/releases/$GECKO_VERSION"
|
|
||||||
|
|
||||||
+ rm -rf firefox-x86_64
|
|
||||||
|
|
||||||
- # Include 32-bit build if not in CI
|
|
||||||
- if [[ "${CI:-}" = "1" ]] || [[ "${SKIP_32:-}" = "1" ]]; then
|
|
||||||
- arches="x86_64"
|
|
||||||
- else
|
|
||||||
- arches="i686 x86_64"
|
|
||||||
- fi
|
|
||||||
- for arch in $arches; do
|
|
||||||
- xdir="firefox-$arch"
|
|
||||||
- rm -rf $xdir
|
|
||||||
-
|
|
||||||
- archived_file="firefox-$GECKO_VERSION-$arch.tar.bz2"
|
|
||||||
- if [ -e "$archived_file" ]; then
|
|
||||||
- echo "Using $archived_file"
|
|
||||||
- cp "$archived_file" "firefox-$GECKO_VERSION.tar.bz2"
|
|
||||||
- else
|
|
||||||
- curl -O "$DOWNLOAD_URL/linux-$arch/en-US/firefox-$GECKO_VERSION.tar.bz2"
|
|
||||||
- fi
|
|
||||||
-
|
|
||||||
- tar xvf firefox-$GECKO_VERSION.tar.bz2
|
|
||||||
- mv firefox firefox-$arch
|
|
||||||
+ cp -r /usr/lib/firefox-esr firefox-x86_64
|
|
||||||
+
|
|
||||||
+ pushd firefox-x86_64
|
|
||||||
+ modify_omni linux64
|
|
||||||
+ popd
|
|
||||||
|
|
||||||
- pushd firefox-$arch
|
|
||||||
- modify_omni
|
|
||||||
- popd
|
|
||||||
- echo $($SCRIPT_DIR/xulrunner_hash -p l) > hash-linux
|
|
||||||
- rm "firefox-$GECKO_VERSION.tar.bz2"
|
|
||||||
- done
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo Done
|
|
Loading…
Reference in a new issue