Skip to content

build: build WebRTC with autoninja - #357

Merged
devopvoid merged 1 commit into
mainfrom
build/autoninja-siso
Oct 12, 2026
Merged

devopvoid merged 1 commit into
mainfrom
build/autoninja-siso

Conversation

@devopvoid

Copy link
Copy Markdown
Owner

Follows up on the discuss-webrtc PSA WebRTC's build system is switching from Ninja to Siso. WebRTC builds with Siso now, and plain Ninja has been unsupported since the end of September 2025. Our WebRTC build script still called ninja -C directly.

Changes

webrtc-jni/src/main/cpp/dependencies/webrtc/CMakeLists.txt runs autoninja -C in place of ninja -C, in all four places. autoninja picks the tool the output directory is set up for:

  • New output directory (a fresh checkout, CI without a cached build): Siso, run offline because no remote execution is configured. WebRTC's .gn sets use_siso = true.
  • Output directory Ninja already built (existing local checkouts): Ninja, until gn clean is run on it, so nothing is rebuilt. autoninja prints a suggestion to run gn clean.

Depot_tools' plain ninja wrapper refuses a directory Siso has built, so the build must not mix the two. All four invocations now use autoninja. The libc++ comment and the build-failure warning no longer name Ninja.

Validation (windows-x86_64, M152)

  • New directory: a separate output directory with the same GN args, built the way the script does (gn gen, autoninja -C dir, then the api/video utility targets). It built with Siso: the directory holds .siso_deps and no .ninja_deps, and no command failed. The resulting obj/webrtc.lib is the same size as the Ninja build's (96,542,692 bytes), and the api/video objects the script re-archives are there.
  • Existing directory: autoninja -C out/x64 stays with Ninja and reports ninja: no work to do.
  • Not tested here: the macOS (:default + SDK targets) and Linux (libc++ archive targets) paths. Siso reads the same build.ninja, so the same targets resolve, but CI on a cold cache is what will show it.

WebRTC moved its build from Ninja to Siso, and plain Ninja has been
unsupported since the end of September 2025. The build now runs autoninja,
which picks the tool the output directory is set up for: Siso, run offline,
for a new one, and Ninja for one that Ninja built until "gn clean" is run on
it, so existing checkouts keep building without a full rebuild.
@devopvoid
devopvoid merged commit b7b7399 into main Oct 12, 2026
22 checks passed
@devopvoid
devopvoid deleted the build/autoninja-siso branch October 12, 2026 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant