)]}'
{
  "commit": "c6e77fa144d7b2890b2225f2dcecd5579cbba9c6",
  "tree": "0574ba08baf40efa677572e8f1326317a196175f",
  "parents": [
    "253c122ed62d5e9a32a9806e83c47a389a6435bf"
  ],
  "author": {
    "name": "Than McIntosh",
    "email": "thanm@google.com",
    "time": "Mon Dec 05 12:55:15 2022 -0500"
  },
  "committer": {
    "name": "Than McIntosh",
    "email": "thanm@google.com",
    "time": "Fri Dec 09 17:21:28 2022 +0000"
  },
  "message": "gollvm: add support for \"dummy\" C compilation\n\nWhen the Go command kicks off a build with gccgo/gollvm, it does a\ncouple of test compiles to see whether the compiler supports specific\ncommand line flags; this is done to enable building with older\nversions of gccgo/gollvm that may not support newer flags such as\n\"-fgo-importcfg\" or \"-ffile-prefix-map\". The test compiles are done\nusing a sequence of this form:\n\n   \u003ccompiler\u003e \u003cflag_to_be_tested\u003e -c -x c - -o /dev/null \u003c /dev/null\n\nSpecific example:\n\n  gccgo -fgo-importcfg\u003d/dev/null -c -x c - -o /dev/null \u003c /dev/null\n\nAn empty input file is used, and output is redirected to /dev/null,\nbut also (crucially) the Go command passes \"-x c\", meaning \"the input\nlanguage I want you to compile is C, not Go\". This mode of compilation\nis supported by gccgo, but not gollvm (gollvm doesn\u0027t have an embedded\nC compiler). As a result, all such checks currently fail with gollvm.\n\nThis patch works around this problem by relaxing gollvm\u0027s restrictions\non the use of \"-x c\". Specifically, the option is accepted and a dummy\ncompilation is kicked off, but the input is required to be zero sized,\nand no output is generated. This allows the test compiles used by the\nGo command to do the right thing (e.g. check to see if a given command\nline flag is supported/accepted).\n\nUpdates golang/go#45880.\n\nChange-Id: I5c45681949926b28e9a1df4754dec37da4d2c9f8\nReviewed-on: https://go-review.googlesource.com/c/gollvm/+/455216\nReviewed-by: Cherry Mui \u003ccherryyz@google.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "62b457ab5dd530fb59ed49a606749711a965d81f",
      "old_mode": 33188,
      "old_path": "driver/CMakeLists.txt",
      "new_id": "3609bc360bbbf25131b56fe5b51be45ffad928d4",
      "new_mode": 33188,
      "new_path": "driver/CMakeLists.txt"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "db431365ca4e72375da06313e5af0e57f186ae50",
      "new_mode": 33188,
      "new_path": "driver/DummyCompileC.cpp"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "747d4bf60d43d3dee120b8c9cdcf8f605f7d0164",
      "new_mode": 33188,
      "new_path": "driver/DummyCompileC.h"
    },
    {
      "type": "modify",
      "old_id": "bebad8ce39c36fb7f3e2356469cb71d615f16856",
      "old_mode": 33188,
      "old_path": "driver/LinuxToolChain.cpp",
      "new_id": "a12b79457aabf1d9c3ce6032220244b9828629aa",
      "new_mode": 33188,
      "new_path": "driver/LinuxToolChain.cpp"
    },
    {
      "type": "modify",
      "old_id": "c5f0baa08e8e430a8142166889bfd647083711f7",
      "old_mode": 33188,
      "old_path": "driver/ReadStdin.cpp",
      "new_id": "b7b92233b7d16fe516ba970975bf2783a17e0db5",
      "new_mode": 33188,
      "new_path": "driver/ReadStdin.cpp"
    },
    {
      "type": "modify",
      "old_id": "9eedcb76f49a84e64ac0964a8cb8d04329f8a6e4",
      "old_mode": 33188,
      "old_path": "unittests/Driver/DriverTests.cpp",
      "new_id": "80ddcc24ef34a46419fa5f5d994331f251d468d5",
      "new_mode": 33188,
      "new_path": "unittests/Driver/DriverTests.cpp"
    }
  ]
}
