)]}'
{
  "commit": "dc424059b634480fdca0250e4ecc2af88f127059",
  "tree": "2a9ee5c2392f6dfa8a723b36c876f10fe6f1bde9",
  "parents": [
    "aff544134bc9d29006f27adbe63d824dfe1436f6"
  ],
  "author": {
    "name": "Fabian Meumertzheim",
    "email": "fabian@meumertzhe.im",
    "time": "Tue Aug 25 07:32:38 2026 -0700"
  },
  "committer": {
    "name": "Copybara-Service",
    "email": "copybara-worker@google.com",
    "time": "Tue Aug 25 07:33:46 2026 -0700"
  },
  "message": "Add //cc/libc config settings for C standard libraries (#792)\n\nAdds a new `//cc/libc` package with `config_setting`s for common C standard libraries, fed by a new `libc_flag` rule that exposes the current CC toolchain\u0027s `target_libc` value to `select()`. This mirrors the existing `//cc/compiler` package for compilers.\n\nCovered libcs: `glibc`, `musl`, `uclibc`, `bionic`, `macosx` (Apple\u0027s libSystem, using the historical value set by toolchains for all Apple platforms), `freebsd`, `netbsd`, `openbsd`, `msvcrt`, `ucrt`, `msys`, `newlib`, `picolibc`, `llvm-libc`, and `wasi-libc`. Toolchains not shipped with Bazel are encouraged to use the same canonical names.\n\nSince Bazel documents `target_libc` as \"the libc version string (e.g. `glibc-2.2.2`)\", `libc_flag` strips a version suffix (everything from the first `-` followed by a digit) before matching, so versioned values still match their family\u0027s setting while names like `wasi-libc` and `llvm-libc` are preserved.\n\nThe following changes make the new constraints usable:\n* the auto-configured Unix toolchain detects the default libc via preprocessor macros and `-dumpmachine`\n* the `target_libc` values emitted by the bundled Windows and BSD toolchain configs are changed to the correct values\n* rule-based `cc_toolchain`s can declare their `target_libc` or fall back to a reasonable default\n\nCloses #792\n\nCOPYBARA_INTEGRATE_REVIEW\u003dhttps://github.com/bazelbuild/rules_cc/pull/792 from fmeum:libc-settings 7215a9ced75b2d01816d25b87e76c8387b0eee34\nPiperOrigin-RevId: 970542238\nChange-Id: Id569a70de73fc51ca8c69ca74169b8ba44cdc1bf\n",
  "tree_diff": [
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "71fdfeed602a2f29c7fd0915e7fb1d411ce876b7",
      "new_mode": 33188,
      "new_path": "cc/libc/BUILD"
    },
    {
      "type": "modify",
      "old_id": "afbc00d9837c9242bde789d36abc2a29bee2b9a5",
      "old_mode": 33188,
      "old_path": "cc/private/toolchain/BUILD.windows.tpl",
      "new_id": "4ce90228806bb950f519866e53f36a80be0c2480",
      "new_mode": 33188,
      "new_path": "cc/private/toolchain/BUILD.windows.tpl"
    },
    {
      "type": "modify",
      "old_id": "b35e43fe36f7fc6b0f6810c379eea3cc3928e736",
      "old_mode": 33188,
      "old_path": "cc/private/toolchain/armeabi_cc_toolchain_config.bzl",
      "new_id": "30cb09f46b787e0cc50428b4c93f0f2a64252d41",
      "new_mode": 33188,
      "new_path": "cc/private/toolchain/armeabi_cc_toolchain_config.bzl"
    },
    {
      "type": "modify",
      "old_id": "83b9313f080059ea66d782a1ea893bcce9e907f4",
      "old_mode": 33188,
      "old_path": "cc/private/toolchain/bsd_cc_toolchain_config.bzl",
      "new_id": "ced21ba578641acdf5cf9cd48c3f87e2212e7b37",
      "new_mode": 33188,
      "new_path": "cc/private/toolchain/bsd_cc_toolchain_config.bzl"
    },
    {
      "type": "modify",
      "old_id": "5b2e49cdde837ef2249f09c13a784ebc70f60478",
      "old_mode": 33188,
      "old_path": "cc/private/toolchain/empty_cc_toolchain_config.bzl",
      "new_id": "f5ca6fe8e8cbcf51220526d124718147b5bdd9aa",
      "new_mode": 33188,
      "new_path": "cc/private/toolchain/empty_cc_toolchain_config.bzl"
    },
    {
      "type": "modify",
      "old_id": "a1bbd838bf664a8d998a256b380d1f3e00f34549",
      "old_mode": 33188,
      "old_path": "cc/private/toolchain/unix_cc_configure.bzl",
      "new_id": "283ef0bbc5529b4f6997d89b998a1f27ebb1e8d8",
      "new_mode": 33188,
      "new_path": "cc/private/toolchain/unix_cc_configure.bzl"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "c3f8ef659deea39a6092f4c88e0f2149dc796cd6",
      "new_mode": 33188,
      "new_path": "cc/toolchains/impl/libc_version.bzl"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "e06db80b57793b7fe23c1c592e61d31df7aee7ca",
      "new_mode": 33188,
      "new_path": "cc/toolchains/libc_flag.bzl"
    },
    {
      "type": "modify",
      "old_id": "0c9ab942002433e474dfebeee392224d0d0862aa",
      "old_mode": 33188,
      "old_path": "cc/toolchains/toolchain.bzl",
      "new_id": "120204014ba7f4bb7c005ba1b8a17fa97f45cdd3",
      "new_mode": 33188,
      "new_path": "cc/toolchains/toolchain.bzl"
    },
    {
      "type": "modify",
      "old_id": "6e2fb70b868cfc1f5891d1c35c26920a3c61d46c",
      "old_mode": 33188,
      "old_path": "docs/toolchain_api.md",
      "new_id": "bd03ee92592b641e0aa63789175a6d493d7e28df",
      "new_mode": 33188,
      "new_path": "docs/toolchain_api.md"
    },
    {
      "type": "modify",
      "old_id": "5aa12010067516d7a910793699903f4c5cae3bff",
      "old_mode": 33188,
      "old_path": "tests/builtins_bzl/cc/cc_static_library/test/mock_toolchain.bzl",
      "new_id": "58b3c0129d6e22d13e5228221206614cdbe591ad",
      "new_mode": 33188,
      "new_path": "tests/builtins_bzl/cc/cc_static_library/test/mock_toolchain.bzl"
    },
    {
      "type": "modify",
      "old_id": "45dd6af55ee1bd5cfd4c427fe1e4fb12af5ce34e",
      "old_mode": 33188,
      "old_path": "tests/cc/testutil/toolchains/BUILD",
      "new_id": "2ca081cd6ff0502a164af395355932b384f6c8ab",
      "new_mode": 33188,
      "new_path": "tests/cc/testutil/toolchains/BUILD"
    },
    {
      "type": "modify",
      "old_id": "894e0fbcb42e72746fe7d38a49ce3b9b95e8a807",
      "old_mode": 33188,
      "old_path": "tests/cc/testutil/toolchains/cc_toolchain_config.bzl",
      "new_id": "74bbc043c4eb787b840fdcfeec2956b59e404523",
      "new_mode": 33188,
      "new_path": "tests/cc/testutil/toolchains/cc_toolchain_config.bzl"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "a2f263b8decb9276ac92ede9fc6e236efc810b55",
      "new_mode": 33188,
      "new_path": "tests/libc_settings/BUILD"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "2ad17036f3481ad3cd51ed5d5eb0dbedbd3b5c4d",
      "new_mode": 33188,
      "new_path": "tests/libc_settings/libc_flag_test.bzl"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "ee5b1bf7434107b9121843d8458c0afdd3b6da46",
      "new_mode": 33188,
      "new_path": "tests/libc_settings/main.cc"
    }
  ]
}
