diff options
author | Yonghong Zhu <yonghong.zhu@intel.com> | 2016-05-10 17:58:26 +0800 |
---|---|---|
committer | Yonghong Zhu <yonghong.zhu@intel.com> | 2016-05-18 08:59:30 +0800 |
commit | c28d2e1047816164ffec552e4a3375122cbcc6b6 (patch) | |
tree | 20c8ba16e7f4ed1a8ef4f135ef82e79f83ae3580 /BaseTools/Source/Python/AutoGen | |
parent | bba734ab4c7c9b4386d39420983bf61484f65dda (diff) | |
download | edk2-platforms-c28d2e1047816164ffec552e4a3375122cbcc6b6.tar.xz |
BaseTools: support private package definition
EDKII build spec and DEC spec updated to support private package
definition.
If GUID, Protocol or PPI is listed in a DEC file, where the Private
modifier is used in the section tag ([Guids.common.Private] for example),
only modules within the package are permitted to use the GUID, Protocol
or PPI. If a module or library instance outside of the package attempts
to use the item, the build must fail with an appropriate error message.
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/AutoGen')
-rw-r--r-- | BaseTools/Source/Python/AutoGen/AutoGen.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py index 0664101008..8da441f6b9 100644 --- a/BaseTools/Source/Python/AutoGen/AutoGen.py +++ b/BaseTools/Source/Python/AutoGen/AutoGen.py @@ -2174,7 +2174,7 @@ class PlatformAutoGen(AutoGen): for SkuId in PcdInModule.SkuInfoList:
Sku = PcdInModule.SkuInfoList[SkuId]
if Sku.VariableGuid == '': continue
- Sku.VariableGuidValue = GuidValue(Sku.VariableGuid, self.PackageList)
+ Sku.VariableGuidValue = GuidValue(Sku.VariableGuid, self.PackageList, self.MetaFile.Path)
if Sku.VariableGuidValue == None:
PackageList = "\n\t".join([str(P) for P in self.PackageList])
EdkLogger.error(
@@ -3395,7 +3395,11 @@ class ModuleAutoGen(AutoGen): PackageDir = mws.join(self.WorkspaceDir, Package.MetaFile.Dir)
if PackageDir not in self._IncludePathList:
self._IncludePathList.append(PackageDir)
- for Inc in Package.Includes:
+ IncludesList = Package.Includes
+ if Package._PrivateIncludes:
+ if not self.MetaFile.Path.startswith(PackageDir):
+ IncludesList = list(set(Package.Includes).difference(set(Package._PrivateIncludes)))
+ for Inc in IncludesList:
if Inc not in self._IncludePathList:
self._IncludePathList.append(str(Inc))
return self._IncludePathList
@@ -3462,7 +3466,7 @@ class ModuleAutoGen(AutoGen): for SkuName in Pcd.SkuInfoList:
SkuInfo = Pcd.SkuInfoList[SkuName]
Name = ConvertStringToByteArray(SkuInfo.VariableName)
- Value = GuidValue(SkuInfo.VariableGuid, self.PlatformInfo.PackageList)
+ Value = GuidValue(SkuInfo.VariableGuid, self.PlatformInfo.PackageList, self.MetaFile.Path)
if not Value:
continue
Guid = GuidStructureStringToGuidString(Value)
|