summaryrefslogtreecommitdiffstats
path: root/BaseTools
diff options
context:
space:
mode:
authorChen, Christine <Yuwei.Chen@intel.com>2022-06-30 17:04:05 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2022-07-17 03:33:41 +0000
commit039bdb4d3e96f9c9264abf135b8a0eef2e2b4860 (patch)
tree2ba4a4a04a0c20c2f7d0b1f0ff038623ba0cd609 /BaseTools
parent176016387f0a6ad16efcfdcef19fd90bdc3a77e4 (diff)
downloadedk2-039bdb4d3e96f9c9264abf135b8a0eef2e2b4860.tar.gz
edk2-039bdb4d3e96f9c9264abf135b8a0eef2e2b4860.tar.bz2
edk2-039bdb4d3e96f9c9264abf135b8a0eef2e2b4860.zip
BaseTools: Fix DSC LibraryClass precedence rule
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3965 Currently DSC LibraryClass precedence rule is not align with DSC Spec. The expectation rule should be: [LibraryClasses.$(ARCH)] < [LibraryClasses.Common.$(MODULE_TYPE)] The actual behavior is: [LibraryClasses.$(ARCH)] > [LibraryClasses.Common.$(MODULE_TYPE)] This patch fixes the issue. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Long1 Huang <long1.huang@intel.com> Cc: Ray Ni <ray.ni@intel.com> Signed-off-by: Yuwei Chen <yuwei.chen@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
Diffstat (limited to 'BaseTools')
-rw-r--r--BaseTools/Source/Python/Workspace/DscBuildData.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py b/BaseTools/Source/Python/Workspace/DscBuildData.py
index e9f68384b4..41f93c93f2 100644
--- a/BaseTools/Source/Python/Workspace/DscBuildData.py
+++ b/BaseTools/Source/Python/Workspace/DscBuildData.py
@@ -872,7 +872,7 @@ class DscBuildData(PlatformBuildClassObject):
if ModuleType != TAB_COMMON and ModuleType not in SUP_MODULE_LIST:
EdkLogger.error('build', OPTION_UNKNOWN, "Unknown module type [%s]" % ModuleType,
File=self.MetaFile, ExtraData=LibraryInstance, Line=LineNo)
- LibraryClassDict[Arch, ModuleType, LibraryClass] = LibraryInstance
+ LibraryClassDict[ModuleType, Arch, LibraryClass] = LibraryInstance
if LibraryInstance not in self._LibraryInstances:
self._LibraryInstances.append(LibraryInstance)
@@ -881,7 +881,7 @@ class DscBuildData(PlatformBuildClassObject):
for LibraryClass in LibraryClassSet:
# try all possible module types
for ModuleType in SUP_MODULE_LIST:
- LibraryInstance = LibraryClassDict[self._Arch, ModuleType, LibraryClass]
+ LibraryInstance = LibraryClassDict[ModuleType, self._Arch, LibraryClass]
if LibraryInstance is None:
continue
self._LibraryClasses[LibraryClass, ModuleType] = LibraryInstance