Skip to content

Commit 00d0ad7

Browse files
zmodemChromium LUCI CQ
authored andcommitted
Roll bindgen to pick up a compatibility fix with Clang 22
This picks up rust-lang/rust-bindgen#3278 and also adds the tests to the build process to catch such problems earlier. Bug: 440975178 Change-Id: Id919ff4d6191ab04267d961eef3e993665788052 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6890874 Commit-Queue: Nico Weber <thakis@chromium.org> Reviewed-by: Nico Weber <thakis@chromium.org> Auto-Submit: Hans Wennborg <hans@chromium.org> Commit-Queue: Hans Wennborg <hans@chromium.org> Cr-Commit-Position: refs/heads/main@{#1507661}
1 parent 4c57746 commit 00d0ad7

File tree

3 files changed

+40
-19
lines changed

3 files changed

+40
-19
lines changed

DEPS

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1019,31 +1019,31 @@ deps = {
10191019
'condition': 'not rust_force_head_revision',
10201020
'objects': [
10211021
{
1022-
'object_name': 'Linux_x64/rust-toolchain-22be76b7e259f27bf3e55eb931f354cd8b69d55f-3-llvmorg-21-init-16348-gbd809ffb.tar.xz',
1023-
'sha256sum': '5f8e9ad847e5bf586e0de1bb563c9a49e05ad36edfad5037900d7510004fc577',
1024-
'size_bytes': 138573136,
1025-
'generation': 1750840933611077,
1022+
'object_name': 'Linux_x64/rust-toolchain-22be76b7e259f27bf3e55eb931f354cd8b69d55f-4-llvmorg-21-init-16348-gbd809ffb.tar.xz',
1023+
'sha256sum': '3e5cf980edb893cbdc915d62bce1b29b896eda6df6455e145200bf25a52576b1',
1024+
'size_bytes': 159517088,
1025+
'generation': 1756377175296503,
10261026
'condition': 'host_os == "linux" and non_git_source',
10271027
},
10281028
{
1029-
'object_name': 'Mac/rust-toolchain-22be76b7e259f27bf3e55eb931f354cd8b69d55f-3-llvmorg-21-init-16348-gbd809ffb.tar.xz',
1030-
'sha256sum': '357db812ca0a518ef0fc4394ddc859d68f23384931294412b7424bb3aabb3c09',
1031-
'size_bytes': 132392604,
1032-
'generation': 1750840935469331,
1029+
'object_name': 'Mac/rust-toolchain-22be76b7e259f27bf3e55eb931f354cd8b69d55f-4-llvmorg-21-init-16348-gbd809ffb.tar.xz',
1030+
'sha256sum': '8f0d15259a48df6c284ebcfb9dfb0ecba77d8267620aae1ff42d23a2f595ad77',
1031+
'size_bytes': 132425148,
1032+
'generation': 1756377177172203,
10331033
'condition': 'host_os == "mac" and host_cpu == "x64"',
10341034
},
10351035
{
1036-
'object_name': 'Mac_arm64/rust-toolchain-22be76b7e259f27bf3e55eb931f354cd8b69d55f-3-llvmorg-21-init-16348-gbd809ffb.tar.xz',
1037-
'sha256sum': 'd3cb60c6388e86d3d1a0c46c539f1ea0ed1ff48cf907dc21b2cb5ff441b23c03',
1038-
'size_bytes': 120354192,
1039-
'generation': 1750840937280735,
1036+
'object_name': 'Mac_arm64/rust-toolchain-22be76b7e259f27bf3e55eb931f354cd8b69d55f-4-llvmorg-21-init-16348-gbd809ffb.tar.xz',
1037+
'sha256sum': 'ef0f5795e28fde6b0708647500fc94138e9518f173c3e99321cd8918006f606c',
1038+
'size_bytes': 120345408,
1039+
'generation': 1756377179094363,
10401040
'condition': 'host_os == "mac" and host_cpu == "arm64"',
10411041
},
10421042
{
1043-
'object_name': 'Win/rust-toolchain-22be76b7e259f27bf3e55eb931f354cd8b69d55f-3-llvmorg-21-init-16348-gbd809ffb.tar.xz',
1044-
'sha256sum': '7e804f3a8bef4c8ca32d3368ca7564e5c12b684899453d9a522bdd05b1f1df7b',
1045-
'size_bytes': 195000356,
1046-
'generation': 1750840939064273,
1043+
'object_name': 'Win/rust-toolchain-22be76b7e259f27bf3e55eb931f354cd8b69d55f-4-llvmorg-21-init-16348-gbd809ffb.tar.xz',
1044+
'sha256sum': '056cfdae49dd3d73b38ca7ef8245dec2105c7a77b47efba99995552ea1d89f6e',
1045+
'size_bytes': 194943632,
1046+
'generation': 1756377180954050,
10471047
'condition': 'host_os == "win"',
10481048
},
10491049
],

tools/rust/build_bindgen.py

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
from update import (RmTree)
2828

2929
# The git hash to use. See https://github.com/rust-lang/rust-bindgen/tags.
30-
# The current hash below corresponds to version 0.72.0
31-
BINDGEN_GIT_VERSION = 'd0e7d6b5b763e93dd38f9ece05230979ede95a0a'
30+
# The current hash below corresponds to something between 0.72.0 and 0.73.0.
31+
BINDGEN_GIT_VERSION = '2426dd68cd12e0ac022bca18efb9c7d0acd27e12'
3232
BINDGEN_GIT_REPO = ('https://chromium.googlesource.com/external/' +
3333
'github.com/rust-lang/rust-bindgen')
3434

@@ -46,6 +46,16 @@
4646

4747
EXE = '.exe' if sys.platform == 'win32' else ''
4848

49+
# TODO(crbug.com/440975178) Not all tests pass.
50+
EXCLUDED_TESTS = [
51+
'emit_depfile',
52+
'header_allowlist_file_hpp',
53+
'header_blocklist_file_hpp',
54+
'header_constified_enum_module_overflow_hpp',
55+
'header_issue_544_stylo_creduce_2_hpp',
56+
'header_nsbasehashtable_hpp',
57+
'header_typedef_pointer_overlap_h'
58+
]
4959

5060
def FetchNcurseswLibrary():
5161
assert sys.platform.startswith('linux')
@@ -164,6 +174,9 @@ def main():
164174
'--skip-checkout',
165175
action='store_true',
166176
help='skip downloading the git repo. Useful for trying local changes')
177+
parser.add_argument('--skip-test',
178+
action='store_true',
179+
help='skip running tests')
167180
args, rest = parser.parse_known_args()
168181

169182
if not args.skip_checkout:
@@ -212,6 +225,14 @@ def main():
212225
shutil.copy(os.path.join(llvm_dir, 'lib', filename),
213226
os.path.join(install_dir, 'lib'),
214227
follow_symlinks=False)
228+
229+
if not args.skip_test:
230+
test_args = ['test', '--lib', '--bins', '--tests', '--']
231+
for excluded in EXCLUDED_TESTS:
232+
test_args.append('--skip')
233+
test_args.append(excluded)
234+
RunCargo(test_args)
235+
215236
return 0
216237

217238

tools/rust/update_rust.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
# should not be changed manually.
3838
# They are also read by build/config/compiler/BUILD.gn.
3939
RUST_REVISION = '22be76b7e259f27bf3e55eb931f354cd8b69d55f'
40-
RUST_SUB_REVISION = 3
40+
RUST_SUB_REVISION = 4
4141

4242
# The revision of Crubit to use from https://github.com/google/crubit
4343
#

0 commit comments

Comments
 (0)