diff options
author | Jiewen Yao <jiewen.yao@intel.com> | 2019-07-01 06:19:13 +0000 |
---|---|---|
committer | Liming Gao <liming.gao@intel.com> | 2019-07-12 21:06:57 +0800 |
commit | a79841a0244ab2afd1efc3b9d4cc91e27fa90d71 (patch) | |
tree | 3f550257719b8801ec901bb311f9c02b83c8731b /BaseTools/Source/Python/Workspace/WorkspaceCommon.py | |
parent | 2d100d1d73a9f9a38f224e87c48276ba1e84d8ce (diff) | |
download | edk2-a79841a0244ab2afd1efc3b9d4cc91e27fa90d71.tar.gz edk2-a79841a0244ab2afd1efc3b9d4cc91e27fa90d71.tar.bz2 edk2-a79841a0244ab2afd1efc3b9d4cc91e27fa90d71.zip |
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>
Diffstat (limited to 'BaseTools/Source/Python/Workspace/WorkspaceCommon.py')
-rw-r--r-- | BaseTools/Source/Python/Workspace/WorkspaceCommon.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/BaseTools/Source/Python/Workspace/WorkspaceCommon.py b/BaseTools/Source/Python/Workspace/WorkspaceCommon.py index 0cc83110ef..41ae684d3e 100644 --- a/BaseTools/Source/Python/Workspace/WorkspaceCommon.py +++ b/BaseTools/Source/Python/Workspace/WorkspaceCommon.py @@ -8,6 +8,7 @@ from __future__ import absolute_import
from collections import OrderedDict, defaultdict
from Common.DataType import SUP_MODULE_USER_DEFINED
+from Common.DataType import SUP_MODULE_HOST_APPLICATION
from .BuildClassObject import LibraryClassObject
import Common.GlobalData as GlobalData
from Workspace.BuildClassObject import StructurePcd
@@ -94,7 +95,7 @@ def GetModuleLibInstances(Module, Platform, BuildDatabase, Arch, Target, Toolcha # If a module has a MODULE_TYPE of USER_DEFINED,
# do not link in NULL library class instances from the global [LibraryClasses.*] sections.
#
- if Module.ModuleType != SUP_MODULE_USER_DEFINED:
+ if Module.ModuleType != SUP_MODULE_USER_DEFINED and Module.ModuleType != SUP_MODULE_HOST_APPLICATION:
for LibraryClass in Platform.LibraryClasses.GetKeys():
if LibraryClass.startswith("NULL") and Platform.LibraryClasses[LibraryClass, Module.ModuleType]:
Module.LibraryClasses[LibraryClass] = Platform.LibraryClasses[LibraryClass, Module.ModuleType]
@@ -137,7 +138,7 @@ def GetModuleLibInstances(Module, Platform, BuildDatabase, Arch, Target, Toolcha LibraryModule.LibraryClass.append(LibraryClassObject(LibraryClassName, [ModuleType]))
elif LibraryModule.LibraryClass is None \
or len(LibraryModule.LibraryClass) == 0 \
- or (ModuleType != SUP_MODULE_USER_DEFINED
+ or (ModuleType != SUP_MODULE_USER_DEFINED and ModuleType != SUP_MODULE_HOST_APPLICATION
and ModuleType not in LibraryModule.LibraryClass[0].SupModList):
# only USER_DEFINED can link against any library instance despite of its SupModList
if FileName:
|