Chromium Code Reviews| Index: src/main.cpp |
| diff --git a/src/main.cpp b/src/main.cpp |
| index 952db7b4e373659481eddf0abed73156e383bdb4..c23ea80cd2aca434f82cd464b3e14a33c7d36538 100644 |
| --- a/src/main.cpp |
| +++ b/src/main.cpp |
| @@ -14,25 +14,17 @@ |
| //===----------------------------------------------------------------------===// |
| #include "IceBrowserCompileServer.h" |
| -#include "IceCompiler.h" |
| +#include "IceBuildDefs.h" |
| #include "IceCompileServer.h" |
| int main(int argc, char **argv) { |
| // Start file server and "wait" for compile request. |
| - Ice::Compiler Comp; |
| -// Can only compile the BrowserCompileServer w/ the NaCl compiler. |
| -#if PNACL_BROWSER_TRANSLATOR |
| - // There are no real commandline arguments in the browser case. They are |
| - // supplied via IPC. |
| - assert(argc == 1); |
| - (void)argc; |
| - (void)argv; |
| - Ice::BrowserCompileServer Server(Comp); |
| - Server.run(); |
| - return Server.getErrorCode().value(); |
| -#else // !PNACL_BROWSER_TRANSLATOR |
| - Ice::CLCompileServer Server(Comp, argc, argv); |
| - Server.run(); |
| - return Server.getErrorCode().value(); |
| -#endif // !PNACL_BROWSER_TRANSLATOR |
| + // Can only compile the BrowserCompileServer w/ the NaCl compiler. |
| + if (Ice::BuildDefs::browser()) { |
| + // There are no real commandline arguments in the browser case. They are |
| + // supplied via IPC. |
| + assert(argc == 1); |
| + return Ice::BrowserCompileServer().runAndReturnErrorCode(); |
| + } else |
| + return Ice::CLCompileServer(argc, argv).runAndReturnErrorCode(); |
|
Jim Stichnoth
2015/12/07 21:00:55
Use symmetric braces for if/else, i.e.
if (a)
rkotlerimgtec
2015/12/07 21:15:04
Done.
|
| } |