)]}'
{
  "commit": "d4f94f9a6c25497b2ce0356bb99a8d202c8c1d32",
  "tree": "79ccb5a86ebcd76116240e3933b468771a9f5746",
  "parents": [
    "0a2b8eac80f164f10b2cbc126890db0d295790cd"
  ],
  "author": {
    "name": "David \u0027Digit\u0027 Turner",
    "email": "digit@google.com",
    "time": "Fri Feb 16 11:40:37 2024 +0100"
  },
  "committer": {
    "name": "GN LUCI",
    "email": "gn-scoped@luci-project-accounts.iam.gserviceaccount.com",
    "time": "Mon Feb 19 09:15:20 2024 +0000"
  },
  "message": "Enable C++ runtime assertions in debug mode.\n\nEnabling these runtime assertions should prevent\nbugs like the one introduced in [1], which went\nunnoticed, and had to be fixed in [2].\n\nThis should work on non-Windows platforms when using\nlibstdc++ or libc++.\n\nThis is also disabled on MacOS due to linking errors\nwith the system-installed XCode on Catalina. E.g.:\n\n```\n/opt/s/w/ir/x/w/cipd/bin/clang++ --target\u003dx86_64-apple-darwin --sysroot\u003d/opt/s/w/ir/cache/macos_sdk/XCode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -mmacosx-version-min\u003d10.9 -pthread -o gn src/gn/gn_main.o  base.a gn_lib.a\nld64.lld: error: undefined symbol: std::__1::__libcpp_debug_function\n```\n\n(where __libcpp_debug_function is supposed to be provided by libc++\nand is the function called in case of runtime assertion failure). Looking\nfor clues on your favorite search engine does not provide any answer\nto the issue :-(\n\n+ Fix compiler warnings with GCC 13 in json_project_writer.cc.\n  In debug mode, the compiler complains that with a warning that\n  doesn\u0027t really make sense, but which can be work-around by\n  using assign() instead of clear() + insert() on a vector.\n\n  The error looks like:\n\n  ```\n  /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/debug/functions.h:110:44: error: no matching function for call to \u0027__addressof\u0027\n        return __foreign_iterator_aux4(__it, std::__addressof(*__other));\n  ...\n  ../src/gn/json_project_writer.cc:74:14: note: in instantiation of function template specialization \u0027std::vector\u003cconst Target *\u003e::insert\u003cPointerSet\u003cconst Target\u003e::const_iter\nator, void\u003e\u0027 requested here\n      targets-\u003einsert(targets-\u003eend(), target_set.begin(), target_set.end());\n               ^\n  /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/move.h:51:5: note: candidate function [with _Tp \u003d const Target *] not viable: expects an lvalue for\n  1st argument\n      __addressof(_Tp\u0026 __r) _GLIBCXX_NOEXCEPT\n  ```\n\n[1] https://gn-review.googlesource.com/c/gn/+/16620\n[2] https://gn-review.googlesource.com/c/gn/+/16700\n\nChange-Id: I71cad8103b221145db75e639a6237f006c8fa37a\nReviewed-on: https://gn-review.googlesource.com/c/gn/+/16740\nCommit-Queue: David Turner \u003cdigit@google.com\u003e\nReviewed-by: Takuto Ikuta \u003ctikuta@google.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "52509549a7ed4092bc648db8be515d75dbc9f6f3",
      "old_mode": 33261,
      "old_path": "build/gen.py",
      "new_id": "3364cb9249e954da28ffab599c35b888aeb774e3",
      "new_mode": 33261,
      "new_path": "build/gen.py"
    },
    {
      "type": "modify",
      "old_id": "a37fa9bd7c43bee49fce66aad8f567267ef35d39",
      "old_mode": 33188,
      "old_path": "src/gn/json_project_writer.cc",
      "new_id": "96ddacc38063031f5b5b8af0fde4f401800770f9",
      "new_mode": 33188,
      "new_path": "src/gn/json_project_writer.cc"
    }
  ]
}
