Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 //===- subzero/src/main.cpp - Entry point for bitcode translation ---------===// | 1 //===- subzero/src/main.cpp - Entry point for bitcode translation ---------===// |
| 2 // | 2 // |
| 3 // The Subzero Code Generator | 3 // The Subzero Code Generator |
| 4 // | 4 // |
| 5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
| 6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
| 7 // | 7 // |
| 8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
| 9 /// | 9 /// |
| 10 /// \file | 10 /// \file |
| 11 /// \brief Defines the entry point for translating PNaCl bitcode into native | 11 /// \brief Defines the entry point for translating PNaCl bitcode into native |
| 12 /// code. | 12 /// code. |
| 13 /// | 13 /// |
| 14 //===----------------------------------------------------------------------===// | 14 //===----------------------------------------------------------------------===// |
| 15 | 15 |
| 16 #include "IceBrowserCompileServer.h" | 16 #include "IceBrowserCompileServer.h" |
| 17 #include "IceBuildDefs.h" | 17 #include "IceBuildDefs.h" |
| 18 #include "IceCompileServer.h" | 18 #include "IceCompileServer.h" |
| 19 | 19 |
| 20 /// Depending on whether we are building the compiler for the browser or | |
| 21 /// standalone, we will end up creating a Ice::BrowserCompileServer or | |
| 22 /// Ice::CLCompileServer object. Method | |
| 23 /// Ice::CompileServer::runAndReturnErrorCode is used for the invocation. | |
| 24 /// There are no real commandline arguments in the browser case. They are | |
| 25 /// supplied via IPC so argc, and argv are not used in that case. | |
| 26 /// We can only compile the Ice::BrowserCompileServer object with the NaCl | |
|
Jim Stichnoth
2015/12/10 18:06:56
I think this is a bit unclear. How about somethin
rkotlerimgtec
2015/12/10 21:27:39
Done.
| |
| 27 /// compiler. | |
| 28 /// | |
|
Jim Stichnoth
2015/12/10 18:06:56
Remove this blank comment line?
rkotlerimgtec
2015/12/10 21:27:39
Done.
| |
| 20 int main(int argc, char **argv) { | 29 int main(int argc, char **argv) { |
| 21 // Start file server and "wait" for compile request. | |
| 22 // Can only compile the BrowserCompileServer w/ the NaCl compiler. | |
| 23 if (Ice::BuildDefs::browser()) { | 30 if (Ice::BuildDefs::browser()) { |
| 24 // There are no real commandline arguments in the browser case. They are | |
| 25 // supplied via IPC. | |
| 26 assert(argc == 1); | 31 assert(argc == 1); |
| 27 return Ice::BrowserCompileServer().runAndReturnErrorCode(); | 32 return Ice::BrowserCompileServer().runAndReturnErrorCode(); |
| 28 } | 33 } |
| 29 return Ice::CLCompileServer(argc, argv).runAndReturnErrorCode(); | 34 return Ice::CLCompileServer(argc, argv).runAndReturnErrorCode(); |
| 30 } | 35 } |
| OLD | NEW |