Fix -p servo lib target build (and fix CI check accordingly) (#43170)

the `-p servo` (formerly libservo) lib target was busted for anyone
genuinely consuming it as a library, but we didn’t catch it because the
CI job designed to check it built `-p servo` with --all-targets, which
unlike library consumers pulls in [dev-dependencies].

this patch fixes the compile error, and fixes the CI check to build `-p
servo` in a more realistic configuration.

Testing: tested in CI, and locally with `cargo build -p servo --locked`
Fixes: #43168

Signed-off-by: delan azabani <dazabani@igalia.com>
This commit is contained in:
shuppy
2026-03-11 17:21:59 +08:00
committed by GitHub
parent 26e724bd83
commit f9fd3968e5
6 changed files with 6 additions and 6 deletions

View File

@@ -288,7 +288,7 @@ jobs:
# We can remove this after upgrading to Rust 1.90, where lld will be the default.
RUSTFLAGS: "-C link-arg=-fuse-ld=lld"
run: |
cargo +${{ steps.msrv.outputs.rust_version }} build -p servo --locked --all-targets
cargo +${{ steps.msrv.outputs.rust_version }} build -p servo --locked
# Runs the underlying job (“workload”) on a self-hosted runner if available.
runner-select-coverage:

View File

@@ -249,4 +249,4 @@ jobs:
toolchain: ${{ steps.msrv.outputs.rust_version }}
- name: Compile libservo with MSRV
run: |
cargo +${{ steps.msrv.outputs.rust_version }} build -p servo --locked --all-targets
cargo +${{ steps.msrv.outputs.rust_version }} build -p servo --locked

View File

@@ -257,4 +257,4 @@ jobs:
toolchain: ${{ steps.msrv.outputs.rust_version }}
- name: Compile libservo with MSRV
run: |
cargo +${{ steps.msrv.outputs.rust_version }} build -p servo --locked --all-targets
cargo +${{ steps.msrv.outputs.rust_version }} build -p servo --locked

View File

@@ -266,4 +266,4 @@ jobs:
toolchain: ${{ steps.msrv.outputs.rust_version }}
- name: Compile libservo with MSRV
run: |
cargo +${{ steps.msrv.outputs.rust_version }} build -p servo --locked --all-targets
cargo +${{ steps.msrv.outputs.rust_version }} build -p servo --locked