Chromium Code Reviews| Index: src/main.cpp |
| diff --git a/src/main.cpp b/src/main.cpp |
| index 952db7b4e373659481eddf0abed73156e383bdb4..f74ba00fe6b59f6459b6722d871e9ee999bb33c1 100644 |
| --- a/src/main.cpp |
| +++ b/src/main.cpp |
| @@ -14,25 +14,18 @@ |
| //===----------------------------------------------------------------------===// |
| #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().runit(); |
|
Jim Stichnoth
2015/12/07 17:37:13
Bikeshed: Instead of "runit", how about something
rkotlerimgtec
2015/12/07 18:32:07
Done.
|
| + } |
| + else |
| + return Ice::CLCompileServer(argc, argv).runit(); |
| } |