How to add builtin function to compiler

I’m attempting to modify the Zig compiler for a project, and I want to know how I would add another builtin function that could be called from comptime. The function wouldn’t need to be ran from runtime, so I don’t need to mess with codegen.

Take a look at how @kristoff implemented a new builtin called @deprecated, the commit was reverted due to some design / complexity / testing concerns, but it should be a good start for the scaffolding required to add a builtin.

Note: the zig repo is now hosted on codeberg, but this PR was made before the zig repo moved from github to codeberg, hence the github link.