)]}'
{
  "commit": "30161f5611103313059693e5e5a28840a84c0474",
  "tree": "1f5ab471dbd9ed5ae90dfbc76ed5185f4b0ad8c1",
  "parents": [
    "cb9a2cb0d52a2760402e0566e4ae1f91c6bc7275"
  ],
  "author": {
    "name": "John Ericson",
    "email": "John.Ericson@Obsidian.Systems",
    "time": "Fri Apr 03 15:22:53 2026 -0400"
  },
  "committer": {
    "name": "John Ericson",
    "email": "John.Ericson@Obsidian.Systems",
    "time": "Fri Apr 03 16:01:14 2026 -0400"
  },
  "message": "Promote `rc` (Windows resource compiler) to a proper Meson language\n\n`rc` is now a first-class Meson language, just like `nasm` or `masm`.\nUsers can declare it with `project(\u0027foo\u0027, \u0027c\u0027, \u0027rc\u0027)` or\n`add_languages(\u0027rc\u0027)`, and pass `.rc` files directly as sources to build\ntargets. The `RCFLAGS` environment variable and\n`add_project_arguments(language: \u0027rc\u0027)` now work as expected.\n\nFix #4736\n\nOnce we are making a real language and not hand-rolling a simulacrum of\none, it is easy to support `RCFLAGS`. In fact, it is hard to *forget* to\nsupport `RCFLAGS` --- that\u0027s the beauty of using existing abstractions.\n\nThis is not the easiest way to fix #4736, but I do think it is the best\nway long term, because it helps ensure other deviations from how\nlanguage support is supposed to work --- of which a missing `*FLAGS`\nvariable is just one possible example --- are also far less likely.\n\nThe issue I am most worried about is the treatment of `depends` and\n`depend_files`. As described in the docs, those have to be\nhand-migrated, and the result is slightly different behavior in terms of\nwhich exact build steps depend on what. The lack of fine-grained code of\ncompilation vs linking build depends, or per-language depends (so we\ndon\u0027t have to make assumptions about compilation units) is certainly\npreexisting, and arguably a problem. So one could say well that should\nbe fixed first before we write our shim.\n\nImplementation details:\n\n**Resource Compiler hierarchy** mirrors the `GnuLikeCompiler` /\n`VisualStudioLikeCompiler` split used for C/C++:\n\n- `VisualStudioLikeResourceCompiler` — `/I`, `/fo`, `/nologo`, `.res`\n  suffix\n  - `WindowsResourceCompiler` (`rc.exe`)\n  - `LlvmRcCompiler` (`llvm-rc`)\n- `GnuLikeResourceCompiler` — `-I`, `-o`, `.o` suffix\n  - `WindresCompiler` (`windres`)\n  - `LlvmWindresCompiler` (`llvm-windres`)\n  - `WineResourceCompiler` (`wrc`)\n\n**`windows.compile_resources()`** is now a thin deprecated shim that\nensures the `rc` language is detected and returns the source files for\nthe normal compile pipeline to handle.\n\nKey changes:\n\n- `mesonbuild/compilers/rc.py`: new file with the mixin hierarchy\n  described above\n\n- `mesonbuild/compilers/detect.py`: `detect_rc_compiler()` function\n\n- `mesonbuild/compilers/compilers.py`: `rc` in `Language`,\n  `lang_suffixes`, `CFLAGS_MAPPING`; new `get_object_suffix()` on\n  `Compiler` base class\n\n- `mesonbuild/envconfig.py`: `rc` moved from `ENV_VAR_TOOL_MAP` to\n  `ENV_VAR_COMPILER_MAP` (supports both `RC` and `WINDRES` env vars)\n\n- `mesonbuild/backend/backends.py`: use `compiler.get_object_suffix()`\n  for output file extension\n\n- `mesonbuild/backend/ninjabackend.py`: skip link rule generation for\n  compilers without a linker (`rc`)\n\n- `mesonbuild/modules/windows.py`: simplified from 196 to ~80 lines\n",
  "tree_diff": [
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "df613caa5838a8e825d75b9ab5e199e513e8612e",
      "new_mode": 33188,
      "new_path": "docs/markdown/RC.md"
    },
    {
      "type": "modify",
      "old_id": "faa039bfe733216fd3ba6c068eb2af687532a90d",
      "old_mode": 33188,
      "old_path": "docs/markdown/Reference-tables.md",
      "new_id": "6bedf759b5ac523bd549d199951c7ac32851e1bf",
      "new_mode": 33188,
      "new_path": "docs/markdown/Reference-tables.md"
    },
    {
      "type": "modify",
      "old_id": "6e4888e9533b53a9cdf1f6ba34aae075432eb4fa",
      "old_mode": 33188,
      "old_path": "docs/markdown/Windows-module.md",
      "new_id": "a9335131df2d2847dfc75111692487a60a4602ca",
      "new_mode": 33188,
      "new_path": "docs/markdown/Windows-module.md"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "3f40aa1c56f47908e390fe505dbcd4c0da194ffc",
      "new_mode": 33188,
      "new_path": "docs/markdown/snippets/rc-language.md"
    },
    {
      "type": "modify",
      "old_id": "a71e954424ff43c3d557edde8f730bbaa410d7b3",
      "old_mode": 33188,
      "old_path": "docs/sitemap.txt",
      "new_id": "7ce932c97c2a97baca14f6f7b0f3678234c64e17",
      "new_mode": 33188,
      "new_path": "docs/sitemap.txt"
    },
    {
      "type": "modify",
      "old_id": "4e9a6e3dbea6f2060143dc65d25372d3ccca36cf",
      "old_mode": 33188,
      "old_path": "docs/yaml/functions/project.yaml",
      "new_id": "47309893cca806581659e09dac7f27eea4f5c6af",
      "new_mode": 33188,
      "new_path": "docs/yaml/functions/project.yaml"
    },
    {
      "type": "modify",
      "old_id": "7494b1ac19ba19c107eaf26bfa86056d6ccfea90",
      "old_mode": 33188,
      "old_path": "mesonbuild/backend/backends.py",
      "new_id": "dcafee05991e8d88b475d7eec50ae1af32d30a59",
      "new_mode": 33188,
      "new_path": "mesonbuild/backend/backends.py"
    },
    {
      "type": "modify",
      "old_id": "b45dbaa9b53aaca249b047b1746d06fd380145aa",
      "old_mode": 33188,
      "old_path": "mesonbuild/backend/ninjabackend.py",
      "new_id": "0786a36d73b1a416c8b98c8701f7d810b74540fb",
      "new_mode": 33188,
      "new_path": "mesonbuild/backend/ninjabackend.py"
    },
    {
      "type": "modify",
      "old_id": "f645090e195bc0460a15025ce9c70ea4816b9e36",
      "old_mode": 33188,
      "old_path": "mesonbuild/compilers/__init__.py",
      "new_id": "305ecc82a2e298dcec023eb0cb3d184da63f4b96",
      "new_mode": 33188,
      "new_path": "mesonbuild/compilers/__init__.py"
    },
    {
      "type": "modify",
      "old_id": "370ccc3f2b072b2c4cafd161d71162982bf3116b",
      "old_mode": 33188,
      "old_path": "mesonbuild/compilers/compilers.py",
      "new_id": "0c59ba02abf4f59737d1f7eabb97e496a8d62436",
      "new_mode": 33188,
      "new_path": "mesonbuild/compilers/compilers.py"
    },
    {
      "type": "modify",
      "old_id": "bc2bc90565aaa63e61fcec474735cd9b5fad6aa0",
      "old_mode": 33188,
      "old_path": "mesonbuild/compilers/detect.py",
      "new_id": "bf5786a6a31d15597f256e1793c0152ffd0195d1",
      "new_mode": 33188,
      "new_path": "mesonbuild/compilers/detect.py"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "a068b29b99975bbb9cb0f3c2b88133e5a108545a",
      "new_mode": 33188,
      "new_path": "mesonbuild/compilers/rc.py"
    },
    {
      "type": "modify",
      "old_id": "7e19505dc4ffb9a149151012f99488da59594867",
      "old_mode": 33188,
      "old_path": "mesonbuild/envconfig.py",
      "new_id": "66913ab8374b8a8af3c452ed73b704e490287c1d",
      "new_mode": 33188,
      "new_path": "mesonbuild/envconfig.py"
    },
    {
      "type": "modify",
      "old_id": "727eb736d0ab7d9ba6f00ee13a60c2ecebf7316f",
      "old_mode": 33188,
      "old_path": "mesonbuild/modules/windows.py",
      "new_id": "399882c2e36ff171ea6bea583412cb43eb9be3b5",
      "new_mode": 33188,
      "new_path": "mesonbuild/modules/windows.py"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "f566d28b47d659db6c8756de36c308ca53900577",
      "new_mode": 33188,
      "new_path": "test cases/common/295 rc language/meson.build"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "1997b8ecb9dae65bbaba5ddaaa5997232e36db67",
      "new_mode": 33188,
      "new_path": "test cases/common/295 rc language/resource.rc"
    }
  ]
}
