)]}'
{
  "commit": "9a9976e0551de7416d720c873e5e530701fa9a6b",
  "tree": "b5d84f475457031f3303c4721add7a57aaea7f70",
  "parents": [
    "78d5eb6b354423701df3486502164139adee6136"
  ],
  "author": {
    "name": "Nico Weber",
    "email": "thakis@chromium.org",
    "time": "Wed Feb 10 21:25:20 2016 -0500"
  },
  "committer": {
    "name": "Nico Weber",
    "email": "thakis@chromium.org",
    "time": "Thu Feb 11 02:28:58 2016 +0000"
  },
  "message": "gn: Add runtime_link_output to tool(\"solib\")\n\ngn\u0027s tool(\"solink\") has two settings for the output of the rule:\nlink_output and depend_output. link_output is what targets depending\non a shared_library are linked against, and depend_output is what\nis used for the ninja dependency.\n\nOn POSIX, this is used to implement a component build optimization:\nIf a shared library is linked but its public interface doesn\u0027t change, then\nit\u0027s not necessary to relink its downstream dependencies. To implement\nthis, depend_output is set to a text file that contains a description of all\npublic symbols of the shared library. The link step first links and then\nchecks if the new public symbols are different from the old contents of\nthe file, and only then does it overwrite the TOC file. This allows ninja\u0027s\nrestat optimization to work.\n\nHowever, downstream dependencies need to link against the actual .so\nfile on the link line `ld -o foo libinput.so`, so link_output needs to be set\nto the .so file.\n\nOn Windows, link.exe writes a .lib and a .dll file when it creates a .dll file.\nThe .lib is only written when needed with incremental links, so if\ndepend_output is set to the .lib then the restat optimization works there\ntoo. And downstream dependencies also need to link to the .lib at\nlink time, so in Windows both depend_output and link_output must\nbe set the the .lib file.\n\nSo far, so good. However, `gn desc runtime_deps` is used to print what files\nneed to be copied to swarming bots to run an executable, and that currently\nlooks at link_output. On POSIX that\u0027s ok, but on Windows that ends up\ncopying the .lib instead of the .dll.\n\nThis patch adds a third setting \"runtime_link_output\" which can be set\nto the output of the solink tool that must be present at runtime. It defaults\nto link_output (which does the right thing on POSIX), but it can be set to the\n.dll file to make `gn desc runtime_deps` do the right thing on Windows.\n\nThis is needed to make swarming work in component builds on Windows.\n\nBUG\u003d354261, 498033\nR\u003ddpranke@chromium.org, scottmg@chromium.org\n\nReview URL: https://codereview.chromium.org/1690843002 .\n\nCr-Original-Commit-Position: refs/heads/master@{#374840}\nCr-Mirrored-From: https://chromium.googlesource.com/chromium/src\nCr-Mirrored-Commit: e3398c19aa9769ad99e97a9fabf29614d645a095\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "77f5700c12b6fb26d0d84802d7fded31ad46a507",
      "old_mode": 33188,
      "old_path": "tools/gn/docs/reference.md",
      "new_id": "9ed3b87473ed8d94a671590c914207980f363bd4",
      "new_mode": 33188,
      "new_path": "tools/gn/docs/reference.md"
    },
    {
      "type": "modify",
      "old_id": "58532551d4f2d65250db6002fbaf675eec20cff7",
      "old_mode": 33188,
      "old_path": "tools/gn/function_toolchain.cc",
      "new_id": "3e272c958642a4ade77f90a78a5fc05e3fa6dbbb",
      "new_mode": 33188,
      "new_path": "tools/gn/function_toolchain.cc"
    },
    {
      "type": "modify",
      "old_id": "d82831199fdca5f31529ad73e7d29b955b65e5a3",
      "old_mode": 33188,
      "old_path": "tools/gn/runtime_deps.cc",
      "new_id": "078bebeee2c822dddda0cc4a7f199ca3e3946560",
      "new_mode": 33188,
      "new_path": "tools/gn/runtime_deps.cc"
    },
    {
      "type": "modify",
      "old_id": "7dd192181ea891e96aa6a9762470fc63af02496e",
      "old_mode": 33188,
      "old_path": "tools/gn/target.cc",
      "new_id": "594b368a5522911faca499e00da771da6c8413eb",
      "new_mode": 33188,
      "new_path": "tools/gn/target.cc"
    },
    {
      "type": "modify",
      "old_id": "18e5fb816dd38470de6df31e409ef312f850b153",
      "old_mode": 33188,
      "old_path": "tools/gn/target.h",
      "new_id": "f49fdba4c2ab6be3441c79e0541a832caeb17b5b",
      "new_mode": 33188,
      "new_path": "tools/gn/target.h"
    },
    {
      "type": "modify",
      "old_id": "c99ebe84757264d150022728dde53743b40fa103",
      "old_mode": 33188,
      "old_path": "tools/gn/target_unittest.cc",
      "new_id": "8376fffcd5670eb69c752763f05d47ca744f4298",
      "new_mode": 33188,
      "new_path": "tools/gn/target_unittest.cc"
    },
    {
      "type": "modify",
      "old_id": "8cd0c7eeddcf8ad10f1ff551278e68855d480fd8",
      "old_mode": 33188,
      "old_path": "tools/gn/tool.h",
      "new_id": "9360ce66ef646381b07d7a904902349cedfcf58d",
      "new_mode": 33188,
      "new_path": "tools/gn/tool.h"
    }
  ]
}
