diff options
Diffstat (limited to 'BaseTools/Source/Python/Workspace')
-rw-r--r-- | BaseTools/Source/Python/Workspace/InfBuildData.py | 4 | ||||
-rw-r--r-- | BaseTools/Source/Python/Workspace/WorkspaceCommon.py | 11 |
2 files changed, 7 insertions, 8 deletions
diff --git a/BaseTools/Source/Python/Workspace/InfBuildData.py b/BaseTools/Source/Python/Workspace/InfBuildData.py index d10cfea40d..99bbecfd1f 100644 --- a/BaseTools/Source/Python/Workspace/InfBuildData.py +++ b/BaseTools/Source/Python/Workspace/InfBuildData.py @@ -614,7 +614,9 @@ class InfBuildData(ModuleBuildClassObject): Instance = Record[1]
if Instance:
Instance = NormPath(Instance, self._Macros)
- RetVal[Lib] = Instance
+ RetVal[Lib] = Instance
+ else:
+ RetVal[Lib] = None
return RetVal
## Retrieve library names (for Edk.x style of modules)
diff --git a/BaseTools/Source/Python/Workspace/WorkspaceCommon.py b/BaseTools/Source/Python/Workspace/WorkspaceCommon.py index 8d8a3e2789..55d01fa4b2 100644 --- a/BaseTools/Source/Python/Workspace/WorkspaceCommon.py +++ b/BaseTools/Source/Python/Workspace/WorkspaceCommon.py @@ -128,13 +128,10 @@ def GetModuleLibInstances(Module, Platform, BuildDatabase, Arch, Target, Toolcha for LibraryClassName in M.LibraryClasses:
if LibraryClassName not in LibraryInstance:
# override library instance for this module
- if LibraryClassName in Platform.Modules[str(Module)].LibraryClasses:
- LibraryPath = Platform.Modules[str(Module)].LibraryClasses[LibraryClassName]
- else:
- LibraryPath = Platform.LibraryClasses[LibraryClassName, ModuleType]
- if LibraryPath is None or LibraryPath == "":
- LibraryPath = M.LibraryClasses[LibraryClassName]
- if LibraryPath is None or LibraryPath == "":
+ LibraryPath = Platform.Modules[str(Module)].LibraryClasses.get(LibraryClassName,Platform.LibraryClasses[LibraryClassName, ModuleType])
+ if LibraryPath is None:
+ LibraryPath = M.LibraryClasses.get(LibraryClassName)
+ if LibraryPath is None:
if FileName:
EdkLogger.error("build", RESOURCE_NOT_AVAILABLE,
"Instance of library class [%s] is not found" % LibraryClassName,
|