Skip to content

v0.21.0

Latest

Choose a tag to compare

@github-actions github-actions released this 04 Dec 23:40

sccache 0.21.0

Summary

sccache 0.21.0 can cache ThinLTO code generation at link time, adds a fallback bucket to the GCS
cache, and lets each compile set its own base directories. It also fixes a few cache keys, fixes a
long-lived server that could stall, and keeps sccache's own log lines off the compiler's stderr.

Highlights:

  • ThinLTO: with clang and lld, sccache --dtlto can be the Distributed ThinLTO distributor.
    It runs each backend job as an ordinary compile and caches it, keyed on the bitcode module, its
    index and every module it imports from. See docs/ThinLTO.md (#3045).
  • GCS: SCCACHE_GCS_FALLBACK_BUCKET (or a [cache.gcs.fallback] table) names a read-only
    bucket to look up when the main bucket misses. Hits are copied into the main bucket. In Firefox
    CI, 22% of the linux64 misses were already in the other region's bucket (#3093).
  • Base directories: SCCACHE_BASEDIRS is also read from each compile's environment and
    overrides the server's value for that compile, so each checkout can set its own root (#3065).
    For Rust, the Cargo build directory is stripped from env-dep values such as OUT_DIR, so a
    shared build.build-dir outside the checkout no longer prevents hits (#3051).
  • Cache-key correctness: in preprocessor cache mode, headers that use __DATE__ or
    __TIMESTAMP__ are now compared by content, so a same-size edit no longer gets the old object
    (#2954). clang sample profiles and profile lists are hashed by content (#3060). CPATH,
    C_INCLUDE_PATH, CPLUS_INCLUDE_PATH, OBJC_INCLUDE_PATH and OBJCPLUS_INCLUDE_PATH are part
    of the key (#2799). Compiler processes now get only the client's environment, not the server's
    (#3016).
  • Reliability: when the server kills a rustc that holds jobserver tokens, it now switches to a
    fresh pool. Before, a long-running server leaked those tokens until no compile could start
    (#3047). SCCACHE_IGNORE_SERVER_IO_ERROR=1 now also falls back to the local compiler when
    sccache can't connect to or start the server (#2756). When sccache wraps a compiler, its
    SCCACHE_LOG output goes to SCCACHE_ERROR_LOG instead of the stderr it shares with the
    compiler. That stray output used to break autotools feature probes, for example by dropping
    -fPIC (#3088). --show-stats reports direct-mode hits separately (#2860).
  • Compiler support: clang -Xclang -fopenmp (#3062) and -Xclang -fno-cxx-modules (#2717),
    clang/clang-cl instrumentation generation with an output path (#3074), MSVC /Zl (#3059), and
    nvcc -G no longer takes the next argument as its value (#3081).

Welcome to 7 new contributors!

Features

Compiler support

Fixes

  • preprocessor cache: compare time-macro headers by content by @lenamonj in #2954
  • clang: hash the contents of sample profiles and profile lists by @Felixoid in #3060
  • Add CPATH to the list of cached env vars by @fheinecke in #2799
  • mock_command: add new_command_with_env so compiler children get only the client environment by @loganrosen in #3016
  • rust: with basedirs set, strip the Cargo build dir from env-dep values by @art-shen in #3051
  • jobserver: replace the pool when a compiler dies holding tokens by @caniko in #3047
  • fall back locally on server connection/startup failures by @ken-matsui in #2756
  • logging: send the wrapper client's log records to SCCACHE_ERROR_LOG by @jetm in #3088
  • sccache-dist: accept a --secret-key value that starts with a hyphen by @puretechteam in #3078
  • docs: list the S3 permissions sccache needs by @puretechteam in #3063

Dependencies

Tests & CI

Cleanup

New Contributors

Full Changelog: v0.20.1...v0.21.0