Fix the build on Ubuntu 20.04 (#31019)

Ubuntu 20.04 doesn't have a new enough version of GStreamer, so
automatically disable media when running on that platform.

This also cleans up the media detection a bit, putting the result in a
`enable-media` variable and moving some of the logic into the build
scripts themselves rather than the platform module.
This commit is contained in:
Martin Robinson 2024-01-07 22:25:22 +01:00 committed by GitHub
parent d0ce48db06
commit 79a0f76d26
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 38 additions and 45 deletions

View file

@ -258,9 +258,7 @@ class MachCommands(CommandBase):
if nocapture:
args += ["--", "--nocapture"]
# We are setting is_build here to true, because running `cargo test` can trigger builds.
env = self.build_env(is_build=True)
env = self.build_env()
return self.run_cargo_build_like_command(
"bench" if bench else "test",
args,