| Index: src/main.cpp
|
| diff --git a/src/main.cpp b/src/main.cpp
|
| index 952db7b4e373659481eddf0abed73156e383bdb4..e30ac7da59b4ccf9d49b61d151b0958305525ffc 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();
|
| + }
|
| + return Ice::CLCompileServer(argc, argv).runAndReturnErrorCode();
|
| }
|
|
|