diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-07-16 02:04:54 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-07-16 02:04:54 +0000 |
commit | 494d663175bbaa7db4743105d1efdf78be9cdb03 (patch) | |
tree | 7290794729190259d23db08f67dcd2dd1bf2ef6a /tools/lli | |
parent | 64cc97212346992892b6c92158c08cd93149a882 (diff) | |
download | llvm-494d663175bbaa7db4743105d1efdf78be9cdb03.tar.gz llvm-494d663175bbaa7db4743105d1efdf78be9cdb03.tar.bz2 llvm-494d663175bbaa7db4743105d1efdf78be9cdb03.tar.xz |
Make sure targets are initialized before we do anything, even command line
processing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75888 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/lli')
-rw-r--r-- | tools/lli/lli.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/lli/lli.cpp b/tools/lli/lli.cpp index 788aca01d6..8afdbcad95 100644 --- a/tools/lli/lli.cpp +++ b/tools/lli/lli.cpp @@ -96,6 +96,11 @@ int main(int argc, char **argv, char * const *envp) { LLVMContext &Context = getGlobalContext(); atexit(do_shutdown); // Call llvm_shutdown() on exit. + + // If we have a native target, initialize it to ensure it is linked in and + // usable by the JIT. + InitializeNativeTarget(); + cl::ParseCommandLineOptions(argc, argv, "llvm interpreter & dynamic compiler\n"); @@ -142,10 +147,6 @@ int main(int argc, char **argv, char * const *envp) { case '3': OLvl = CodeGenOpt::Aggressive; break; } - // 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()) |