mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
mach: on Windows, opt into MSVC target for all uses of rust_toolchain()
This commit is contained in:
parent
e56e49e98f
commit
d4da65d149
1 changed files with 5 additions and 4 deletions
|
@ -352,6 +352,10 @@ class CommandBase(object):
|
||||||
filename = path.join(self.context.topdir, "rust-toolchain")
|
filename = path.join(self.context.topdir, "rust-toolchain")
|
||||||
with open(filename) as f:
|
with open(filename) as f:
|
||||||
self._rust_toolchain = f.read().strip()
|
self._rust_toolchain = f.read().strip()
|
||||||
|
|
||||||
|
if platform.system() == "Windows":
|
||||||
|
self._rust_toolchain += "-x86_64-pc-windows-msvc"
|
||||||
|
|
||||||
return self._rust_toolchain
|
return self._rust_toolchain
|
||||||
|
|
||||||
def call_rustup_run(self, args, **kwargs):
|
def call_rustup_run(self, args, **kwargs):
|
||||||
|
@ -370,10 +374,7 @@ class CommandBase(object):
|
||||||
print("rustup is at version %s.%s.%s, Servo requires 1.11.0 or more recent." % version)
|
print("rustup is at version %s.%s.%s, Servo requires 1.11.0 or more recent." % version)
|
||||||
print("Try running 'rustup self update'.")
|
print("Try running 'rustup self update'.")
|
||||||
return 1
|
return 1
|
||||||
toolchain = self.rust_toolchain()
|
args = ["rustup" + BIN_SUFFIX, "run", "--install", self.rust_toolchain()] + args
|
||||||
if platform.system() == "Windows":
|
|
||||||
toolchain += "-x86_64-pc-windows-msvc"
|
|
||||||
args = ["rustup" + BIN_SUFFIX, "run", "--install", toolchain] + args
|
|
||||||
else:
|
else:
|
||||||
args[0] += BIN_SUFFIX
|
args[0] += BIN_SUFFIX
|
||||||
return call(args, **kwargs)
|
return call(args, **kwargs)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue