I’m working on creating a custom clang-tidy checker for a large codebase. To run my clang-tidy checker, I need to generate a compile_commands.json database for all files. The problem I’m facing is that this is a multi architecture project, so most of the files are compiled with two architecture flags, in this case, as extracted from compile_commands.json
-arch x86_64 -arch arm64
Unfortunately I don’t think clang-tidy is capable of operating with multiple architectures because I get this error at every file checked:
13:40:08 [0;1;31merror: [0m[1munable to handle compilation, expected exactly one compiler job in ’
I found a similar issue resolved for clangd ([clangd] Strip mutliple arch options · llvm/llvm-project@3bf7798 · GitHub), but I couldn’t find how I can bypass this issue except for modifying the codebase, which I do not want.