)]}'
{
  "commit": "934f795064ab201553945c59b13ce2ae543d4fcd",
  "tree": "3d4ab2113ac136b517caf1aea825de5fdc91fc1c",
  "parents": [
    "40a585e742ed6b28306d7511380079325ba1a003"
  ],
  "author": {
    "name": "Lucas Chollet",
    "email": "lucas.chollet@serenityos.org",
    "time": "Tue Apr 14 19:04:24 2026 +0200"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Tue Apr 14 10:04:24 2026 -0700"
  },
  "message": "[clang] Add support for SerenityOS (#187941)\n\nAdds support for the $arch-unknown-serenity target to the Clang front\nend. This makes the compiler look for libraries and headers in the right\nplaces, and enables some security mitigations like stack-smashing\nprotection and position-independent code by default.\n\n----\n\nA first attempt at upstreaming this patch was made\n[here](https://reviews.llvm.org/D154396). I hope I fixed everything\nmentioned there.\n\nI intentionally kept `/usr/local/` in the default lookup path. I\nconsider it the more practical option, and I’d prefer to have the patch\nmerged as is and revisit the FIXME later. If this is absolutely\nunacceptable to the maintainers, I will happily drop it and keep it as a\nlocal patch until we address the underlying issue.\n\n@MaskRay, @brad0 as you already reviewed the original patch.\n\n---------\n\nCo-authored-by: Daniel Bertalan \u003cdani@danielbertalan.dev\u003e\nCo-authored-by: kleines Filmröllchen \u003cfilmroellchen@serenityos.org\u003e\nCo-authored-by: Andrew Kaster \u003cakaster@serenityos.org\u003e\nCo-authored-by: Dan Klishch \u003cdanilklishch@gmail.com\u003e",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "dc6ef6ed8f3f81228565ab15a5f0681091439ecd",
      "old_mode": 33188,
      "old_path": "clang/lib/Basic/Targets.cpp",
      "new_id": "b24794d26c7c3eb62246d2047b142bceb681c484",
      "new_mode": 33188,
      "new_path": "clang/lib/Basic/Targets.cpp"
    },
    {
      "type": "modify",
      "old_id": "16337d56f82c3abc09f60713284fb53e77403028",
      "old_mode": 33188,
      "old_path": "clang/lib/Basic/Targets/OSTargets.h",
      "new_id": "9e2916eace079e89bae17dc844a40006fd6c7494",
      "new_mode": 33188,
      "new_path": "clang/lib/Basic/Targets/OSTargets.h"
    },
    {
      "type": "modify",
      "old_id": "b8b10b351633f3979758eb2aed646db9860c7802",
      "old_mode": 33188,
      "old_path": "clang/lib/Driver/CMakeLists.txt",
      "new_id": "5fe10052d267f793e41ca57706686fc305aed414",
      "new_mode": 33188,
      "new_path": "clang/lib/Driver/CMakeLists.txt"
    },
    {
      "type": "modify",
      "old_id": "39d2ad1f1c8c0614c19173f376d66cba748e0934",
      "old_mode": 33188,
      "old_path": "clang/lib/Driver/Driver.cpp",
      "new_id": "c247b8d64b08aacba236eb20e13d44ed3d1f3bd0",
      "new_mode": 33188,
      "new_path": "clang/lib/Driver/Driver.cpp"
    },
    {
      "type": "modify",
      "old_id": "1262f825a876eec380998f98c27ee983f2a7655e",
      "old_mode": 33188,
      "old_path": "clang/lib/Driver/ToolChain.cpp",
      "new_id": "462c1f54855ab7570ffde493c862d4943a2a1582",
      "new_mode": 33188,
      "new_path": "clang/lib/Driver/ToolChain.cpp"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "7c29b7c932be44821e5671698de099221a40c403",
      "new_mode": 33188,
      "new_path": "clang/lib/Driver/ToolChains/Serenity.cpp"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "fb77dd6a6eef262783ca3d669257622939374709",
      "new_mode": 33188,
      "new_path": "clang/lib/Driver/ToolChains/Serenity.h"
    },
    {
      "type": "modify",
      "old_id": "3b0e0704ff8c43daee785057583caae306997f5b",
      "old_mode": 33188,
      "old_path": "clang/lib/Lex/InitHeaderSearch.cpp",
      "new_id": "e894086b66e76d6a4d86ae350e4b48abd29896b3",
      "new_mode": 33188,
      "new_path": "clang/lib/Lex/InitHeaderSearch.cpp"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
      "new_mode": 33188,
      "new_path": "clang/test/Driver/Inputs/resource_dir_with_per_target_subdir/lib/aarch64-unknown-serenity/clang_rt.crtbegin.o"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
      "new_mode": 33188,
      "new_path": "clang/test/Driver/Inputs/resource_dir_with_per_target_subdir/lib/aarch64-unknown-serenity/clang_rt.crtend.o"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
      "new_mode": 33188,
      "new_path": "clang/test/Driver/Inputs/resource_dir_with_per_target_subdir/lib/riscv64-unknown-serenity/clang_rt.crtbegin.o"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
      "new_mode": 33188,
      "new_path": "clang/test/Driver/Inputs/resource_dir_with_per_target_subdir/lib/riscv64-unknown-serenity/clang_rt.crtend.o"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
      "new_mode": 33188,
      "new_path": "clang/test/Driver/Inputs/resource_dir_with_per_target_subdir/lib/x86_64-unknown-serenity/clang_rt.crtbegin.o"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
      "new_mode": 33188,
      "new_path": "clang/test/Driver/Inputs/resource_dir_with_per_target_subdir/lib/x86_64-unknown-serenity/clang_rt.crtend.o"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
      "new_mode": 33188,
      "new_path": "clang/test/Driver/Inputs/serenity_tree/usr/include/c++/v1/.keep"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
      "new_mode": 33188,
      "new_path": "clang/test/Driver/Inputs/serenity_tree/usr/lib/crt0.o"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "a10fd03e8f05636464e10fffcda64e00a5617c45",
      "new_mode": 33188,
      "new_path": "clang/test/Driver/serenity.cpp"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "e900a6b62ea51aec7bdabdf875794599841c68b8",
      "new_mode": 33188,
      "new_path": "clang/test/Preprocessor/init-serenityos.c"
    }
  ]
}
