Bug 1837076 - Allow missing rust-analysis for non-searchfox targets. r=firefox-build-system-reviewers,sergesanspaille

Differential Revision: https://phabricator.services.mozilla.com/D180145
This commit is contained in:
Mike Hommey 2023-06-08 05:59:52 +00:00
parent ca2f2016f6
commit b8f214ac31

View File

@ -247,9 +247,21 @@ def fetch_std(manifest, targets):
stds = []
for target in targets:
stds.append(fetch_package(manifest, "rust-std", target))
# not available for i686
if target != "i686-unknown-linux-musl":
stds.append(fetch_package(manifest, "rust-analysis", target))
analysis = fetch_optional(manifest, "rust-analysis", target)
if analysis:
stds.append(analysis)
else:
log(f"Missing rust-analysis for {target}")
# If it's missing for one of the searchfox targets, explicitly
# error out.
if target in (
"x86_64-unknown-linux-gnu",
"x86_64-apple-darwin",
"x86_64-pc-windows-msvc",
"thumbv7neon-linux-androideabi",
):
raise AssertionError
return stds