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

Unified Diff: src/main.cpp

Issue 1494753003: cleanup main (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: else clause no longer needed 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
« no previous file with comments | « 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..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();
}
« no previous file with comments | « src/IceCompileServer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698