diff options
author | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-11-09 11:47:35 +0000 |
---|---|---|
committer | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-11-09 11:47:35 +0000 |
commit | b303ea726e1c8ed240dad2bce54821318567eab3 (patch) | |
tree | 355db6226949afd1bfcc87d69e09a320ea9b7bb7 /BaseTools/Source/Python/build | |
parent | 4c913fe619bd00861270cb0866feb34bcdc1592e (diff) | |
download | edk2-platforms-b303ea726e1c8ed240dad2bce54821318567eab3.tar.xz |
Sync tool code to BuildTools project r1739.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9397 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools/Source/Python/build')
-rw-r--r-- | BaseTools/Source/Python/build/build.py | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Python/build/build.py index 7d14e15420..5f470de926 100644 --- a/BaseTools/Source/Python/build/build.py +++ b/BaseTools/Source/Python/build/build.py @@ -676,7 +676,8 @@ class Build(): def __init__(self, Target, WorkspaceDir, Platform, Module, Arch, ToolChain, BuildTarget, FlashDefinition, FdList=[], FvList=[], MakefileType="nmake", SilentMode=False, ThreadNumber=2, - SkipAutoGen=False, Reparse=False, SkuId=None): + SkipAutoGen=False, Reparse=False, SkuId=None, + ReportFile=None, ReportType=None): self.WorkspaceDir = WorkspaceDir self.Target = Target @@ -695,6 +696,11 @@ class Build(): self.Reparse = Reparse self.SkuId = SkuId self.SpawnMode = True + self.ReportFile = ReportFile + if ReportType == None: + self.ReportType = ['ALL'] + else: + self.ReportType = ReportType self.TargetTxt = TargetTxtClassObject() self.ToolDef = ToolDefClassObject() @@ -954,7 +960,9 @@ class Build(): self.Fdf, self.FdList, self.FvList, - self.SkuId + self.SkuId, + self.ReportFile, + self.ReportType ) self.Progress.Stop("done!") self._Build(self.Target, Wa) @@ -980,7 +988,9 @@ class Build(): self.Fdf, self.FdList, self.FvList, - self.SkuId + self.SkuId, + self.ReportFile, + self.ReportType ) Wa.CreateMakeFile(False) self.Progress.Stop("done!") @@ -1018,7 +1028,9 @@ class Build(): self.Fdf, self.FdList, self.FvList, - self.SkuId + self.SkuId, + self.ReportFile, + self.ReportType ) Wa.CreateMakeFile(False) @@ -1253,6 +1265,10 @@ def MyOptionParser(): Parser.add_option("-d", "--debug", action="store", type="int", help="Enable debug messages at specified level.") Parser.add_option("-D", "--define", action="append", type="string", dest="Macros", help="Macro: \"Name [= Value]\".") + Parser.add_option("-y", "--report-file", action="store", dest="ReportFile", help="Put build report in specified file.") + Parser.add_option("-Y", "--report-type", action="append", type="choice", choices=['ALL','PCD',], dest="ReportType", + help="Flags that control the type of build report to generate. Must be one of [ALL, PCD]. To specify more flags, please repeat this option.") + (Opt, Args)=Parser.parse_args() return (Opt, Args) @@ -1358,7 +1374,8 @@ def Main(): Option.TargetArch, Option.ToolChain, Option.BuildTarget, Option.FdfFile, Option.RomImage, Option.FvImage, None, Option.SilentMode, Option.ThreadNumber, - Option.SkipAutoGen, Option.Reparse, Option.SkuId) + Option.SkipAutoGen, Option.Reparse, Option.SkuId, + Option.ReportFile, Option.ReportType) MyBuild.Launch() #MyBuild.DumpBuildData() except FatalError, X: |