diff options
author | Yonghong Zhu <yonghong.zhu@intel.com> | 2018-06-12 13:01:00 +0800 |
---|---|---|
committer | Yonghong Zhu <yonghong.zhu@intel.com> | 2018-06-14 14:27:34 +0800 |
commit | b1aff264bf6a007a27d0ebadcce96b72b727c3c8 (patch) | |
tree | a7ef06bc7f00d720456acfdc82991529baa8e80b /BaseTools/Source/Python/AutoGen | |
parent | cbba5ca104fbc8baa0c613951e833e1a07bb34df (diff) | |
download | edk2-b1aff264bf6a007a27d0ebadcce96b72b727c3c8.tar.gz edk2-b1aff264bf6a007a27d0ebadcce96b72b727c3c8.tar.bz2 edk2-b1aff264bf6a007a27d0ebadcce96b72b727c3c8.zip |
BaseTools: remove including Base.h if the module type is not BASE
According the module type to include the header file.
Fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=867
Contributed-under: TianoCore Contribution Agreement 1.1
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/GenC.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/BaseTools/Source/Python/AutoGen/GenC.py b/BaseTools/Source/Python/AutoGen/GenC.py index 972e1aea1b..ae3af085a1 100644 --- a/BaseTools/Source/Python/AutoGen/GenC.py +++ b/BaseTools/Source/Python/AutoGen/GenC.py @@ -2013,9 +2013,7 @@ def CreateHeaderCode(Info, AutoGenC, AutoGenH): AutoGenH.Append(gAutoGenHCppPrologueString)
if Info.AutoGenVersion >= 0x00010005:
# header files includes
- AutoGenH.Append("#include <%s>\n" % gBasicHeaderFile)
- if Info.ModuleType in gModuleTypeHeaderFile \
- and gModuleTypeHeaderFile[Info.ModuleType][0] != gBasicHeaderFile:
+ if Info.ModuleType in gModuleTypeHeaderFile:
AutoGenH.Append("#include <%s>\n" % gModuleTypeHeaderFile[Info.ModuleType][0])
#
# if either PcdLib in [LibraryClasses] sections or there exist Pcd section, add PcdLib.h
|