)]}'
{
  "commit": "7a518ce016ce1f42d25c09bb836a53aacfbb2a0c",
  "tree": "320ae8005df2ba0a840f12d6de74bdd8e0ba5cbd",
  "parents": [
    "a2dede2eb8610e420f37dfe211eef9fb79f2000a"
  ],
  "author": {
    "name": "Evan Shrubsole",
    "email": "eshr@google.com",
    "time": "Thu May 07 08:47:54 2026 +0000"
  },
  "committer": {
    "name": "gn-scoped@luci-project-accounts.iam.gserviceaccount.com",
    "email": "gn-scoped@luci-project-accounts.iam.gserviceaccount.com",
    "time": "Fri May 08 01:52:13 2026 -0700"
  },
  "message": "Fix complete_static_lib to include Rust libraries.\n\nWhen a C++ `static_library` has `complete_static_lib \u003d true` and depends\non a `rust_library`, the Rust library\u0027s symbols need to be available to\ndownstream consumers of the static library.\n\nThis change propagates `rust_library` dependencies through\n`complete_static_lib` targets to downstream linking targets (like\nexecutables), similar to how `shared_library` dependencies are handled.\nThis ensures the `.rlib` files are passed directly to the final linker\nvia the Ninja `rlibs` variable (using `{{rlibs}}` substitution).\n\nReproduction error before this change (with mixed C++/Rust example):\n```\nFAILED: c_main\ng++  -o c_main -Wl,--start-group @c_main.rsp    -Wl,--end-group\n/usr/bin/ld: obj/c_main.c_main.o: in function `main\u0027:\nc_main.cc:(.text+0x5): undefined reference to `call_from_c\u0027\ncollect2: error: ld returned 1 exit status\n```\n\nVerification success after this change:\n```\n[1/2] AR libc_lib.a\n[2/2] LINK c_main\n$ examples/rust_example/out/c_main\nValue from c_lib (via Rust): 42\nSUCCESS!\n```\n\nBug: 42440276\nChange-Id: I7ea3d6df444a25faf2847f59de5303884e0933a1\nReviewed-on: https://gn-review.googlesource.com/c/gn/+/22100\nReviewed-by: Petr Hosek \u003cphosek@google.com\u003e\nCommit-Queue: Evan Shrubsole \u003ceshr@google.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "964b331f96c7d89bad63d1ba7898d35704c18712",
      "old_mode": 33188,
      "old_path": "examples/rust_example/BUILD.gn",
      "new_id": "48da170c61e5d6b6fe5188e6b2be6c17d7073ffc",
      "new_mode": 33188,
      "new_path": "examples/rust_example/BUILD.gn"
    },
    {
      "type": "modify",
      "old_id": "ebfaa64f889b4378366fd1c8f41fd31beabfe983",
      "old_mode": 33188,
      "old_path": "examples/rust_example/build/BUILD.gn",
      "new_id": "567cc15ca045f225dda330a6965ad987844598ed",
      "new_mode": 33188,
      "new_path": "examples/rust_example/build/BUILD.gn"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "ec8b33e6496514a64a03572a4078ed4bb3f1c456",
      "new_mode": 33188,
      "new_path": "examples/rust_example/c_lib.cc"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "23a868ecb62ca3acb66024d60b6d00fe803f9744",
      "new_mode": 33188,
      "new_path": "examples/rust_example/c_main.cc"
    },
    {
      "type": "modify",
      "old_id": "73c615c98d1ee00ee78be487e4a524192cb6a305",
      "old_mode": 33188,
      "old_path": "examples/rust_example/hello_world/foo/src/lib.rs",
      "new_id": "d4d20607df2a6ab70ff208dd915ee9ede6ceba21",
      "new_mode": 33188,
      "new_path": "examples/rust_example/hello_world/foo/src/lib.rs"
    },
    {
      "type": "modify",
      "old_id": "161845c20a328f2941757ff0ffe6fc708dc46a71",
      "old_mode": 33188,
      "old_path": "src/gn/ninja_c_binary_target_writer_unittest.cc",
      "new_id": "01df8b56712ee9fdbeed7c968a3fed714fb6d5c0",
      "new_mode": 33188,
      "new_path": "src/gn/ninja_c_binary_target_writer_unittest.cc"
    },
    {
      "type": "modify",
      "old_id": "7b4a49512f213d89c3207e1f45d192030b4708ae",
      "old_mode": 33188,
      "old_path": "src/gn/resolved_target_data.cc",
      "new_id": "628e6a4bdf28a258dec899982f9263385de1a48a",
      "new_mode": 33188,
      "new_path": "src/gn/resolved_target_data.cc"
    }
  ]
}
