diff options
Diffstat (limited to 'tools/pnacl-llc/pnacl-llc.cpp')
-rw-r--r-- | tools/pnacl-llc/pnacl-llc.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tools/pnacl-llc/pnacl-llc.cpp b/tools/pnacl-llc/pnacl-llc.cpp index 84f216914a..a2a6f3ec05 100644 --- a/tools/pnacl-llc/pnacl-llc.cpp +++ b/tools/pnacl-llc/pnacl-llc.cpp @@ -258,6 +258,12 @@ int llc_main(int argc, char **argv) { // Register the target printer for --version. cl::AddExtraVersionPrinter(TargetRegistry::printRegisteredTargetsForVersion); + // Enable the PNaCl ABI verifier by default in sandboxed mode. +#if defined(__native_client__) + PNaClABIVerify = true; + PNaClABIVerifyFatalErrors = true; +#endif + cl::ParseCommandLineOptions(argc, argv, "llvm system compiler\n"); // Compile the module TimeCompilations times to give better compile time @@ -329,7 +335,8 @@ static int compileModule(char **argv, LLVMContext &Context) { // @LOCALMOD-BEGIN if (PNaClABIVerify) { // Verify the module (but not the functions yet) - ModulePass *VerifyPass = createPNaClABIVerifyModulePass(&ABIErrorReporter); + ModulePass *VerifyPass = createPNaClABIVerifyModulePass(&ABIErrorReporter, + LazyBitcode); VerifyPass->runOnModule(*mod); CheckABIVerifyErrors(ABIErrorReporter, "Module"); } |