RFC: Enable ClangIR Build By Default-

The clang area team discussed this RFC, and we’ve decided to accept it.

We are convinced that ClangIR is likely to reach the point where it becomes the replacement for the current CodeGen and CFG analysis. And we don’t think there’s any specific future milestone in ClangIR development worth waiting for before we enable building it by default. ClangIR is on track in terms of progress compiling real-world code, and community support, and we want to encourage that progress.

With the recent work to minimize compile-time, the amount of time needed to build clang, by itself, should increase roughly 1.2x for a build only building clang, and we consider that acceptable at this point. And as far as we know, there’s no significant runtime overhead running clang without -fclangir. Please report if you run into configurations where this isn’t true.

Building with ClangIR disabled (-DCLANG_ENABLE_CIR=Off) will still be a supported configuration for the forseeable future. And -fclangir will not be enabled by default in any configuration for now.

@erichkeane and a few other have volunteered to help fix any pull request which triggers a failure related to ClangIR; we’re going to create a GitHub team so you can add them to any PR which needs attention.

We didn’t discuss CI, in terms of what buildbots should trigger when; this may need some additional discussion.

18 Likes