Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(531)

Unified Diff: src/main.cpp

Issue 1494753003: cleanup main (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: changes suggested by stichnot Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« src/IceCompileServer.h ('K') | « src/IceCompileServer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
}
« src/IceCompileServer.h ('K') | « src/IceCompileServer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698