diff --color -bur a/src/compiler/cpp_generator.cc b/src/compiler/cpp_generator.cc --- a/src/compiler/cpp_generator.cc 2024-02-12 19:56:01.762336340 +0000 +++ b/src/compiler/cpp_generator.cc 2024-02-12 19:57:43.263920796 +0000 @@ -114,6 +114,9 @@ printer->Print(vars, "#pragma GCC system_header\n"); printer->Print(vars, "#endif\n"); printer->Print(vars, "\n"); + printer->Print(vars, "#if __has_include(\"$filename_base$.deps$message_header_ext$\")\n"); + printer->Print(vars, "#include \"$filename_base$.deps$message_header_ext$\"\n"); + printer->Print(vars, "#endif\n"); printer->Print(vars, "#include \"$filename_base$$message_header_ext$\"\n"); printer->Print(vars, file->additional_headers().c_str()); printer->Print(vars, "\n");