aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo/command_base.py
diff options
context:
space:
mode:
authorSimon Sapin <simon.sapin@exyr.org>2020-01-02 15:38:32 +0100
committerSimon Sapin <simon.sapin@exyr.org>2020-01-02 15:48:11 +0100
commitf93c03cda345fb746ff3bb5b92b86536a0ee9236 (patch)
treecb103d981b3280b089b5e8a5d5baf30340babb9a /python/servo/command_base.py
parent1110cac184d15ba24f8f94cb21e258de4ba5be76 (diff)
downloadservo-f93c03cda345fb746ff3bb5b92b86536a0ee9236.tar.gz
servo-f93c03cda345fb746ff3bb5b92b86536a0ee9236.zip
Install `rust-docs` rustup component in `./mach doc`
Diffstat (limited to 'python/servo/command_base.py')
-rw-r--r--python/servo/command_base.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/python/servo/command_base.py b/python/servo/command_base.py
index f42a36fc738..c32219c184d 100644
--- a/python/servo/command_base.py
+++ b/python/servo/command_base.py
@@ -994,7 +994,7 @@ install them, let us know by filing a bug!")
return True
return False
- def ensure_bootstrapped(self, target=None):
+ def ensure_bootstrapped(self, target=None, rustup_components=None):
if self.context.bootstrapped:
return
@@ -1011,10 +1011,12 @@ install them, let us know by filing a bug!")
if toolchain not in check_output(["rustup", "toolchain", "list"]):
check_call(["rustup", "toolchain", "install", "--profile", "minimal", toolchain])
- if "rustc-dev" not in check_output(
+ installed = check_output(
["rustup", "component", "list", "--installed", "--toolchain", toolchain]
- ):
- check_call(["rustup", "component", "add", "--toolchain", toolchain, "rustc-dev"])
+ )
+ for component in set(rustup_components or []) | {"rustc-dev"}:
+ if component not in installed:
+ check_call(["rustup", "component", "add", "--toolchain", toolchain, component])
if target and "uwp" not in target and target not in check_output(
["rustup", "target", "list", "--installed", "--toolchain", toolchain]