[edk2-devel] [Patch] BaseTools: Fix the bug of --cmd-len build option

Bob Feng posted 1 patch 1 month ago
Failed in applying to current master (apply log)
BaseTools/Source/Python/AutoGen/AutoGenWorker.py | 1 +
BaseTools/Source/Python/AutoGen/DataPipe.py      | 2 ++
2 files changed, 3 insertions(+)

[edk2-devel] [Patch] BaseTools: Fix the bug of --cmd-len build option

Posted by Bob Feng 1 month ago
currently the --cmd-len build option does not work.
This patch is going to fix this bug.

Signed-off-by: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Yuwei Chen <yuwei.chen@intel.com>
---
 BaseTools/Source/Python/AutoGen/AutoGenWorker.py | 1 +
 BaseTools/Source/Python/AutoGen/DataPipe.py      | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/BaseTools/Source/Python/AutoGen/AutoGenWorker.py b/BaseTools/Source/Python/AutoGen/AutoGenWorker.py
index 0425f1ab0b..eea15239d4 100755
--- a/BaseTools/Source/Python/AutoGen/AutoGenWorker.py
+++ b/BaseTools/Source/Python/AutoGen/AutoGenWorker.py
@@ -196,10 +196,11 @@ class AutoGenWorkerInProcess(mp.Process):
                 workspacedir,active_p,target,toolchain,archlist
                 )
             self.Wa._SrcTimeStamp = self.data_pipe.Get("Workspace_timestamp")
             GlobalData.gGlobalDefines = self.data_pipe.Get("G_defines")
             GlobalData.gCommandLineDefines = self.data_pipe.Get("CL_defines")
+            GlobalData.gCommandMaxLength = self.data_pipe.Get('gCommandMaxLength')
             os.environ._data = self.data_pipe.Get("Env_Var")
             GlobalData.gWorkspace = workspacedir
             GlobalData.gDisableIncludePathCheck = False
             GlobalData.gFdfParser = self.data_pipe.Get("FdfParser")
             GlobalData.gDatabasePath = self.data_pipe.Get("DatabasePath")
diff --git a/BaseTools/Source/Python/AutoGen/DataPipe.py b/BaseTools/Source/Python/AutoGen/DataPipe.py
index 86ac2b928d..41af343f62 100755
--- a/BaseTools/Source/Python/AutoGen/DataPipe.py
+++ b/BaseTools/Source/Python/AutoGen/DataPipe.py
@@ -146,10 +146,12 @@ class MemoryDataPipe(DataPipe):
 
         self.DataContainer = {"G_defines": GlobalData.gGlobalDefines}
 
         self.DataContainer = {"CL_defines": GlobalData.gCommandLineDefines}
 
+        self.DataContainer = {"gCommandMaxLength": GlobalData.gCommandMaxLength}
+
         self.DataContainer = {"Env_Var": {k:v for k, v in os.environ.items()}}
 
         self.DataContainer = {"PackageList": [(dec.MetaFile,dec.Arch) for dec in PlatformInfo.PackageList]}
 
         self.DataContainer = {"GuidDict": PlatformInfo.Platform._GuidDict}
-- 
2.18.0.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#85213): https://edk2.groups.io/g/devel/message/85213
Mute This Topic: https://groups.io/mt/87937715/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-


[edk2-devel] 回复: [Patch] BaseTools: Fix the bug of --cmd-len build option

Posted by gaoliming 3 weeks ago
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>

> -----邮件原件-----
> 发件人: Bob Feng <bob.c.feng@intel.com>
> 发送时间: 2021年12月24日 22:50
> 收件人: devel@edk2.groups.io
> 抄送: Bob Feng <bob.c.feng@intel.com>; Liming Gao
> <gaoliming@byosoft.com.cn>; Yuwei Chen <yuwei.chen@intel.com>
> 主题: [Patch] BaseTools: Fix the bug of --cmd-len build option
> 
> currently the --cmd-len build option does not work.
> This patch is going to fix this bug.
> 
> Signed-off-by: Bob Feng <bob.c.feng@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Yuwei Chen <yuwei.chen@intel.com>
> ---
>  BaseTools/Source/Python/AutoGen/AutoGenWorker.py | 1 +
>  BaseTools/Source/Python/AutoGen/DataPipe.py      | 2 ++
>  2 files changed, 3 insertions(+)
> 
> diff --git a/BaseTools/Source/Python/AutoGen/AutoGenWorker.py
> b/BaseTools/Source/Python/AutoGen/AutoGenWorker.py
> index 0425f1ab0b..eea15239d4 100755
> --- a/BaseTools/Source/Python/AutoGen/AutoGenWorker.py
> +++ b/BaseTools/Source/Python/AutoGen/AutoGenWorker.py
> @@ -196,10 +196,11 @@ class AutoGenWorkerInProcess(mp.Process):
>                  workspacedir,active_p,target,toolchain,archlist
>                  )
>              self.Wa._SrcTimeStamp =
> self.data_pipe.Get("Workspace_timestamp")
>              GlobalData.gGlobalDefines = self.data_pipe.Get("G_defines")
>              GlobalData.gCommandLineDefines =
> self.data_pipe.Get("CL_defines")
> +            GlobalData.gCommandMaxLength =
> self.data_pipe.Get('gCommandMaxLength')
>              os.environ._data = self.data_pipe.Get("Env_Var")
>              GlobalData.gWorkspace = workspacedir
>              GlobalData.gDisableIncludePathCheck = False
>              GlobalData.gFdfParser = self.data_pipe.Get("FdfParser")
>              GlobalData.gDatabasePath =
> self.data_pipe.Get("DatabasePath")
> diff --git a/BaseTools/Source/Python/AutoGen/DataPipe.py
> b/BaseTools/Source/Python/AutoGen/DataPipe.py
> index 86ac2b928d..41af343f62 100755
> --- a/BaseTools/Source/Python/AutoGen/DataPipe.py
> +++ b/BaseTools/Source/Python/AutoGen/DataPipe.py
> @@ -146,10 +146,12 @@ class MemoryDataPipe(DataPipe):
> 
>          self.DataContainer = {"G_defines": GlobalData.gGlobalDefines}
> 
>          self.DataContainer = {"CL_defines":
> GlobalData.gCommandLineDefines}
> 
> +        self.DataContainer = {"gCommandMaxLength":
> GlobalData.gCommandMaxLength}
> +
>          self.DataContainer = {"Env_Var": {k:v for k, v in
> os.environ.items()}}
> 
>          self.DataContainer = {"PackageList": [(dec.MetaFile,dec.Arch) for
> dec in PlatformInfo.PackageList]}
> 
>          self.DataContainer = {"GuidDict":
PlatformInfo.Platform._GuidDict}
> --
> 2.18.0.windows.1





-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#85271): https://edk2.groups.io/g/devel/message/85271
Mute This Topic: https://groups.io/mt/88183968/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [edk2-devel] [Patch] BaseTools: Fix the bug of --cmd-len build option

Posted by Yuwei Chen 3 weeks, 6 days ago
This patch looks good to me.

Reviewed-by: Yuwei Chen<yuwei.chen@intel.com>

> -----Original Message-----
> From: Feng, Bob C <bob.c.feng@intel.com>
> Sent: Friday, December 24, 2021 10:50 PM
> To: devel@edk2.groups.io
> Cc: Feng, Bob C <bob.c.feng@intel.com>; Gao, Liming
> <gaoliming@byosoft.com.cn>; Chen, Christine <yuwei.chen@intel.com>
> Subject: [Patch] BaseTools: Fix the bug of --cmd-len build option
> 
> currently the --cmd-len build option does not work.
> This patch is going to fix this bug.
> 
> Signed-off-by: Bob Feng <bob.c.feng@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Yuwei Chen <yuwei.chen@intel.com>
> ---
>  BaseTools/Source/Python/AutoGen/AutoGenWorker.py | 1 +
>  BaseTools/Source/Python/AutoGen/DataPipe.py      | 2 ++
>  2 files changed, 3 insertions(+)
> 
> diff --git a/BaseTools/Source/Python/AutoGen/AutoGenWorker.py
> b/BaseTools/Source/Python/AutoGen/AutoGenWorker.py
> index 0425f1ab0b..eea15239d4 100755
> --- a/BaseTools/Source/Python/AutoGen/AutoGenWorker.py
> +++ b/BaseTools/Source/Python/AutoGen/AutoGenWorker.py
> @@ -196,10 +196,11 @@ class AutoGenWorkerInProcess(mp.Process):
>                  workspacedir,active_p,target,toolchain,archlist
>                  )
>              self.Wa._SrcTimeStamp =
> self.data_pipe.Get("Workspace_timestamp")
>              GlobalData.gGlobalDefines = self.data_pipe.Get("G_defines")
>              GlobalData.gCommandLineDefines = self.data_pipe.Get("CL_defines")
> +            GlobalData.gCommandMaxLength =
> self.data_pipe.Get('gCommandMaxLength')
>              os.environ._data = self.data_pipe.Get("Env_Var")
>              GlobalData.gWorkspace = workspacedir
>              GlobalData.gDisableIncludePathCheck = False
>              GlobalData.gFdfParser = self.data_pipe.Get("FdfParser")
>              GlobalData.gDatabasePath = self.data_pipe.Get("DatabasePath")
> diff --git a/BaseTools/Source/Python/AutoGen/DataPipe.py
> b/BaseTools/Source/Python/AutoGen/DataPipe.py
> index 86ac2b928d..41af343f62 100755
> --- a/BaseTools/Source/Python/AutoGen/DataPipe.py
> +++ b/BaseTools/Source/Python/AutoGen/DataPipe.py
> @@ -146,10 +146,12 @@ class MemoryDataPipe(DataPipe):
> 
>          self.DataContainer = {"G_defines": GlobalData.gGlobalDefines}
> 
>          self.DataContainer = {"CL_defines": GlobalData.gCommandLineDefines}
> 
> +        self.DataContainer = {"gCommandMaxLength":
> GlobalData.gCommandMaxLength}
> +
>          self.DataContainer = {"Env_Var": {k:v for k, v in os.environ.items()}}
> 
>          self.DataContainer = {"PackageList": [(dec.MetaFile,dec.Arch) for dec in
> PlatformInfo.PackageList]}
> 
>          self.DataContainer = {"GuidDict": PlatformInfo.Platform._GuidDict}
> --
> 2.18.0.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#85217): https://edk2.groups.io/g/devel/message/85217
Mute This Topic: https://groups.io/mt/87937715/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-