BaseTools: Add HOST_APPLICATION module type.
It can be used to indicate a module can be build to run as OS application and run in OS environment. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Signed-off-by: Xiaoyu Lu <xiaoyux.lu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
@@ -3543,7 +3543,7 @@ class FdfParser:
|
||||
SUP_MODULE_DXE_CORE, SUP_MODULE_DXE_DRIVER,
|
||||
SUP_MODULE_DXE_SAL_DRIVER, SUP_MODULE_DXE_SMM_DRIVER,
|
||||
SUP_MODULE_DXE_RUNTIME_DRIVER, SUP_MODULE_UEFI_DRIVER,
|
||||
SUP_MODULE_UEFI_APPLICATION, SUP_MODULE_USER_DEFINED,
|
||||
SUP_MODULE_UEFI_APPLICATION, SUP_MODULE_USER_DEFINED, SUP_MODULE_HOST_APPLICATION,
|
||||
TAB_DEFAULT, SUP_MODULE_BASE,
|
||||
EDK_COMPONENT_TYPE_SECURITY_CORE,
|
||||
EDK_COMPONENT_TYPE_COMBINED_PEIM_DRIVER,
|
||||
|
@@ -25,6 +25,7 @@ from . import RuleComplexFile
|
||||
from CommonDataClass.FdfClass import FfsInfStatementClassObject
|
||||
from Common.MultipleWorkspace import MultipleWorkspace as mws
|
||||
from Common.DataType import SUP_MODULE_USER_DEFINED
|
||||
from Common.DataType import SUP_MODULE_HOST_APPLICATION
|
||||
from Common.StringUtils import *
|
||||
from Common.Misc import PathClass
|
||||
from Common.Misc import GuidStructureByteArrayToGuidString
|
||||
@@ -84,12 +85,12 @@ class FfsInfStatement(FfsInfStatementClassObject):
|
||||
self.FinalTargetSuffixMap.setdefault(os.path.splitext(File)[1], []).append(File)
|
||||
|
||||
# Check if current INF module has DEPEX
|
||||
if '.depex' not in self.FinalTargetSuffixMap and self.InfModule.ModuleType != SUP_MODULE_USER_DEFINED \
|
||||
if '.depex' not in self.FinalTargetSuffixMap and self.InfModule.ModuleType != SUP_MODULE_USER_DEFINED and self.InfModule.ModuleType != SUP_MODULE_HOST_APPLICATION \
|
||||
and not self.InfModule.DxsFile and not self.InfModule.LibraryClass:
|
||||
ModuleType = self.InfModule.ModuleType
|
||||
PlatformDataBase = GenFdsGlobalVariable.WorkSpace.BuildObject[GenFdsGlobalVariable.ActivePlatform, self.CurrentArch, GenFdsGlobalVariable.TargetName, GenFdsGlobalVariable.ToolChainTag]
|
||||
|
||||
if ModuleType != SUP_MODULE_USER_DEFINED:
|
||||
if ModuleType != SUP_MODULE_USER_DEFINED and ModuleType != SUP_MODULE_HOST_APPLICATION:
|
||||
for LibraryClass in PlatformDataBase.LibraryClasses.GetKeys():
|
||||
if LibraryClass.startswith("NULL") and PlatformDataBase.LibraryClasses[LibraryClass, ModuleType]:
|
||||
self.InfModule.LibraryClasses[LibraryClass] = PlatformDataBase.LibraryClasses[LibraryClass, ModuleType]
|
||||
@@ -378,7 +379,7 @@ class FfsInfStatement(FfsInfStatementClassObject):
|
||||
#
|
||||
# Only patch file if FileType is PE32 or ModuleType is USER_DEFINED
|
||||
#
|
||||
if FileType != BINARY_FILE_TYPE_PE32 and self.ModuleType != SUP_MODULE_USER_DEFINED:
|
||||
if FileType != BINARY_FILE_TYPE_PE32 and self.ModuleType != SUP_MODULE_USER_DEFINED and self.ModuleType != SUP_MODULE_HOST_APPLICATION:
|
||||
return EfiFile
|
||||
|
||||
#
|
||||
|
Reference in New Issue
Block a user