mirror of https://github.com/acidanthera/audk.git
This patch is going to:
1. Support a force binary build mode by adding “--ignore-source” to command line options. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hess Chen <hesheng.chen@intel.com> Reviewed-by: Yingke Liu <yingke.d.liu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15897 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
421ccda307
commit
fae62ff21a
|
@ -3160,8 +3160,10 @@ class ModuleAutoGen(AutoGen):
|
|||
# dependent libraries will be created
|
||||
#
|
||||
def CreateMakeFile(self, CreateLibraryMakeFile=True):
|
||||
# Ignore generating makefile when it is a binary module
|
||||
if self.IsBinaryModule:
|
||||
return
|
||||
|
||||
if self.IsMakeFileCreated:
|
||||
return
|
||||
|
||||
|
|
|
@ -2051,6 +2051,11 @@ class InfBuildData(ModuleBuildClassObject):
|
|||
return False
|
||||
## Retrieve source files
|
||||
def _GetSourceFiles(self):
|
||||
#Ignore all source files in a binary build mode
|
||||
if GlobalData.gIgnoreSource:
|
||||
self._Sources = []
|
||||
return self._Sources
|
||||
|
||||
if self._Sources == None:
|
||||
self._Sources = []
|
||||
RecordList = self._RawData[MODEL_EFI_SOURCE_FILE, self._Arch, self._Platform]
|
||||
|
|
|
@ -736,6 +736,8 @@ class Build():
|
|||
self.BuildReport = BuildReport(BuildOptions.ReportFile, BuildOptions.ReportType)
|
||||
self.TargetTxt = TargetTxtClassObject()
|
||||
self.ToolDef = ToolDefClassObject()
|
||||
#Set global flag for build mode
|
||||
GlobalData.gIgnoreSource = BuildOptions.IgnoreSources
|
||||
if BuildOptions.DisableCache:
|
||||
self.Db = WorkspaceDatabase(":memory:")
|
||||
else:
|
||||
|
@ -1903,6 +1905,7 @@ def MyOptionParser():
|
|||
"This option can also be specified by setting *_*_*_BUILD_FLAGS in [BuildOptions] section of platform DSC. If they are both specified, this value "\
|
||||
"will override the setting in [BuildOptions] section of platform DSC.")
|
||||
Parser.add_option("-N", "--no-cache", action="store_true", dest="DisableCache", default=False, help="Disable build cache mechanism")
|
||||
Parser.add_option("--ignore-sources", action="store_true", dest="IgnoreSources", default=False, help="Focus to a binary build and ignore all source files")
|
||||
|
||||
(Opt, Args)=Parser.parse_args()
|
||||
return (Opt, Args)
|
||||
|
|
Loading…
Reference in New Issue