)]}'
{
  "commit": "8e8303b9da6caa3426408feb79fd3f889e93eb3a",
  "tree": "70ba12d296c9b9d71b6ed376d246948ea28deb54",
  "parents": [
    "ba33198847ac7f6962ae040f9ae3e00a7dc474d0"
  ],
  "author": {
    "name": "Hajime Hoshi",
    "email": "hajimehoshi@gmail.com",
    "time": "Thu Aug 13 17:06:21 2026 +0900"
  },
  "committer": {
    "name": "Hajime Hoshi",
    "email": "hajimehoshi@gmail.com",
    "time": "Wed Aug 19 19:35:41 2026 -0700"
  },
  "message": "cmd/gomobile: invoke the NDK Clang directly\n\nenvInit pointed CC and CXX at the NDK\u0027s \u003ctriple\u003e\u003cAPI\u003e-clang wrapper\nscripts. On Windows os/exec resolves the extension-less path through\nPATHEXT to the .cmd form of the wrapper, which runs under cmd.exe,\nwhose command line limit is 8191 characters. The link step of an\nAndroid c-shared build already produces a command line of roughly\n8.2 KB, so it fails with \"The command line is too long.\" cmd/link\nswitches to a response file only above 30 KB, well past the point\nwhere cmd.exe gives up, so that fallback never engages.\n\nPoint CC and CXX at the clang and clang++ binaries in the NDK\u0027s bin\ndirectory instead, appending the --target\u003d that the wrapper would have\nsupplied. Naming the binary means CreateProcess runs it directly rather\nthan through cmd.exe, which raises the ceiling to 32767 characters.\nGoogle documents clang --target\u003d as the preferred way to invoke the\ntoolchain and offers the wrapper scripts only as a fallback.\n\nThe wrappers for 32-bit x86 below API level 24 pass -mstackrealign as\nwell, and that is reproduced. Their -cc1 special case is not: it keeps\nthe wrapper from adding a driver option to a frontend invocation, which\ncannot arise once the binary is named directly. Wrappers in older NDKs\nalso passed -fno-addrsig for the benefit of GNU binutils; the NDK no\nlonger does.\n\nThe Windows-only clang++.cmd stat was a proxy for telling NDK r19b from\nr19c apart. The .cmd wrappers are still shipped, but gomobile no longer\nruns them, so the toolchain check now covers exactly the two binaries\nthat are executed.\n\nUpdates golang/go#80862\n\nChange-Id: I5f93d7440f1e9018ea64d6220babbd96b9d3c7b0\nReviewed-on: https://go-review.googlesource.com/c/mobile/+/814500\nReviewed-by: Dmitri Shuralyov \u003cdmitshur@golang.org\u003e\nReviewed-by: Dmitri Shuralyov \u003cdmitshur@google.com\u003e\nLUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com \u003cgolang-scoped@luci-project-accounts.iam.gserviceaccount.com\u003e\nReviewed-by: Carlos Amedee \u003ccarlos@golang.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "77386a98ae29ec2be4c0e594e2086be5fab72ab1",
      "old_mode": 33188,
      "old_path": "cmd/gomobile/bind_test.go",
      "new_id": "d509e48bc90b40328a1100caad0c7d58f88ca196",
      "new_mode": 33188,
      "new_path": "cmd/gomobile/bind_test.go"
    },
    {
      "type": "modify",
      "old_id": "e5e412ab7cb5c07f6b4a3e710d2839c0a5bcb590",
      "old_mode": 33188,
      "old_path": "cmd/gomobile/build_test.go",
      "new_id": "f39786423e773617bee73c90fe2b69c56770d490",
      "new_mode": 33188,
      "new_path": "cmd/gomobile/build_test.go"
    },
    {
      "type": "modify",
      "old_id": "3562ad56f75e2eab217d6a724486997c1cdf39e9",
      "old_mode": 33188,
      "old_path": "cmd/gomobile/env.go",
      "new_id": "0234d4c5fac34bac564aff74ad8a5de0e7d750b5",
      "new_mode": 33188,
      "new_path": "cmd/gomobile/env.go"
    }
  ]
}
