Bug 1324435 - mozboot: Install rust i686-msvc target. r?ted
Windows devs often want to target 32-bit windows. Make this
easier by installing the target for them at mozboot time.
MozReview-Commit-ID: 6gFbFBOqMz8
--- a/python/mozboot/mozboot/mozillabuild.py
+++ b/python/mozboot/mozboot/mozillabuild.py
@@ -34,16 +34,19 @@ class MozillaBuildBootstrapper(BaseBoots
with open(mozillabuild_dir + 'msys/etc/profile.d/profile-rustup.sh', 'wb') as f:
f.write('#!/bash/sh\n')
f.write('if test -n "$MOZILLABUILD"; then\n')
f.write(' WIN_HOME=$(command cd "$HOME" && pwd)\n')
f.write(' PATH="$WIN_HOME/.cargo/bin:$PATH"\n')
f.write(' export PATH\n')
f.write('fi')
+ _, cargo_bin = self.cargo_home()
+ rustup = os.path.join(cargo_bin, 'rustup')
+ self.run([rustup, 'target', 'add', 'i686-pc-windows-msvc'])
finally:
try:
os.remove(rustup_init)
except FileNotFoundError:
pass
def upgrade_mercurial(self, current):
self.pip_install('mercurial')