aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo/post_build_commands.py
diff options
context:
space:
mode:
authorMartin Robinson <mrobinson@igalia.com>2023-08-01 16:44:57 +0200
committerGitHub <noreply@github.com>2023-08-01 14:44:57 +0000
commitfef332f38552ae8af83cf69993dd6aabdebffd6a (patch)
tree577bca564e78c7b8a2e02e7e9b3431518533edae /python/servo/post_build_commands.py
parent4061d13ba6d06f775e1a4a0fe50662ea3b16d2fa (diff)
downloadservo-fef332f38552ae8af83cf69993dd6aabdebffd6a.tar.gz
servo-fef332f38552ae8af83cf69993dd6aabdebffd6a.zip
Make rustup a requirement and switch to `rust-toolchain.toml` (#30056)
This change makes rustup a requirement for building Servo with `./mach` and switches to the newer `rust-toolchain.toml` format. The goal here is to make mach builds more similar to non-mach builds. - The new format allows listing the required components, removing some of the complexity from our mach scripts. - This means we must raise the required version of rustup to 1.23. The current version is 1.26. - We no longer wrap every call to cargo and rustc in "rustup run" calls as both cargo and rustc will take care of installing and using all necessary components specified in `rust-toolchain.toml` when run inside the project directory.
Diffstat (limited to 'python/servo/post_build_commands.py')
-rw-r--r--python/servo/post_build_commands.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/python/servo/post_build_commands.py b/python/servo/post_build_commands.py
index a5d76134c4f..a9944775dda 100644
--- a/python/servo/post_build_commands.py
+++ b/python/servo/post_build_commands.py
@@ -244,10 +244,8 @@ class PostBuildCommands(CommandBase):
help="Command-line arguments to be passed through to cargo doc")
@CommandBase.build_like_command_arguments
def doc(self, params: List[str], **kwargs):
- self.ensure_bootstrapped(rustup_components=["rust-docs"])
- rustc_path = check_output(
- ["rustup" + BIN_SUFFIX, "which", "--toolchain", self.rust_toolchain(), "rustc"]
- ).decode('utf-8')
+ self.ensure_bootstrapped()
+ rustc_path = check_output(["rustup" + BIN_SUFFIX, "which", "rustc"], cwd=self.context.topdir)
assert path.basename(path.dirname(rustc_path)) == "bin"
toolchain_path = path.dirname(path.dirname(rustc_path))
rust_docs = path.join(toolchain_path, "share", "doc", "rust", "html")