)]}'
{
  "commit": "f1531dc2ebfb2db721a94f6f19081fa89af536da",
  "tree": "c424cadf8d349ebf3e2d250720041b1d2b5ad1a7",
  "parents": [
    "e0d6e6fc530a26b28e1192af505985c71736bb1b"
  ],
  "author": {
    "name": "Fabian Meumertzheim",
    "email": "meumertzheim@code-intelligence.com",
    "time": "Tue Aug 10 07:21:08 2021 -0700"
  },
  "committer": {
    "name": "Copybara-Service",
    "email": "copybara-worker@google.com",
    "time": "Tue Aug 10 07:22:31 2021 -0700"
  },
  "message": "Add support for clang\u0027s libc++ to Unix toolchain\n\nDue to two separate issues, it is currently not possible to compile and link against clang\u0027s libc++ with Bazel\u0027s auto-configured Unix toolchain, e.g. via adding `-stdlib\u003dlibc++` as a `cxxopt` and `linkopt` on a `cc_binary`:\n\n1. Since Bazel uses `-no-canonical-prefixes`, clang is not able to find the libc++ headers if it is invoked through a symlink in a different directory. This is fixed by fully resolving the path to the clang binary in the toolchain.\n\n2. The list of built-in include paths does not contain the base directory of the libc++ headers, which makes Bazel\u0027s implicit dependency checker fail on targets with the `cxxopt` `-stdlib\u003dlib++`. This is fixed by adding the search paths obtained from `clang -v` with that option to the list of built-in include paths in the toolchain.\n\nBoth 1. and 2. can be partially worked around by passing in `-stdlib\u003dlibc++` and a fully resolved `CC` via `--repo_env`. However, the former means that the choice of standard library has to be fixed for the entire workspace and the latter cannot be accomplished with a system-independent entry in `.bazelrc`. Proper fixes in Bazel thus seem vastly superior.\n\nFixes #13071\n\nCloses #13666.\n\nPiperOrigin-RevId: 389877696\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "14a0ed5dba5d566f2ad87b45ed2588cdceb0e4e4",
      "old_mode": 33188,
      "old_path": "tools/cpp/unix_cc_configure.bzl",
      "new_id": "371b66fe6a4062ed171f8578d76137bd5b6de0f8",
      "new_mode": 33188,
      "new_path": "tools/cpp/unix_cc_configure.bzl"
    }
  ]
}
