)]}'
{
  "commit": "054c9865a0fe4074122022bfd4458fc08305a1d5",
  "tree": "6d355600bd8476b66da2a8752ea878d0abfea915",
  "parents": [
    "dc685a2b72b24234ba5cbc821375c3d2ac4f0409"
  ],
  "author": {
    "name": "Takuto Ikuta",
    "email": "tikuta@google.com",
    "time": "Wed Sep 30 08:28:53 2026 +0900"
  },
  "committer": {
    "name": "gn-scoped@luci-project-accounts.iam.gserviceaccount.com",
    "email": "gn-scoped@luci-project-accounts.iam.gserviceaccount.com",
    "time": "Wed Sep 30 00:20:18 2026 -0700"
  },
  "message": "rust: Don\u0027t make rlibs depend on non-Rust link inputs\n\nrustc does not invoke a linker when building an rlib, so non-Rust native\ndependencies (object files of source_sets, static libraries and shared\nlibraries) are not used when compiling it. Since RUST_LIBRARY is not\nfinal, these dependencies are already propagated as inherited libraries\nto the final target that links the rlib.\n\nHowever, NinjaRustBinaryTargetWriter added them to the rlib\u0027s rustc\ncommand line (as -Clink-arg\u003d...) and to its implicit ninja dependencies.\nThis made compiling an rlib wait for C/C++ code to be compiled, archived\nand linked. For example, in a Chromium component build, compiling an\nrlib depending on a C++ component waited for its shared library (and\nthose of its dependencies) to be linked, which put rlib compilation\nafter long chains of shared library links on the critical path.\n\nStop adding non-Rust link inputs to rlibs. Final targets still get them\nthrough inherited libraries, as tested in NonRustDeps.\n\nBug: 563098656\nChange-Id: Id5a80c39a44a4e347e8ad64505efe1e686171517\nReviewed-on: https://gn-review.googlesource.com/c/gn/+/27000\nReviewed-by: David Turner \u003cdigit@google.com\u003e\nCommit-Queue: David Turner \u003cdigit@google.com\u003e\nReviewed-by: Matt Stark \u003cmsta@google.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "a8bea8f0211a7be0e4bbf174cd4512dc499adf25",
      "old_mode": 33188,
      "old_path": "src/gn/ninja_rust_binary_target_writer.cc",
      "new_id": "9767144391535f2b891bb6ac0c13a1d099cdbadc",
      "new_mode": 33188,
      "new_path": "src/gn/ninja_rust_binary_target_writer.cc"
    },
    {
      "type": "modify",
      "old_id": "3f20c5accb975fe405130e7c8e0568482cd15aad",
      "old_mode": 33188,
      "old_path": "src/gn/ninja_rust_binary_target_writer_unittest.cc",
      "new_id": "fc6cc75b471c299695ad59dc63b2a7ac6962f635",
      "new_mode": 33188,
      "new_path": "src/gn/ninja_rust_binary_target_writer_unittest.cc"
    }
  ]
}
