Because:
- The build environment is a cross compile environment that does not have a native toolchain.
- The build environment won't allow running executables that are generated by the build itself.
- So all the generated code is pre-generated and checked-in, so it's not needed.
- But I still need to build the runtime libraries.
It seems like other languages (eg: objective-C) can build their runtime without rebuilding a compiler, so it feels like C++ should be able to do the same.
Ideally, protoc and the runtime libraries would be part of that build environment / SDK, so that I could run protoc as part of the build and would not have to worry about rebuilding the runtime for my project, but that's not something I can control at this point.
And yes, I also have to accept the fact that I better be using the same version of protoc and the runtime I'm building.