summaryrefslogtreecommitdiffstats
path: root/BaseTools
Commit message (Collapse)AuthorAgeFilesLines
* BaseTool: Support different PCDs that refers to the same EFI variable.bob.c.feng@intel.com2018-09-264-18/+60
| | | | | | | | | | | If Structure PCD and Normal Pcd refer to the same EFI variable, do EFI variable merge, otherwise, do EFI variable combination. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTool: Replace dict with OrderedDict.BobCF2018-09-263-20/+30
| | | | | | | | | | Replace dict with OrderedDict for PCD so that the pcd list has same order. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: Fix the wrong reference _GetSkuIds() in AutoGen codeLiming Gao2018-09-261-1/+1
| | | | | | | | | | | DscBuildData has been updated to define SkuIds instead of _GetSkuIds(). The consumer code should refer to SkuIds. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* BaseTools: Latter full value should overwrite the former field value.Zhao, ZhiqiangX2018-09-252-4/+33
| | | | | | | | | | | | | | | For structure Pcd, the latter full assign value in commandLine should override the former field assign value. For example in commandLine, build --pcd Token.pcd.field="haha" --pcd Token.pcd=H"{0x01,0x02}", the former field value "haha" will be ignored and overwrite by the latter full value "{0x01,0x02}". Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: ZhiqiangX Zhao <zhiqiangx.zhao@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Bob Feng <bob.c.feng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: refactor to cache InfBuildData dataCarsey, Jaben2018-09-201-459/+397
| | | | | | | | | | | use Common.caching and auto cache properties and functions of InfBuildData Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Bob Feng <bob.c.feng@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools: refactor to not overcreate ModuleAutoGen objectsCarsey, Jaben2018-09-201-33/+25
| | | | | | | | | | | | currently created for 3 different purposes and saved once. this makes it created once and saved and then referenced. Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Bob Feng <bob.c.feng@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools: Don't save unused workspace dataCarsey, Jaben2018-09-202-10/+4
| | | | | | | | | | | | | FlexibleFieldName was never used not set. DefinitionPosition (file and line number) are recalculated and never used outside the function. remove the saving of the data. Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools: refactor Build Database objectsCarsey, Jaben2018-09-201-23/+9
| | | | | | | | | | | 1) use namedtuple instead of custom class when apropriate 2) rename collections.OrderedDict to OrderedDict since we import it already Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools: Workspace classes refactor propertiesCarsey, Jaben2018-09-207-235/+228
| | | | | | | | | | | | | | 1) use decorators 2) also change some private functions to public when all callers are external 3) change external callers to use functions instead of directly accessing private data. Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools: refactor class propertiesCarsey, Jaben2018-09-201-52/+38
| | | | | | | | | | | use decorators and auto cache those that were cached manually remove properties never used Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools: AutoGen - refactor class propertiesCarsey, Jaben2018-09-201-12/+8
| | | | | | | | | | use function decorators Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools: AutoGen refactor WorkspaceAutoGen classCarsey, Jaben2018-09-201-41/+28
| | | | | | | | | | | | Update the WorkspaceAutoGen class to use caching decorators and remove the no longer needed private variables. Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Bob Feng <bob.c.feng@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools: Refactor PlatformAutoGenCarsey, Jaben2018-09-201-331/+272
| | | | | | | | | | | | use decorators for property and automatic caching remove circular dependency between some APIs Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Bob Feng <Bob.c.Feng@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools: Fix a bug for Unused PCDs section display in the reportzhijufan2018-09-181-1/+11
| | | | | | | | | | | | Fix a regression issue caused by ac4578af364, when there doesn't exist not used PCD, it also display the not used Pcd section in the report. Fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=1170 Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools: Regression bug Linux script used windows formatYunhua Feng2018-09-182-2/+2
| | | | | | | | | | | | regression by 15e20228258c1714cd90207a52101a5b1b54cd2c and 9f3594782de9051cbf599f9af006903ed3f6669e Linux execute script must use '\n' not '\r\n' for end of line Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yunhua Feng <yunhuax.feng@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools: Check GUID C structure formatFeng, YunhuaX2018-09-142-1/+10
| | | | | | | | | GUID C format must conform to {8,4,4,{2,2,2,2,2,2,2,2}} Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yunhua Feng <yunhuax.feng@intel.com>
* BaseTools: Align the boolean type PCD value's display in the reportzhijufan2018-09-131-2/+17
| | | | | | | | | | | This patch align the boolean type PCD value's display in the build report. Original it may display 0x0, also may use 0 for the same PCD. Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools\GenFds: remove extra contentCarsey, Jaben2018-09-131-56/+0
| | | | | | | | | | | | remove uncalled functions remove extra blank lines remove commented out code Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools: Fix the RaiseError variable issue caused by 855698fb69fYonghong Zhu2018-09-121-2/+2
| | | | | | | | | | | The bug is that it cause the RaiseError always be set to TRUE even we call the function with FALSE parameter. Cc: Hess Chen <hesheng.chen@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Hess Chen <hesheng.chen@intel.com>
* BaseTools: Support multi thread build Basetool on WindowsDongao Guo2018-09-123-13/+182
| | | | | | | | | | | | | | | | | | | | Add NmakeSubdirs.py to replace NmakeSubdirs.bat in VS Makefile. This script will invoke nmake in multi thread mode. It can save more than half time of BaseTools C clean build. GCC make supports multiple thread in make phase. So, GNUmakefile doesn't need apply this script. single task or job=1: just single thread and invoke subprocess,subprocess will use system.stdout to print output. multi task: thread number is logic cpu count.All subprocess output will pass to python script by PIPE and then script print it to system.stdout. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Dongao Guo<dongao.guo@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Test-by: Liming Gao <liming.gao@intel.com>
* BaseTools: SKU inheritance.Zhao, ZhiqiangX2018-09-121-3/+2
| | | | | | | | | | | | | If the SkuB's parent SkuA is not in SKUID_IDENTIFIER, then make SkuB inherit from SkuA as if the SKUID_INDENTIFIER is ALL. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: ZhiqiangX Zhao <zhiqiangx.zhao@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Bob Feng <bob.c.feng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: Correct DXE_PCD_DATABASE_INIT.Zhao, ZhiqiangX2018-09-121-1/+1
| | | | | | | | | | | | Add the handle of PCD_DATABASE_INIT and PCD_DATABASE_UNINIT for Boolean type pcd. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: ZhiqiangX Zhao <zhiqiangx.zhao@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Bob Feng <bob.c.feng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: Check PcdNvStoreDefaultValueBuffer.Zhao, ZhiqiangX2018-09-123-3/+17
| | | | | | | | | | | | | Build tool should report warning if a platform defines [DefaultStores] but forgets to defined PcdNvStoreDefaultValueBuffer as PcdsDynamicExVpd in dsc file. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: ZhiqiangX Zhao <zhiqiangx.zhao@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Bob Feng <bob.c.feng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: Involve Dec default value to calculate MaxsizeFeng, Bob C2018-09-121-17/+17
| | | | | | | | | | | | Involve Dec default value to calculate Maxsize for structure PCD Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Jaben Carsey <jaben.carsey@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Bob Feng <bob.c.feng@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: Structure Pcd value override incorrect.Feng, Bob C2018-09-123-26/+31
| | | | | | | | | | | This patch is going to fix the issue that The Pcd field value is override incorrectly when there is no Pcd overall value assignment in Dsc file. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: Report error for incorrect hex value formatzhijufan2018-09-121-1/+4
| | | | | | | | | | | The case is user use 0x1} as a hex value for Pcd, it directly cause tool report traceback info. This patch add more error info. Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools/GenFds: delete unused fileCarsey, Jaben2018-09-111-28/+0
| | | | | | | | Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools/GenFds: remove function without callersCarsey, Jaben2018-09-071-17/+0
| | | | | | | | Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools: refactor to remove duplicate functionsCarsey, Jaben2018-09-072-25/+7
| | | | | | | | | | | | Update GenFdsGlobalVariable GetAlignment to support G. replace use of local function in Region with updated shared function. Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Bob C Feng <bob.c.feng@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools/PatchCheck.py: Fix error when run with Python3Dandan Bi2018-09-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1145 Currently run PatchCheck.py with Python3 will meet following error: ..... File "PatchCheck.py", line 554, in run_git return Result[0].decode('utf-8', 'ignore') if Result[0] and Result[0].find("fatal")!=0 else None TypeError: a bytes-like object is required, not 'str' This issue was introduce by commit:5ac4548cdf654. This patch is to convert the str object of "fatal" to byte object to fix this failure. Cc: Liming Gao <liming.gao@intel.com> Cc: Jaben Carsey <jaben.carsey@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
* BaseTools: Report more clear error message for PCD used in expressionzhijufan2018-09-062-2/+2
| | | | | | | | | | | Only the FeatureFlag type or FixedAtBuild type can be used in the expression. Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools: Fix a bug about list the PCD in "not used" sectionzhijufan2018-09-061-0/+3
| | | | | | | | | | | | | Defined a pcd in Ovmf.dec and used that pcd in AcpiPlatformDxe.inf, then assign a value to that pcd from DSC, then build Ovmf platform successfully. But this Pcd was wrongly listed into not used section in the report.txt file. Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools: Extend the keyword "!include"/"!if" to case-insensitivezhijufan2018-09-051-0/+2
| | | | | | | | | | | | | Extend the keyword "!include", "!if", etc to case-insensitive. Current DSC parser already support it, while FDF parser only support the lower case, so this patch add the support for FDF parser. Fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=1111 Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools: Fixed the PcdValue trailing zero issue.Feng, Bob C2018-09-032-6/+7
| | | | | | | | | | | 1. Not append trailing zero for PcdValue 2. make sure the point to Variable Name in PCD DataBase 2 bytes aligned. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: Dynamic Pcd value override from command line.Feng, Bob C2018-09-031-1/+6
| | | | | | | | | | Fixed the pcd value override issue when Dynamic Pcd is from command line but is not list in Dsc file. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: Check pcd DefaultValue and SkuId EBNF.Zhaozh1x2018-09-032-4/+6
| | | | | | | | | | | | | 1. When assign dynamic hii pcd value in dsc file, missed the DefaultValue, build should be fail. 2. Check the EBNF of SkuId. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: ZhiqiangX Zhao <zhiqiangx.zhao@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Bob Feng <bob.c.feng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: Clarify a DSC parsing error about PCDsCarsey, Jaben2018-08-311-1/+1
| | | | | | | | | | | This error needs the information about which DEC files were searched. Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Lee Hamel <lee.m.hamel@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools: minimize assignment processingCarsey, Jaben2018-08-301-7/+8
| | | | | | | | | | Reverse the checking and only assign once to each variable. Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools: Refactor to remove functionally equivalent functionsCarsey, Jaben2018-08-302-9/+3
| | | | | | | | | | | | IsSupportedArch and IsBinaryModule return the same value under the same curcimstances. Remove newer one with fewer callers and send them to the other function. Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools: include variable namespace GUIDs of HII PCDs in Guid.xrefzhijufan2018-08-301-0/+11
| | | | | | | | | | | | | | | [PcdsDynamicHii] gFooTokenSpaceGuid.PcdBar|L"Variable"|gVarNameSpaceGuid|0x0|FALSE|NV,BS This patch add the variable namespace GUIDs in "Guid.xref" that are used with dynamic HII PCDs. Fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=452 Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools: Create and use a shared value for 'MSFT' from DataTypeCarsey, Jaben2018-08-309-22/+25
| | | | | | | | | | | I see lots of 'MSFT' throughout code and this can reduce them. Cc: Bob Feng <Bob.c.Feng@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools: AutoGen.py remove unused importCarsey, Jaben2018-08-291-1/+0
| | | | | | | | | | AutoGen does not use anything defined in BuildClassObject Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools: Fix one expression bug to support ~ operateYonghong Zhu2018-08-281-1/+1
| | | | | | | | | current use (0x41>=~0x0&0x41|0x0) as Pcd value cause build failure because the ~ is not correctly recognized. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: Add check only VOID* type Pcd need the maxsize infozhijufan2018-08-283-36/+23
| | | | | | | | | | | Add check for the datum type keyword "VOID*", only the VOID* type Pcd need the additional maxsize info. Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools: Use hashlib instead of md5Feng, YunhuaX2018-08-236-17/+17
| | | | | | | | | | | Use from hashlib import md5 instead of import md5 due to md5 deprecated in python3 Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yunhua Feng <yunhuax.feng@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools: remove cmp due to deprecated in python3Feng, YunhuaX2018-08-232-5/+5
| | | | | | | | | | remove cmp due to deprecated in python3 Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yunhua Feng <yunhuax.feng@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools: Modify class OrderedListDictFeng, YunhuaX2018-08-231-1/+5
| | | | | | | | | | | | class OrderedListDict(OrderedDict, defaultdict) will encounter multiple bases have instance lay-out conflict error on python3 Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yunhua Feng <yunhuax.feng@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools: Update Makefile for ECC toolYonghong Zhu2018-08-231-3/+3
| | | | | | | | | | | V2: Add --target-name to specify the file name to create Because Ecc.py was renamed to EccMain.py Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools/VfrCompile: honor EXTRA_LDFLAGSLaszlo Ersek2018-08-221-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit 81502cee20ac ("BaseTools/Source/C: take EXTRA_LDFLAGS from the caller", 2018-08-16), I missed that "VfrCompile/GNUmakefile" does not use BUILD_LFLAGS in the APPLICATION linking rule, unlike "app.makefile" does. Instead, "VfrCompile/GNUmakefile" uses the (undefined) LFLAGS macro. Therefore commit 81502cee20ac did not cover the linking step of VfrCompile. Thankfully, the structure of the linking rules is the same, between "app.makefile" and "VfrCompile/GNUmakefile". Rename the undefined LFLAGS macro in "VfrCompile/GNUmakefile" to VFR_LFLAGS (for consistency with VFR_CXXFLAGS), and set it to EXTRA_LDFLAGS. As a result, we have: | compilation | linking -----------+--------------------------------+---------------------- VfrCompile | VFR_CXXFLAGS = | VFR_LFLAGS = | BUILD_OPTFLAGS = | EXTRA_LDFLAGS | '-O2' + EXTRA_OPTFLAGS | -----------+--------------------------------+---------------------- other apps | BUILD_CFLAGS/BUILD_CXXFLAGS = | BUILD_LFLAGS = | [...] + BUILD_OPTFLAGS = | [...] + EXTRA_LDFLAGS | [...] + '-O2' + EXTRA_OPTFLAGS | This table shows - that the VfrCompile compilation and linking flags are always a subset of the corresponding flags used by the other apps, - and that the EXTRA flags are always at the end. Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Ref: https://bugzilla.redhat.com/show_bug.cgi?id=1540244 Fixes: 81502cee20ac4046f08bb4aec754c7091c8808dc Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: Fix regression issue by b23414f6540dFeng, YunhuaX2018-08-211-1/+1
| | | | | | | | | | | | | | | V2: Renaming function DepexExpressionTokenList to DepexExpressionDict instead of changing the callers Fix regression issue by b23414f6540d4f336b6f00b44681911d469f9a04 AttributeError: 'ModuleAutoGen' object has no attribute 'DepexExpressionDict' Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yunhua Feng <yunhuax.feng@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>