- EE = ExecutionEngine::create(MP, ForceInterpreter, &ErrorMsg);
- if (!EE && !ErrorMsg.empty()) {
- std::cerr << argv[0] << ":error creating EE: " << ErrorMsg << "\n";
+ // If we have a native target, initialize it to ensure it is linked in and
+ // usable by the JIT.
+ InitializeNativeTarget();
+
+ EE = ExecutionEngine::create(MP, ForceInterpreter, &ErrorMsg, OLvl);
+ if (!EE) {
+ if (!ErrorMsg.empty())
+ errs() << argv[0] << ": error creating EE: " << ErrorMsg << "\n";
+ else
+ errs() << argv[0] << ": unknown error creating EE!\n";