Skip to content

Add sccache and nsc-backed sccache support to build system. - #5182

Merged
graydon merged 1 commit into
stellar:masterfrom
graydon:sccache
Mar 17, 2026
Merged

graydon merged 1 commit into
stellar:masterfrom
graydon:sccache

Conversation

@graydon

@graydon graydon commented Mar 17, 2026 •

Copy link
Copy Markdown
Contributor

This adds support for sccache in the build system. It allows both local use of sccache and, more interestingly, remote use of a globally-shared, network-based, namespace-provisioned (and tenant-private) cache for anyone building with a namespace account. This should provide significant speedups in both CI and local (re)building.

On my laptop (and network connection, which is granted fairly fast) this rebuilds core (including all sub-sorobans) in 1m53s, against the remote cache in chicago (I'm in vancouver).

Copilot AI review requested due to automatic review settings March 17, 2026 06:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for sccache as an alternative to ccache in the Stellar Core build system. It also adds deeper integration with Namespace (nsc) for remote, shared caching backed by WebDAV storage, which could speed up both CI and local rebuilds.

Changes:

  • Adds --enable-sccache and --enable-nsc-sccache configure flags that set up sccache for C/C++ (via CC/CXX wrapping) and Rust (via RUSTC_WRAPPER), with mutual exclusion against ccache and AFL.
  • When --enable-nsc-sccache is used, configure runs nsc cache sccache setup, starts a persistent sccache daemon with the remote credentials, and verifies WebDAV connectivity.
  • Propagates RUSTC_WRAPPER through Makefile.am to all cargo invocations (cxxbridge install, librust builds, soroban builds).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
configure.ac Adds sccache/nsc-sccache configure options, daemon lifecycle management, CC/CXX/RUSTC_WRAPPER setup, AFL incompatibility check, and propagation to sub-configures.
src/Makefile.am Defines RUSTC_WRAPPER from configure substitution and passes it as an environment variable to all cargo invocations.

Comment thread configure.ac Resolved
@graydon
graydon enabled auto-merge March 17, 2026 08:05
@graydon
graydon added this pull request to the merge queue Mar 17, 2026
Merged via the queue into stellar:master with commit 9d9531a Mar 17, 2026
48 of 51 checks passed
@graydon
graydon deleted the sccache branch March 17, 2026 09:00
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.

3 participants