hostCPUName = sys::getHostCPUName();
-#if defined(_WIN32)
- // Needed for MCJIT on windows
- Triple hostTriple(sys::getProcessTriple());
- hostTriple.setObjectFormat(Triple::COFF);
- mpCurrentModule->setTargetTriple(hostTriple.getTriple());
-#endif // _WIN32
-
auto optLevel = CodeGenOpt::Aggressive;
if (KNOB_JIT_OPTIMIZATION_LEVEL >= CodeGenOpt::None &&
optLevel = CodeGenOpt::Level(KNOB_JIT_OPTIMIZATION_LEVEL);
}
+ mpCurrentModule->setTargetTriple(sys::getProcessTriple());
mpExec = EngineBuilder(std::move(newModule))
.setTargetOptions(tOpts)
.setOptLevel(optLevel)
std::unique_ptr<Module> newModule(new Module("", mContext));
mpCurrentModule = newModule.get();
-#if defined(_WIN32)
- // Needed for MCJIT on windows
- Triple hostTriple(sys::getProcessTriple());
- hostTriple.setObjectFormat(Triple::COFF);
- newModule->setTargetTriple(hostTriple.getTriple());
-#endif // _WIN32
-
+ mpCurrentModule->setTargetTriple(sys::getProcessTriple());
mpExec->addModule(std::move(newModule));
mIsModuleFinalized = false;
}
int ExecUnhookedProcess(const std::string& CmdLine, std::string* pStdOut, std::string* pStdErr)
{
- static const char *g_pEnv = "RASTY_DISABLE_HOOK=1\0";
-
- return ExecCmd(CmdLine, g_pEnv, pStdOut, pStdErr);
+ return ExecCmd(CmdLine, "", pStdOut, pStdErr);
}