Hi!<br>Here is the final patch for clang to support network distributed compilation. (clang.patch file)<br>There is also the server part attached. (the tar.gz file)<br><br>There 3 new files added to Driver directory: PrintPreprocessedOutputBuffer.cpp what is a modification of PrintPreprocessedOutput.cpp to support print text to a std::ostream.<br>
Other new files: NetSession.h and NetSession.cpp which handles and contains all networking code (portable thin networking code).<br>There are some files changed, mostly to support saving its output to a std::stream. I've used that way to pass clang ASTConsumers data to an other computer via network.<br>
<br>There are 3 new option added to clang. The basic one is -distribute what enables distributed compilation. The other two are: -dist-preprocesslocally and -dist-serializelocally.<br>If the first one enabled then clang sends a preprocessed file for clangserver (a process in an other machine) to compile. In the second case the lexing and parsing is done locally and the built and serialized AST is sent to clangserver.<br>
<br>You can play with this using -dist-preprocesslocally because it is working.<br><br>P.S.<br>There is some features left to implement like getting and sending full diagnostics (currently only diagID is sended by clangserver), and handling remote file requests (when clangserver (compile server) requires an include file)<br>
But what is currently is implemented is stable and final, there probably will not be big change in this code later.<br><p></p><p><br></p>What is your opinion of this ?<br><br>Cheers,<br>Peter Neumark<br><p></p><p></p>