]> git.proxmox.com Git - mirror_edk2.git/commitdiff
This patch is going to:
authorHess Chen <hesheng.chen@intel.com>
Tue, 26 Aug 2014 07:14:38 +0000 (07:14 +0000)
committerhchen30 <hchen30@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 26 Aug 2014 07:14:38 +0000 (07:14 +0000)
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

BaseTools/Source/Python/AutoGen/AutoGen.py
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py
BaseTools/Source/Python/build/build.py

index 2b4ba52e0965b1269a1db41f8f97304fa0547bcf..8c62ac8e72a80e5ba79272a837908b5eabbe7cbf 100644 (file)
@@ -3160,8 +3160,10 @@ class ModuleAutoGen(AutoGen):
     #                                       dependent libraries will be created\r
     #\r
     def CreateMakeFile(self, CreateLibraryMakeFile=True):\r
+        # Ignore generating makefile when it is a binary module\r
         if self.IsBinaryModule:\r
             return\r
+\r
         if self.IsMakeFileCreated:\r
             return\r
 \r
index 8252a3180d9512d494c445cbe0d222bd18131c86..638df1f6ede75f3f3b83cef119d98ef443d68d8d 100644 (file)
@@ -2051,6 +2051,11 @@ class InfBuildData(ModuleBuildClassObject):
             return False\r
     ## Retrieve source files\r
     def _GetSourceFiles(self):\r
+        #Ignore all source files in a binary build mode\r
+        if GlobalData.gIgnoreSource:\r
+            self._Sources = []\r
+            return self._Sources\r
+\r
         if self._Sources == None:\r
             self._Sources = []\r
             RecordList = self._RawData[MODEL_EFI_SOURCE_FILE, self._Arch, self._Platform]\r
index e463a57a911dc0b55d3cdd521949156fface0258..2f8bfb42b123d7fa0badf9ff04b7b03358825704 100644 (file)
@@ -736,6 +736,8 @@ class Build():
         self.BuildReport    = BuildReport(BuildOptions.ReportFile, BuildOptions.ReportType)\r
         self.TargetTxt      = TargetTxtClassObject()\r
         self.ToolDef        = ToolDefClassObject()\r
+        #Set global flag for build mode\r
+        GlobalData.gIgnoreSource = BuildOptions.IgnoreSources\r
         if BuildOptions.DisableCache:\r
             self.Db         = WorkspaceDatabase(":memory:")\r
         else:\r
@@ -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 "\\r
              "will override the setting in [BuildOptions] section of platform DSC.")\r
     Parser.add_option("-N", "--no-cache", action="store_true", dest="DisableCache", default=False, help="Disable build cache mechanism")\r
+    Parser.add_option("--ignore-sources", action="store_true", dest="IgnoreSources", default=False, help="Focus to a binary build and ignore all source files")\r
 \r
     (Opt, Args)=Parser.parse_args()\r
     return (Opt, Args)\r