)]}'
{
  "commit": "aa95ad8a2753a03e98ceedc243b7cfc883adf592",
  "tree": "9ad5fbe467e31642e5b5731ab836badf846f7d7e",
  "parents": [
    "9e67ac6e7e9e9ee34bb9869b6de2b75d23e31e16"
  ],
  "author": {
    "name": "Nicholas Nethercote",
    "email": "n.nethercote@gmail.com",
    "time": "Fri Aug 28 13:45:54 2026 +1000"
  },
  "committer": {
    "name": "Nicholas Nethercote",
    "email": "n.nethercote@gmail.com",
    "time": "Wed Sep 16 15:29:42 2026 +1000"
  },
  "message": "Split `build_session`\n\nSession creation is currently awkward: we build a mostly-initialized\nsession, then use it to initialize a codegen backend, and then use the\ncodegen backend to finish initializing the session.\n\nAnd it\u0027s not just awkward: within the Cranelift backend\u0027s `init` method\n`sess.lto()` is called, which consults `sess.thin_lto_supported`,\n*before* that field has been properly set! In practice it had no effect\nbut it\u0027s worth fixing.\n\nThis commit cleans up this mess. It introduces `EarlySession`, which\ncontains just four `Session` fields, the ones that are needed for\ncodegen backend initialization. It is now a field within `Session`, and\n`Session` derefs to `EarlySession` to avoid changing a zillion\n`sess.target`/`sess.opts`/etc. occurrences. `EarlySession` is passed to\n`init`, which returns a `CodegenBackendInit` that contains the\nbackend-specific information needed to build a `Session`. (It replaces\nthe `replaced_intrinsics`, `fallback_intrinsics`, and\n`thin_lto_supported` methods.) The `Session` can then be built in a\nsingle step. No more `Session`/`CodegenBackend` initialization\nintermingling.\n\nA few functions that previously took a `Session` now take something\nelse, e.g. a `Target`. Some `Session` methods are now `EarlySession`\nmethods. And a new `early_lto` method is used for Cranelift\u0027s LTO check.\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "ce1877b308e943215d5cad9bfb1b625f77d7e9e7",
      "old_mode": 33188,
      "old_path": "src/attributes.rs",
      "new_id": "321e150a1568d0676e5b5d0156a02a4dc0a89df5",
      "new_mode": 33188,
      "new_path": "src/attributes.rs"
    },
    {
      "type": "modify",
      "old_id": "64f9982ac7de6680e2d6a09181e4b63cb7bb9392",
      "old_mode": 33188,
      "old_path": "src/context.rs",
      "new_id": "38e0e5f329f7677641cef694ceb94fe04646bcd6",
      "new_mode": 33188,
      "new_path": "src/context.rs"
    },
    {
      "type": "modify",
      "old_id": "a95b4da28eb63c9b968918b72cbe9b556d86cebb",
      "old_mode": 33188,
      "old_path": "src/gcc_util.rs",
      "new_id": "24f552fed32c64d83ef80fb6c62f271b20178de3",
      "new_mode": 33188,
      "new_path": "src/gcc_util.rs"
    },
    {
      "type": "modify",
      "old_id": "624cd2dcb732795cb849ce274d5015a5beebcb99",
      "old_mode": 33188,
      "old_path": "src/intrinsic/mod.rs",
      "new_id": "41fa7b3f9f16278ff3af8fc376f493d726067db4",
      "new_mode": 33188,
      "new_path": "src/intrinsic/mod.rs"
    },
    {
      "type": "modify",
      "old_id": "2fb5459a20283739764548a892bbd9e0f0db2fcf",
      "old_mode": 33188,
      "old_path": "src/lib.rs",
      "new_id": "6e40827c484056dac6293819d1eb54845b7fe13f",
      "new_mode": 33188,
      "new_path": "src/lib.rs"
    }
  ]
}
