| //===- subzero/src/main.cpp - Entry point for bitcode translation ---------===// |
| // The Subzero Code Generator |
| // This file is distributed under the University of Illinois Open Source |
| // License. See LICENSE.TXT for details. |
| //===----------------------------------------------------------------------===// |
| /// This file defines the entry point for translating PNaCl bitcode into |
| //===----------------------------------------------------------------------===// |
| #include "IceBrowserCompileServer.h" |
| #include "IceCompileServer.h" |
| int main(int argc, char **argv) { |
| // Start file server and "wait" for compile request. |
| // 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. |
| Ice::BrowserCompileServer Server(Comp); |
| return Server.getErrorCode().value(); |
| #else // !PNACL_BROWSER_TRANSLATOR |
| Ice::CLCompileServer Server(Comp, argc, argv); |
| return Server.getErrorCode().value(); |
| #endif // !PNACL_BROWSER_TRANSLATOR |