Revert "BaseTools: Fix DSC LibraryClass precedence rule"

This reverts commit 039bdb4d3e for tag202208.
This brings the behavior changes, and needs more discussion.

Signed-off-by: Liming Gao <gaoliming@byosoft.com.cn>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Bob Feng <bob.c.feng@intel.com>
This commit is contained in:
Liming Gao 2022-08-26 10:06:20 +08:00 committed by mergify[bot]
parent 166c49c212
commit 39ff9769ca
1 changed files with 2 additions and 2 deletions

View File

@ -872,7 +872,7 @@ class DscBuildData(PlatformBuildClassObject):
if ModuleType != TAB_COMMON and ModuleType not in SUP_MODULE_LIST: if ModuleType != TAB_COMMON and ModuleType not in SUP_MODULE_LIST:
EdkLogger.error('build', OPTION_UNKNOWN, "Unknown module type [%s]" % ModuleType, EdkLogger.error('build', OPTION_UNKNOWN, "Unknown module type [%s]" % ModuleType,
File=self.MetaFile, ExtraData=LibraryInstance, Line=LineNo) File=self.MetaFile, ExtraData=LibraryInstance, Line=LineNo)
LibraryClassDict[ModuleType, Arch, LibraryClass] = LibraryInstance LibraryClassDict[Arch, ModuleType, LibraryClass] = LibraryInstance
if LibraryInstance not in self._LibraryInstances: if LibraryInstance not in self._LibraryInstances:
self._LibraryInstances.append(LibraryInstance) self._LibraryInstances.append(LibraryInstance)
@ -881,7 +881,7 @@ class DscBuildData(PlatformBuildClassObject):
for LibraryClass in LibraryClassSet: for LibraryClass in LibraryClassSet:
# try all possible module types # try all possible module types
for ModuleType in SUP_MODULE_LIST: for ModuleType in SUP_MODULE_LIST:
LibraryInstance = LibraryClassDict[ModuleType, self._Arch, LibraryClass] LibraryInstance = LibraryClassDict[self._Arch, ModuleType, LibraryClass]
if LibraryInstance is None: if LibraryInstance is None:
continue continue
self._LibraryClasses[LibraryClass, ModuleType] = LibraryInstance self._LibraryClasses[LibraryClass, ModuleType] = LibraryInstance