forked from OSchip/llvm-project
When PlatformDarwinKernel::ExamineKextForMatchingUUID is given
a FileSpec, UUID, and ArchSpec, and it's opening all the kexts with the same bundle id to see if they're a match, don't set the Arch in the ModuleSpec. If Module::GetObjectFile() sees that the architecture of the kext is a mismatch for the arch we're looking for, it'll spew a warning message to the dev (r217251). Rely on the UUID match to get the correct file if we have a UUID -- we'll get no warning if it's a mismatch. <rdar://problem/18641477> llvm-svn: 219728
This commit is contained in:
parent
0abf613059
commit
63ba883d4b
|
@ -658,12 +658,15 @@ PlatformDarwinKernel::ExamineKextForMatchingUUID (const FileSpec &kext_bundle_pa
|
|||
{
|
||||
ModuleSpec exe_spec (exe_file);
|
||||
exe_spec.GetUUID() = uuid;
|
||||
exe_spec.GetArchitecture() = arch;
|
||||
if (!uuid.IsValid())
|
||||
{
|
||||
exe_spec.GetArchitecture() = arch;
|
||||
}
|
||||
|
||||
// First try to create a ModuleSP with the file / arch and see if the UUID matches.
|
||||
// If that fails (this exec file doesn't have the correct uuid), don't call GetSharedModule
|
||||
// (which may call in to the DebugSymbols framework and therefore can be slow.)
|
||||
ModuleSP module_sp (new Module (exe_file, arch));
|
||||
ModuleSP module_sp (new Module (exe_spec));
|
||||
if (module_sp && module_sp->GetObjectFile() && module_sp->MatchesModuleSpec (exe_spec))
|
||||
{
|
||||
error = ModuleList::GetSharedModule (exe_spec, exe_module_sp, NULL, NULL, NULL);
|
||||
|
|
Loading…
Reference in New Issue