)]}'
{
  "commit": "5e880747b8b66554f1c1f300400f78af296a6151",
  "tree": "b203f2cd75675b61bf8fcb2e01632e2119f85202",
  "parents": [
    "e1c88f9d3d54265eb3c2f4695d9627adcb7164f5"
  ],
  "author": {
    "name": "Zgroza Klimek",
    "email": "zgroza@chromium.org",
    "time": "Thu Jul 02 18:10:26 2026 +0200"
  },
  "committer": {
    "name": "gn-scoped@luci-project-accounts.iam.gserviceaccount.com",
    "email": "gn-scoped@luci-project-accounts.iam.gserviceaccount.com",
    "time": "Fri Jul 03 01:05:09 2026 -0700"
  },
  "message": "[rust-project] Support space-separated --cfg arguments\n\nWhen GN exports `rust-project.json` (via `--export-rust-project`), it\nattempts to extract `cfg` arguments from a target\u0027s `rustflags` to\npopulate the `cfg` array in the JSON file. This allows language servers\nlike `rust-analyzer` to correctly resolve conditional compilation blocks\n(e.g. `#[gtest]`).\n\nPrior to this commit, GN only successfully extracts these elements if\nthey are specified using the single-string format (e.g., `rustflags \u003d\n[ \"--cfg\u003dfoo\" ]`). If the build configuration provides the flag and the\nargument separately (e.g., `rustflags \u003d [ \"--cfg\", \"foo\" ]`), GN ignores\nthe argument entirely. This results in `rust-analyzer` being unable to\nresolve `cfg`-gated code in projects using the space-separated format.\n\nExamples of using the space-separated syntax can be found for example in\nChromium in `build/rust/BUILD.gn`.\n\nChange-Id: I2c99c0645f6052c16c98f557b26ef47c6a6a6964\nReviewed-on: https://gn-review.googlesource.com/c/gn/+/23740\nReviewed-by: Andrew Grieve \u003cagrieve@google.com\u003e\nReviewed-by: Takuto Ikuta \u003ctikuta@google.com\u003e\nCommit-Queue: Zgroza (Luke) Klimek \u003czgroza@chromium.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "181d50f67f65008f36e9d903ebc1413a597ffc18",
      "old_mode": 33188,
      "old_path": "src/gn/rust_project_writer.cc",
      "new_id": "eb2d4e236cd15c9c66af5a9c044a409ed19f3490",
      "new_mode": 33188,
      "new_path": "src/gn/rust_project_writer.cc"
    },
    {
      "type": "modify",
      "old_id": "4feff94b8dc53aeb633c9bfb3cedc5f6731635dd",
      "old_mode": 33188,
      "old_path": "src/gn/rust_project_writer_helpers.h",
      "new_id": "f11de8c540e0cce2a0cc201958f64df4840d9ab1",
      "new_mode": 33188,
      "new_path": "src/gn/rust_project_writer_helpers.h"
    },
    {
      "type": "modify",
      "old_id": "c37f215ad3bfef191e57d0c722c5f583d98ec59a",
      "old_mode": 33188,
      "old_path": "src/gn/rust_project_writer_helpers_unittest.cc",
      "new_id": "082e92edd7c77b3df842f0c5d183ae36f5ea011f",
      "new_mode": 33188,
      "new_path": "src/gn/rust_project_writer_helpers_unittest.cc"
    }
  ]
}
