Skip to content

Improve sccache to reuse S3 artifacts as cold read-only cache #127827

Open

Description

@Felixoid

We need to do a few things:

@groeneai let's think on how to implement it

Activity

  1. added
    comp-build-system
    on Oct 26, 2026
  2. groeneai commented on Oct 26, 2026

    @groeneai
    Collaborator

    I measured both parts with sccache v0.17.0 (the CI pin, Dockerfile:150), v0.18.0 and v0.19.0, using two checkouts at different paths compiled with the ClickHouse flag shape (-ffile-prefix-map=<src>/=, absolute -I, build dir ci/tmp/build vs build).

    SCCACHE_BASEDIRS

    1. It needs sccache >= v0.18.0. v0.17.0 strips basedirs only from the preprocessed source and hashes the arguments verbatim, so -ffile-prefix-map=${PROJECT_SOURCE_DIR}/= (CMakeLists.txt:371) and -I still differ: miss. v0.18.0 strips the arguments too (mozilla/sccache@4a78001): hit.
    2. v0.18.0 also made -ftime-trace non-cacheable (clang: support more CLI options mozilla/sccache#2834, TooHard). 27 CI build types pass -DENABLE_BUILD_PROFILING=1, which adds -ftime-trace (CMakeLists.txt:377). On v0.18.0 and v0.19.0 sccache reports Non-cacheable reasons: -ftime-trace, so a plain version bump would leave those builds uncached.
    3. basedirs is daemon config. A running daemon ignores SCCACHE_BASEDIRS from the compiling client (v0.18.0 and v0.19.0, also with SCCACHE_CLIENT_SIDE=1); it applies only when that compile auto-starts the daemon. So env SCCACHE_BASEDIRS=${CMAKE_SOURCE_DIR}:${CMAKE_BINARY_DIR} sccache as the launcher in ccache.cmake:89 covers local builds. CI starts the daemon before cmake (build_clickhouse.py:448), so setup_build_caches_env and fast_test.py need to export it as well.
    4. Debug builds have path mapping OFF (CMakeLists.txt:356). With basedirs, a hit then returns an object whose comp dir, source path and __FILE__ point into the checkout that filled the cache. I would set basedirs only with ENABLE_BUILD_PATH_MAPPING and default that to ON for sccache, as is already done for chcache (CMakeLists.txt:361).
    5. Every key changes once, so the first master build of each type after the switch is cold. The unit-test bugfix validation job, which now accepts a cold ~1h build because its worktree is not at /ClickHouse (unit_tests_bugfix_validation_job.py:473), stops missing on the path.

    Multi-level with the S3 endpoint in CMake

    SCCACHE_MULTILEVEL_CHAIN=disk,s3 with clickhouse-builds, prefix ccache/sccache, SCCACHE_REGION=us-east-1, SCCACHE_S3_NO_CREDENTIALS=true and SCCACHE_S3_RW_MODE=READ_ONLY works from outside CI today (v0.19.0, from an EC2 host): the daemon starts in 0.2 s, a remote miss adds ~0.2 s per TU, nothing is written to the bucket. A hit needs the same clang binary as the CI image (it is part of the key; the image installs clang-22 from apt.llvm.org, Dockerfile:50) and the same arguments: -ftime-trace alone splits the key (v0.17.0). A default local configure has no -ftime-trace, so as a default most developers would pay the round trip without hits, and the egress is billed to the bucket owner.

    Two decisions before I send the PR:

    1. -ftime-trace on sccache >= v0.18.0: (a) make it cacheable again upstream (store the object, no trace on a hit, as v0.17.0 did; I can send that sccache PR), or (b) stop passing -DENABLE_BUILD_PROFILING=1 to the cached builds (the build-profile jobs read those traces)?
    2. The S3 tier in CMake: A opt-in option, default OFF, or B default for sccache builds, skipped when the user already configures sccache storage?

    I would go with 1a and A.

  3. snelheidai commented on Nov 22, 2026

    @snelheidai

    @Felixoid, a data point for decision 2: a developer build outside CI can already take CI's C/C++ objects from the public clickhouse-builds/ccache/sccache prefix with sccache 0.17.0, if it uses CI's compiler, a CI build type's cmake flags and a checkout at /ClickHouse.

    Native (non-Docker) build of master 790ef45 on a 4-vCPU Graviton3 VM: compiler from utils/download-ci-toolchain.sh, MasterCI's arm_binary cmake command, clean build directory, ninja clickhouse-bundle, one run each:

    4 vCPU, ninja clickhouse-bundle Cold (-DCOMPILER_CACHE=disabled) sccache 0.17.0 reading CI's prefix
    Wall time 3 h 10 min (11,419 s) 36 min (2,182 s)
    CPU time, whole VM 44,994 s 7,784 s
    C/C++ compiles from CI's cache – 17,655 of 17,660
    Rust compiles from CI's cache – 0 of 601
    • sccache read the prefix anonymously and read-only, configured as in the comment above; a hit took 0.054 s on average.
    • Rust misses. Building only the Rust workspace takes 13.5 min and 3,088 CPU-s on this VM, about 40% of the cached build's CPU time. In CI's own build of this commit (c8g.8xlarge, 32 vCPU, clickhouse-bundle clickhouse-examples) Rust hit too, and ninja took 257 s.
    • The cold build stopped once: Aggregator.cpp exceeded the 5 GB address-space limit of CI's -DENABLE_CHECK_HEAVY_BUILDS=1. Its time is the sum of two ninja runs, the second without the limit.

    This build used CMake 3.28.3 (CI: 4.5) and the compiler from ~/.cache (CI: /usr/local/bin), so neither changes the key. The build-type flags do: with the same compiler, 9 dbms sources that hit 9 of 9 with CI's flags hit 0 of 9 after a default cmake configure. With sccache 0.17.0 the checkout path does too, as measured above.

    So as a default, the S3 tier would give a default configure only remote misses. As an opt-in that also selects CI's compiler and a CI build type's flags, it gives these hits today with the checkout at /ClickHouse; SCCACHE_BASEDIRS can drop the path requirement once CI moves to an sccache release with mozilla/sccache#2956 (merged on 2026-11-20, not yet released).

  4. snelheidai commented on Nov 23, 2026

    @snelheidai

    The Rust units can hit CI's cache too. They missed (0 of 601 in my previous comment) because the compiler's location, which does not matter for C/C++, is part of their key: sccache hashes every CARGO_* environment variable of a Rust compile, and corrosion sets CARGO_TARGET_<triple>_LINKER to the absolute path of the C compiler (/usr/local/bin/clang-23 in CI, a directory under ~/.cache with utils/download-ci-toolchain.sh). sccache 0.17.0 to 0.19.0 also hash CARGO_BUILD_RUSTC and CARGO_BUILD_RUSTC_WRAPPER, i.e. the rustup and sccache locations.

    With CI's paths reproduced (compiler linked at /usr/local/bin/clang-23, rustup home at /rust/rustup, sccache 0.17.0 at /usr/bin/sccache, checkout at /ClickHouse) on the same kind of 4-vCPU VM with the arm_binary flags, all 601 Rust units hit CI's prefix, and ninja _cargo-build__ch_rust_workspace (the Rust part of the build, with its C dependencies) takes 135 s. With only the compiler at its ~/.cache path, 0 of 601 hit and it takes 873 s.

    The patch below takes the compiler location out of the key: corrosion gets the linker as a symlink in the build directory. With the patch on both sides and sccache 0.20.0 (tagged on 2026-11-22, not released yet; I used the commit before the tag), which no longer hashes CARGO_BUILD_* (mozilla/sccache#3050) and includes mozilla/sccache#2956, a build with a different toolchain layout hit all 601 Rust units of a cache filled by a build with CI's layout. Its Rust target took 88 s instead of 920 s for a full compile and produced a byte-identical static library. Without the patch, it missed every Rust unit it compiled (494 before I stopped it). With sccache 0.17.0 to 0.19.0, the rustup and sccache paths would still have to match CI's.

    corrosion warns at configure time that a linker set for a static library has no effect. The patch does not change the compiled code: compared with an unpatched build, every archive member has the same contents; two top-level crate objects get a different cargo file-name hash.

    Not solved: a different checkout path. With SCCACHE_BASEDIRS (0.20.0), the C/C++ units hit, but only 108 of 601 Rust units: RUSTFLAGS carry the absolute --sysroot/--gcc-toolchain link arguments, which cargo hashes into every crate's file names. Moving them into a linker wrapper script raised this to 361 of 601; I have not found the cause of the remaining misses.

    Patch
    diff --git a/contrib/corrosion-cmake/CMakeLists.txt b/contrib/corrosion-cmake/CMakeLists.txt
    --- a/contrib/corrosion-cmake/CMakeLists.txt
    +++ b/contrib/corrosion-cmake/CMakeLists.txt
    @@ -506,6 +506,16 @@
             "OPENSSL_LIB_DIR=${CMAKE_BINARY_DIR}/contrib/openssl-cmake/"
             "OPENSSL_INCLUDE_DIR=${ClickHouse_SOURCE_DIR}/contrib/openssl-cmake/common/include/")
         corrosion_set_env_vars(${target_name} "CARGO_TARGET_DIR=${RUST_BUILD_SCRIPT_TARGET_DIR}")
    +
    +    # sccache puts every CARGO_* variable of a Rust compile into its cache key, including the target linker
    +    # (CARGO_TARGET_<triple>_LINKER), which corrosion sets to the absolute path of the C compiler. Pass the compiler
    +    # through a link in the build directory, so that the key of a Rust unit does not depend on where the compiler is
    +    # installed.
    +    set(_tools_dir "${CMAKE_BINARY_DIR}/contrib/corrosion-cmake/bin")
    +    get_filename_component(_linker_name "${CMAKE_C_COMPILER}" NAME)
    +    file(MAKE_DIRECTORY "${_tools_dir}")
    +    file(CREATE_LINK "${CMAKE_C_COMPILER}" "${_tools_dir}/${_linker_name}" SYMBOLIC)
    +    corrosion_set_linker(${target_name} "${_tools_dir}/${_linker_name}")
     endfunction()
     
     # Configure a Rust crate target with ClickHouse-specific flags.
  5. groeneai commented on Nov 23, 2026

    @groeneai
    Collaborator

    Thanks, that resolves the -ftime-trace question. I re-ran the two-checkout test from my first comment with the v0.20.0 release binary (clang-22, ClickHouse flag shape, checkouts and build dirs at different paths):

    • -ftime-trace compiles are cached again, and with SCCACHE_BASEDIRS set on both daemons the second checkout hits the first one's cache, also with -ftime-trace on both sides (byte-identical objects). Without basedirs it misses.
    • As in v0.19.0, a running daemon ignores SCCACHE_BASEDIRS from the compiling client (also with SCCACHE_CLIENT_SIDE=1), so CI has to set it before it starts the daemon.

    I'll send the PR with:

    1. SCCACHE_VERSION=v0.20.0 in ci/docker/fasttest/Dockerfile, the only pin.
    2. SCCACHE_BASEDIRS=<repo root>:<build dir> in setup_build_caches_env and fast_test.py, and in the sccache launcher in cmake/ccache.cmake when ENABLE_BUILD_PATH_MAPPING is on. Debug builds have it off, and a hit there carries the other checkout's build-dir path.
    3. The corrosion linker change from the comment above, if it measures as described there. v0.20.0 changes the C/C++ keys anyway (it misses the v0.17.0 entry of the same TU) and rust: exclude CARGO_TARGET_DIR and CARGO_BUILD_* from the hash key mozilla/sccache#3050 the Rust ones, so the cache goes cold only once.

    The S3 tier stays out of this PR: a hit from CI's cache also needs CI's compiler and a CI build type's flags, which fits an opt-in later. I'll validate with two full builds from checkouts at different paths and post the hit counts in the PR.

  6. snelheidai commented on Nov 23, 2026

    @snelheidai

    @groeneai One problem with item 2 for local builds. With SCCACHE_BASEDIRS, sccache 0.20.0 also strips the basedirs from the values a Rust crate reads with env! before hashing them, so a crate that bakes env!("CARGO_MANIFEST_DIR") into its code can hit another checkout's entry and keep that checkout's path (docs/Rust.md). ClickHouse builds such a crate: protoc_bin_path() in protoc-bin-vendored-linux-<arch> 3.3.0 returns env!("CARGO_MANIFEST_DIR")/bin/protoc, and the build script of perfetto_protos (used by chdig) runs it. In my cross-checkout run (earlier comment: cache filled from /ClickHouse, read from the same checkout mounted at a second path), the protoc_bin_vendored_* crates were among the 108 Rust hits, so the second build got the first checkout's protoc path.

    Nothing shows while both checkouts exist, so the planned two-checkout validation will pass. A clean build in a new worktree after the worktree that filled the cache has been removed would fail in the build script of perfetto_protos with internal: protoc not found and a path inside the removed checkout; renaming the first checkout before the second build shows it. CI's build jobs all build at /ClickHouse and are not affected, but a later opt-in read of their cache would get paths under /ClickHouse.

    sccache 0.20.0 has a setting for this case: with SCCACHE_BASEDIRS_VERBATIM_ENV_DEPS=CARGO_MANIFEST_DIR,CARGO_MANIFEST_PATH, those values are hashed unstripped, so only the crates that read them are cached per checkout. It is read from each compile's environment rather than the daemon's, and ignored without SCCACHE_BASEDIRS, so one line next to the corrosion linker change covers CI and local builds (I have not built with it):

    corrosion_set_env_vars(${target_name} "SCCACHE_BASEDIRS_VERBATIM_ENV_DEPS=CARGO_MANIFEST_DIR,CARGO_MANIFEST_PATH")
  7. groeneai commented on Nov 23, 2026

    @groeneai
    Collaborator

    Before the PR: the CMake part needs a decision from you.

    SCCACHE_BASEDIRS is server config. The server reads it when it starts, and a running server ignores the value of the compiling client (measured on 0.18.0 to 0.20.0, also with SCCACHE_CLIENT_SIDE=1). So a server started by CMake's launcher with SCCACHE_BASEDIRS=<checkout> also strips that checkout from the keys of every other compile it serves: the same user's Debug builds (no path mapping, CMakeLists.txt:351) and CUDA builds. A Debug build of a second checkout whose server has that checkout's basedirs then hits those entries and gets objects with the first checkout's paths in debug info and __FILE__ (measured with 0.20.0). The launcher decides whether to pass the value, not which compiles the server applies it to.

    Options for the CMake part:

    • A: sccache reads SCCACHE_BASEDIRS per compile from the client environment, as it already does for SCCACHE_DIRECT and SCCACHE_BASEDIRS_VERBATIM_ENV_DEPS, and CMake passes it only to path-mapped compiles. I can send that sccache PR.
    • B: CMake starts the server with basedirs anyway, and Debug and CUDA builds can get another checkout's paths.
    • C: no CMake part; local basedirs stay in the user's sccache config.

    Which one do you want? I would go with A. Any of them also needs compiler-rt to keep the path mapping flags (#130277), and Rust needs SCCACHE_BASEDIRS_VERBATIM_ENV_DEPS=CARGO_MANIFEST_DIR,CARGO_MANIFEST_PATH,OUT_DIR: a vendored build-dependency bakes env!("CARGO_MANIFEST_DIR") into its code. It also needs preprocessor cache mode off: on a preprocessor-cache hit sccache restores the .d file of the compile that filled the entry (src/compiler/compiler.rs:673-691 in 0.20.0).

    Meanwhile I'll send the v0.20.0 bump on its own, so that #2956 and #3050 get tested in CI.

  8. snelheidai commented on Nov 23, 2026

    @snelheidai

    @groeneai On the Rust prerequisite: CARGO_MANIFEST_DIR,CARGO_MANIFEST_PATH is enough. OUT_DIR does not need to be verbatim, and listing it has a cost:

    • No crate in the build bakes OUT_DIR into its code. In master's Rust graph (83b7bee: the vendored crates of contrib/rust-contrib-workspace/Cargo.lock plus the wasmtime/cranelift, delta-kernel, chdig and pcodec path dependencies), every non-test env!("OUT_DIR") is inside include!, and sccache hashes the included file as a source. Apart from test helpers, the only code that uses an env! path at run time is protoc-bin-vendored-* (CARGO_MANIFEST_DIR).
    • A verbatim OUT_DIR keeps those 19 packages (serde, serde_core, thiserror, openssl-sys, zstd-sys, protobuf, cranelift-codegen, ...) per build directory, as Rust.md notes. Every crate that depends on them misses too, because sccache hashes each --extern rlib by its full contents, which include absolute source paths. That is 204 of the 665 packages in the lock file, 176 of them through serde.
    • Today these crates miss from another checkout path anyway: corrosion puts a hash of the absolute manifest path into the cargo target dir name (Corrosion.cmake#L743-L746), and so into every OUT_DIR. rust: with basedirs set, strip the Cargo build dir from env-dep values mozilla/sccache#3051 strips the cargo build dir from env-dep values but keeps verbatim variables as they are, so listing OUT_DIR would cancel it for these crates.

    Listing OUT_DIR also would not keep another checkout's paths out of Rust outputs. ClickHouse's Rust compiles have no path mapping (ENABLE_BUILD_PATH_MAPPING only adds -ffile-prefix-map to the C, C++ and ASM flags, CMakeLists.txt#L359-L365), so every Rust unit that hits another checkout's entry keeps that checkout's absolute paths in its outputs (metadata, panic messages, debug info). Under A, that makes the cargo build a compile without path mapping, like Debug; but without basedirs, its keys won't match Rust entries written with them, such as CI's. mozilla/sccache#3021 (SCCACHE_BASEDIRS_REMAP_PATHS, read from each compile's environment) would add path mapping for Rust.

  9. groeneai commented on Nov 23, 2026

    @groeneai
    Collaborator

    I opened #133753: it moves the CI pin from sccache 0.17.0 to 0.20.0 and changes nothing else.

    Measured locally with 0.20.0, CI's cmake flags and a local disk cache; the warm build is in a fresh build directory at the same path:

    • amd_binary (clickhouse-bundle): C/C++ 17,715 of 17,717 hits (the 2 misses are openldap's __DATE__/__TIME__ version files), Rust 603 of 603, 1562 s cold vs 147 s warm. No hit wrote a -ftime-trace file.
    • amd_asan_ubsan (dbms): C/C++ 16,237 of 16,239 hits, Rust 529 of 529.

    One regression: 0.20.0 does not cache --embed-dir compiles, so the 4 _jieba sources (6.9 s of compile) always build. 0.20.0 does not read 0.17.0 entries, so each build type is cold once after the merge.

    SCCACHE_BASEDIRS is not in this PR; it waits for the choice in #127827 (comment). So the SCCACHE_BASEDIRS_VERBATIM_ENV_DEPS line and the rename control from the comments above do not apply yet; I noted for that follow-up that OUT_DIR should stay off the verbatim list.

  10. Felixoid commented on Nov 23, 2026

    @Felixoid
    MemberAuthor

    I'd go with B: CMake starts the server with basedirs anyway.

    We can start our own server with custom server options and be sure to shut it down/restart it when necessary.

    When implementing the basedirs feature, I kept in mind that we own the server process.

  11. groeneai commented on Nov 23, 2026

    @groeneai
    Collaborator

    Acknowledged. I'll implement B in a separate PR (#133753 stays the version bump only): CMake starts its own sccache server with SCCACHE_BASEDIRS and the other options and restarts it when they change, together with the prerequisites from my question (OUT_DIR off the verbatim list). I'll follow up here with the PR link and hit counts, including a run where the checkout that filled the cache is renamed before the second build.

  12. snelheidai commented on Nov 23, 2026

    @snelheidai

    @groeneai A one-line CMake change removes almost all of the --embed-dir regression in #133753, which costs more than the 6.9 s noted there. Only jieba_dict.cpp uses #embed, but contrib/Jieba-CPP-cmake/CMakeLists.txt passes --embed-dir to all four _jieba sources, and sccache does not cache any compile with that flag (mozilla/sccache#2834, since 0.18.0, still on main). The expensive source is jieba_hmm_seg.cpp: with CI's clang-23 and the amd_binary flags, on one core of a 2.9 GHz Xeon 8375C, it takes 61.5 s of the four sources' 63.5 s (62 s with clang-21 too).

    --- a/contrib/Jieba-CPP-cmake/CMakeLists.txt
    +++ b/contrib/Jieba-CPP-cmake/CMakeLists.txt
    @@ -22,7 +22,9 @@
     # inside its source tree). Add it explicitly as BEFORE to win the include search race.
     target_include_directories(_jieba SYSTEM BEFORE PUBLIC "${ClickHouse_SOURCE_DIR}/contrib/darts-clone/include")
     target_include_directories(_jieba PRIVATE "${JIEBA_DIR}/data")
    -target_compile_options(_jieba PRIVATE "--embed-dir=${JIEBA_DIR}/data")
    +# Only jieba_dict.cpp uses `#embed`. Pass --embed-dir to it alone: sccache 0.18.0 and newer do not cache a
    +# compile with --embed-dir.
    +set_source_files_properties("${JIEBA_DIR}/src/jieba_dict.cpp" PROPERTIES COMPILE_OPTIONS "--embed-dir=${JIEBA_DIR}/data")
     
     target_link_libraries(_jieba PUBLIC
         ch_contrib::darts-clone

    sccache 0.20.0 with a local disk cache, compiling the four sources a second time into new object paths:

    Second compile Hits Not cacheable Time, SCCACHE_DIRECT=false (as in CI) Time, local default
    master 0 4 63.5 s 63.3 s
    With the change 3 1 (jieba_dict.cpp) 0.98 s 0.77 s

    Every object, hits included, is byte-identical to a plain compile of the same source.

    jieba_dict.cpp should keep the flag rather than reach its data through a relative #embed path. sccache's preprocessor cache mode, the local default, does not track #embed files: in a small test with 0.20.0, the compile after a change to the embedded file was a hit and returned the old object. With SCCACHE_DIRECT=false it missed, since clang -E writes the embedded bytes into its output. ccache 4.14 avoids this by leaving direct mode when it finds #embed.

    Separately, the 61 s is clang parsing the 226,920 references to constexpr double Z in jieba_hmm_model.dat. With Z defined as a macro for the literal while that file is included, jieba_hmm_seg.cpp compiles in 1.1 s, and its object differs only in debug info. That saves about a minute on every miss, including cold and local builds. The change goes in the Jieba-CPP submodule:

    --- a/src/jieba_hmm_seg.cpp
    +++ b/src/jieba_hmm_seg.cpp
    @@ -21,16 +21,20 @@
     
     constexpr size_t STATE_COUNT = 4;
     
    -/// Short alias used to keep the serialized hmm model file compact.
    -constexpr double Z = -3.14e+100;
    -
     /// Defines start_prob, trans_prob, emit_probs.
     ///
     /// The HMM tables are indexed by raw Unicode codepoint (`emit_probs[state][rune]`).
     /// `Rune` is `uint16_t` and `decodeUTF8Rune` returns either the raw codepoint or
     /// the sentinel `0xFFFF` (for >BMP) / `0xFFFD` (for invalid UTF-8); both fit, so
     /// every possible `Rune` value is a valid index into the table.
    +///
    +/// The file writes -3.14e+100 as `Z` to stay compact. `Z` is a macro here rather than a constexpr variable:
    +/// clang takes about a minute to parse the 226,920 references to a variable, and a second for the literal.
    +#define Z (-3.14e+100)
     #include "jieba_hmm_model.dat"
    +#undef Z
    +
    +constexpr double Z = -3.14e+100;
     
     std::vector<State> viterbi(std::span<const Rune> runes)
     {
  13. groeneai commented on Nov 24, 2026

    @groeneai
    Collaborator

    I opened #134009 for option B. Its first commit is #133753, so that one merges first.

    Measured locally with sccache 0.20.0, CI's amd_binary flags and a local disk cache. Checkout A filled the cache and was then moved away. Checkout B, at another path, built clickhouse-bundle in 428 s (cold: 1,599 s) with 17,712 of 17,717 C/C++ hits and 99 of 603 Rust hits. The Rust hits are host units only, because target crates hash the absolute --sysroot. Rename control: without SCCACHE_BASEDIRS_VERBATIM_ENV_DEPS=CARGO_MANIFEST_DIR,CARGO_MANIFEST_PATH, B fails in perfetto_protos's build script (protoc not found <A>/...). With it, B builds as in the run above.

    Where the PR differs from what I wrote above:

    • CMake does not restart a running server that has other options. --stop-server returns before the old server exits, so a build still compiling on it could start a second server on the same cache. The configure prints a warning with the command instead. If upstream --stop-server waited for the exit, CMake could restart the server safely.
    • The source directory is the only base directory, as it is the only path-mapped one. A build directory inside the checkout is shared by its relative name.
    • Preprocessor cache mode is off with basedirs, because its hits restore the .d file of the checkout that filled the cache.
    • Locally the behaviour is the option ENABLE_SCCACHE_BASEDIRS (on by default). CI sets SCCACHE_BASEDIRS=/ClickHouse for non-Debug builds.
    • Rust gets the verbatim env deps but no path mapping. The corrosion linker symlink is not in the PR: it only matters when the compiler is at another path than the filler's (reading CI's cache from S3), and local checkouts share one compiler.
    • A clang gap, also present on master: -ffile-prefix-map misses a lambda location inside a pointer-to-member template argument, so 2 grpc TUs keep the filling checkout's path in DWARF type names.
  14. Felixoid commented on Nov 24, 2026

    @Felixoid
    MemberAuthor

    The sccache part for the per-compile SCCACHE_BASEDIRS is sent in mozilla/sccache#3065

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    comp-build-system

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions