Move Python Init from InitializeForLLGS to Initialize

Linux configure+make builds have ~175 tests failing that aren't
failing in cmake builds.  The tests have error messages like
"'a.out' doesn't contain the architecture x86-64"  ObjectFileELF
plugin wasn't loaded when this message was output.
    
I found ScriptInterpreterPython::InitializePrivate() is calling
Debugger::Terminate(), which terminates ObjectFileELF (and lots
of other stuff) setup earlier in the InitializeForLLGS.
    
So I moved python Init/Term from Init/TermForLLGS to Init/Term

llvm-svn: 231550
This commit is contained in:
Vince Harron 2015-03-07 03:37:15 +00:00
parent 923147b954
commit b3237de6e4

View File

@ -186,11 +186,6 @@ lldb_private::InitializeForLLGS ()
PlatformDarwinKernel::Initialize();
ObjectFileMachO::Initialize();
#endif
#ifndef LLDB_DISABLE_PYTHON
ScriptInterpreterPython::InitializePrivate();
OperatingSystemPython::Initialize();
#endif
}
}
@ -206,6 +201,12 @@ lldb_private::Initialize ()
if (!g_inited)
{
g_inited = true;
#ifndef LLDB_DISABLE_PYTHON
ScriptInterpreterPython::InitializePrivate();
OperatingSystemPython::Initialize();
#endif
// Initialize LLVM and Clang
llvm::InitializeAllTargets();
llvm::InitializeAllAsmPrinters();
@ -304,9 +305,6 @@ lldb_private::TerminateLLGS ()
PlatformDarwinKernel::Terminate();
SymbolVendorMacOSX::Terminate();
#endif
#ifndef LLDB_DISABLE_PYTHON
OperatingSystemPython::Terminate();
#endif
Log::Terminate();
}
@ -350,6 +348,11 @@ lldb_private::Terminate ()
PlatformRemoteGDBServer::Terminate();
ProcessGDBRemote::Terminate();
DynamicLoaderStatic::Terminate();
#ifndef LLDB_DISABLE_PYTHON
OperatingSystemPython::Terminate();
#endif
TerminateLLGS();
}