diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2022-11-09 18:52:40 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2022-11-10 01:40:14 +0530 |
commit | 5e7cc5dbb2b86e06c3efbb25ffadceaf35ffab9f (patch) | |
tree | e4d06ebaedc1f8bb7fe953cf7f6d9a037c2b9f08 | |
parent | fca8905c34f1588a9e9aba5cb8b0e91dd2585131 (diff) |
cerbero: Fix Rust bootstrap on 64-bit Windows
rustup-init has started to also install the 32-bit MSVC toolchain by
default on 64-bit Windows, so we need to match that and fetch it too.
Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/1006>
-rw-r--r-- | cerbero/bootstrap/rust.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/cerbero/bootstrap/rust.py b/cerbero/bootstrap/rust.py index 2a31383b..438435c5 100644 --- a/cerbero/bootstrap/rust.py +++ b/cerbero/bootstrap/rust.py @@ -84,6 +84,14 @@ class RustBootstrapper(BootstrapperBase): bs_triple = self.config.rust_triple(self.config.arch, self.config.platform, True) if bs_triple not in self.target_triples: self.target_triples.append(bs_triple) + # rustup-init wants to always install both 64-bit and 32-bit + # toolchains, so ensure that we fetch and install both + archs = {Architecture.X86_64, Architecture.X86} + other_arch = (archs - {self.config.arch}).pop() + arch_triple = self.config.rust_triple(other_arch, self.config.platform, + self.config.variants.visualstudio) + if arch_triple not in self.target_triples: + self.target_triples.append(arch_triple) self.fetch_urls = self.get_fetch_urls() self.fetch_urls_func = self.get_more_fetch_urls self.extract_steps = [] |