public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [Patch 1/1] BaseTools/Source/C: Use /Z7 instead of /Zi for host tools
@ 2022-11-05 20:35 Michael D Kinney
  2022-11-07  4:23 ` 回复: " gaoliming
  0 siblings, 1 reply; 7+ messages in thread
From: Michael D Kinney @ 2022-11-05 20:35 UTC (permalink / raw)
  To: devel; +Cc: Bob Feng, Liming Gao, Yuwei Chen

REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4139

Update ms.common and *.mak files to use /Z7 instead of /Zi to embed
symbol information in obj files for host tools built with VS compilers.
This prevents vcxxx.pdb files from being generated in the root of
the local edk2 repository or in BaseTools directories.

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Yuwei Chen <yuwei.chen@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
---
 BaseTools/Source/C/Makefiles/ms.common                 | 5 ++---
 BaseTools/Source/C/VfrCompile/Pccts/antlr/AntlrDDK.mak | 4 ++--
 BaseTools/Source/C/VfrCompile/Pccts/antlr/AntlrMS.mak  | 6 +++---
 BaseTools/Source/C/VfrCompile/Pccts/dlg/DlgDDK.mak     | 4 ++--
 BaseTools/Source/C/VfrCompile/Pccts/dlg/DlgMS.mak      | 7 +++----
 5 files changed, 12 insertions(+), 14 deletions(-)

diff --git a/BaseTools/Source/C/Makefiles/ms.common b/BaseTools/Source/C/Makefiles/ms.common
index b2dbcf376c04..8391f10d5dd2 100644
--- a/BaseTools/Source/C/Makefiles/ms.common
+++ b/BaseTools/Source/C/Makefiles/ms.common
@@ -57,6 +57,5 @@ LINKER = $(LD)
 
 INC = $(INC) -I . -I $(SOURCE_PATH)\Include -I $(ARCH_INCLUDE) -I $(SOURCE_PATH)\Common
 
-CFLAGS = $(CFLAGS) /nologo /Zi /c /O2 /MT /W4 /WX /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE
-CPPFLAGS = $(CPPFLAGS) /EHsc /nologo /Zi /c /O2 /MT /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE
-
+CFLAGS = $(CFLAGS) /nologo /Z7 /c /O2 /MT /W4 /WX /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE
+CPPFLAGS = $(CPPFLAGS) /EHsc /nologo /Z7 /c /O2 /MT /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE
diff --git a/BaseTools/Source/C/VfrCompile/Pccts/antlr/AntlrDDK.mak b/BaseTools/Source/C/VfrCompile/Pccts/antlr/AntlrDDK.mak
index 71b7c6b0b141..cde91a47159e 100644
--- a/BaseTools/Source/C/VfrCompile/Pccts/antlr/AntlrDDK.mak
+++ b/BaseTools/Source/C/VfrCompile/Pccts/antlr/AntlrDDK.mak
@@ -16,7 +16,7 @@ SET=$(PCCTS_HOME)\support\set
 # Compiler stuff
 CC = cl
 CFLAGS = /nologo -I "." -I "$(PCCTS_H)" -I "$(SET)" -D "USER_ZZSYN" -D "PC" \
-        -D "ZZLEXBUFSIZE=65536"  -D "LONGFILENAMES" /Zi /W3 -D__USE_PROTOS /wd4700
+        -D "ZZLEXBUFSIZE=65536"  -D "LONGFILENAMES" /Z7 /W3 -D__USE_PROTOS /wd4700
 
 ANTLR_OBJS = antlr.obj scan.obj err.obj bits.obj build.obj fset2.obj \
             fset.obj gen.obj globals.obj hash.obj lex.obj main.obj \
@@ -225,7 +225,7 @@ set.obj: $(SET)\set.c \
 
     $(CC) -c $(CFLAGS) $(SET)\set.c
 
-clean:	
+clean:
     del *.obj
 
 distclean:
diff --git a/BaseTools/Source/C/VfrCompile/Pccts/antlr/AntlrMS.mak b/BaseTools/Source/C/VfrCompile/Pccts/antlr/AntlrMS.mak
index b30a73bb7424..6fc4d5c15d6c 100644
--- a/BaseTools/Source/C/VfrCompile/Pccts/antlr/AntlrMS.mak
+++ b/BaseTools/Source/C/VfrCompile/Pccts/antlr/AntlrMS.mak
@@ -16,8 +16,8 @@ SET=$(PCCTS_HOME)\support\set
 # Compiler stuff
 CC = cl
 CFLAGS = /nologo -I "." -I "$(PCCTS_H)" -I "$(SET)" -D "USER_ZZSYN" -D "PC" \
-        -D "ZZLEXBUFSIZE=65536"  /D "LONGFILENAMES" /Zi /W3 -D__USE_PROTOS /wd4700 \
-         /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE 
+        -D "ZZLEXBUFSIZE=65536"  /D "LONGFILENAMES" /Z7 /W3 -D__USE_PROTOS /wd4700 \
+         /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE
 
 ANTLR_OBJS = antlr.obj scan.obj err.obj bits.obj build.obj fset2.obj \
             fset.obj gen.obj globals.obj hash.obj lex.obj main.obj \
@@ -226,7 +226,7 @@ set.obj: $(SET)\set.c \
 
     $(CC) -c $(CFLAGS) $(SET)\set.c
 
-clean:	
+clean:
     -del *.obj
     -del *.ilk
     -del *.pdb
diff --git a/BaseTools/Source/C/VfrCompile/Pccts/dlg/DlgDDK.mak b/BaseTools/Source/C/VfrCompile/Pccts/dlg/DlgDDK.mak
index 156d524acc94..dcc259543c4c 100644
--- a/BaseTools/Source/C/VfrCompile/Pccts/dlg/DlgDDK.mak
+++ b/BaseTools/Source/C/VfrCompile/Pccts/dlg/DlgDDK.mak
@@ -16,7 +16,7 @@ SET=$(PCCTS_HOME)\support\set
 # Compiler stuff
 CC = cl
 CFLAGS = /nologo -I "." -I "$(PCCTS_H)" -I "$(SET)" -D "USER_ZZSYN" -D "PC" \
-        -D "ZZLEXBUFSIZE=65536"  /D "LONGFILENAMES" /W3 /Zi
+        -D "ZZLEXBUFSIZE=65536"  /D "LONGFILENAMES" /W3 /Z7
 
 DLG_OBJS = dlg_p.obj dlg_a.obj main.obj err.obj support.obj \
            output.obj relabel.obj automata.obj
@@ -113,7 +113,7 @@ set.obj: $(SET)\set.c \
 
     $(CC) -c $(CFLAGS) $(SET)\set.c
 
-clean:	
+clean:
     del *.obj
 
 distclean:
diff --git a/BaseTools/Source/C/VfrCompile/Pccts/dlg/DlgMS.mak b/BaseTools/Source/C/VfrCompile/Pccts/dlg/DlgMS.mak
index 2714308d4fa0..c2cac00f53df 100644
--- a/BaseTools/Source/C/VfrCompile/Pccts/dlg/DlgMS.mak
+++ b/BaseTools/Source/C/VfrCompile/Pccts/dlg/DlgMS.mak
@@ -16,8 +16,8 @@ SET=$(PCCTS_HOME)\support\set
 # Compiler stuff
 CC = cl
 CFLAGS = /nologo -I "." -I "$(PCCTS_H)" -I "$(SET)" -D "USER_ZZSYN" -D "PC" \
-        -D "ZZLEXBUFSIZE=65536"  /D "LONGFILENAMES" /W3 /Zi \
-        /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE 
+        -D "ZZLEXBUFSIZE=65536"  /D "LONGFILENAMES" /W3 /Z7 \
+        /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE
 
 DLG_OBJS = dlg_p.obj dlg_a.obj main.obj err.obj support.obj \
            output.obj relabel.obj automata.obj
@@ -112,7 +112,7 @@ set.obj: $(SET)\set.c \
 
     $(CC) -c $(CFLAGS) $(SET)\set.c
 
-clean:	
+clean:
     -del *.obj
     -del *.ilk
     -del *.pdb
@@ -123,4 +123,3 @@ cleanall:
     -del *.pdb
 		-del *.exe
     -del $(EDK_TOOLS_PATH)\Bin\Win32\dlg.exe
-
-- 
2.37.1.windows.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* 回复: [Patch 1/1] BaseTools/Source/C: Use /Z7 instead of /Zi for host tools
  2022-11-05 20:35 [Patch 1/1] BaseTools/Source/C: Use /Z7 instead of /Zi for host tools Michael D Kinney
@ 2022-11-07  4:23 ` gaoliming
  2022-11-07  7:20   ` [edk2-devel] " Michael D Kinney
  0 siblings, 1 reply; 7+ messages in thread
From: gaoliming @ 2022-11-07  4:23 UTC (permalink / raw)
  To: 'Michael D Kinney', devel
  Cc: 'Bob Feng', 'Yuwei Chen'

Mike:
  I suggest to remove /Zi and /DEBUG option for BaseTools C tool generation,
because only tool developer may require the debug version C tool. 

Thanks
Liming
> -----邮件原件-----
> 发件人: Michael D Kinney <michael.d.kinney@intel.com>
> 发送时间: 2022年11月6日 4:36
> 收件人: devel@edk2.groups.io
> 抄送: Bob Feng <bob.c.feng@intel.com>; Liming Gao
> <gaoliming@byosoft.com.cn>; Yuwei Chen <yuwei.chen@intel.com>
> 主题: [Patch 1/1] BaseTools/Source/C: Use /Z7 instead of /Zi for host
tools
> 
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4139
> 
> Update ms.common and *.mak files to use /Z7 instead of /Zi to embed
> symbol information in obj files for host tools built with VS compilers.
> This prevents vcxxx.pdb files from being generated in the root of
> the local edk2 repository or in BaseTools directories.
> 
> Cc: Bob Feng <bob.c.feng@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Yuwei Chen <yuwei.chen@intel.com>
> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
> ---
>  BaseTools/Source/C/Makefiles/ms.common                 | 5 ++---
>  BaseTools/Source/C/VfrCompile/Pccts/antlr/AntlrDDK.mak | 4 ++--
>  BaseTools/Source/C/VfrCompile/Pccts/antlr/AntlrMS.mak  | 6 +++---
>  BaseTools/Source/C/VfrCompile/Pccts/dlg/DlgDDK.mak     | 4 ++--
>  BaseTools/Source/C/VfrCompile/Pccts/dlg/DlgMS.mak      | 7 +++----
>  5 files changed, 12 insertions(+), 14 deletions(-)
> 
> diff --git a/BaseTools/Source/C/Makefiles/ms.common
> b/BaseTools/Source/C/Makefiles/ms.common
> index b2dbcf376c04..8391f10d5dd2 100644
> --- a/BaseTools/Source/C/Makefiles/ms.common
> +++ b/BaseTools/Source/C/Makefiles/ms.common
> @@ -57,6 +57,5 @@ LINKER = $(LD)
> 
>  INC = $(INC) -I . -I $(SOURCE_PATH)\Include -I $(ARCH_INCLUDE) -I
> $(SOURCE_PATH)\Common
> 
> -CFLAGS = $(CFLAGS) /nologo /Zi /c /O2 /MT /W4 /WX /D
> _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE
> -CPPFLAGS = $(CPPFLAGS) /EHsc /nologo /Zi /c /O2 /MT /D
> _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE
> -
> +CFLAGS = $(CFLAGS) /nologo /Z7 /c /O2 /MT /W4 /WX /D
> _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE
> +CPPFLAGS = $(CPPFLAGS) /EHsc /nologo /Z7 /c /O2 /MT /D
> _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE
> diff --git a/BaseTools/Source/C/VfrCompile/Pccts/antlr/AntlrDDK.mak
> b/BaseTools/Source/C/VfrCompile/Pccts/antlr/AntlrDDK.mak
> index 71b7c6b0b141..cde91a47159e 100644
> --- a/BaseTools/Source/C/VfrCompile/Pccts/antlr/AntlrDDK.mak
> +++ b/BaseTools/Source/C/VfrCompile/Pccts/antlr/AntlrDDK.mak
> @@ -16,7 +16,7 @@ SET=$(PCCTS_HOME)\support\set
>  # Compiler stuff
>  CC = cl
>  CFLAGS = /nologo -I "." -I "$(PCCTS_H)" -I "$(SET)" -D "USER_ZZSYN" -D
"PC"
> \
> -        -D "ZZLEXBUFSIZE=65536"  -D "LONGFILENAMES" /Zi /W3
> -D__USE_PROTOS /wd4700
> +        -D "ZZLEXBUFSIZE=65536"  -D "LONGFILENAMES" /Z7 /W3
> -D__USE_PROTOS /wd4700
> 
>  ANTLR_OBJS = antlr.obj scan.obj err.obj bits.obj build.obj fset2.obj \
>              fset.obj gen.obj globals.obj hash.obj lex.obj main.obj \
> @@ -225,7 +225,7 @@ set.obj: $(SET)\set.c \
> 
>      $(CC) -c $(CFLAGS) $(SET)\set.c
> 
> -clean:
> +clean:
>      del *.obj
> 
>  distclean:
> diff --git a/BaseTools/Source/C/VfrCompile/Pccts/antlr/AntlrMS.mak
> b/BaseTools/Source/C/VfrCompile/Pccts/antlr/AntlrMS.mak
> index b30a73bb7424..6fc4d5c15d6c 100644
> --- a/BaseTools/Source/C/VfrCompile/Pccts/antlr/AntlrMS.mak
> +++ b/BaseTools/Source/C/VfrCompile/Pccts/antlr/AntlrMS.mak
> @@ -16,8 +16,8 @@ SET=$(PCCTS_HOME)\support\set
>  # Compiler stuff
>  CC = cl
>  CFLAGS = /nologo -I "." -I "$(PCCTS_H)" -I "$(SET)" -D "USER_ZZSYN" -D
"PC"
> \
> -        -D "ZZLEXBUFSIZE=65536"  /D "LONGFILENAMES" /Zi /W3
> -D__USE_PROTOS /wd4700 \
> -         /D _CRT_SECURE_NO_DEPRECATE /D
> _CRT_NONSTDC_NO_DEPRECATE
> +        -D "ZZLEXBUFSIZE=65536"  /D "LONGFILENAMES" /Z7 /W3
> -D__USE_PROTOS /wd4700 \
> +         /D _CRT_SECURE_NO_DEPRECATE /D
> _CRT_NONSTDC_NO_DEPRECATE
> 
>  ANTLR_OBJS = antlr.obj scan.obj err.obj bits.obj build.obj fset2.obj \
>              fset.obj gen.obj globals.obj hash.obj lex.obj main.obj \
> @@ -226,7 +226,7 @@ set.obj: $(SET)\set.c \
> 
>      $(CC) -c $(CFLAGS) $(SET)\set.c
> 
> -clean:
> +clean:
>      -del *.obj
>      -del *.ilk
>      -del *.pdb
> diff --git a/BaseTools/Source/C/VfrCompile/Pccts/dlg/DlgDDK.mak
> b/BaseTools/Source/C/VfrCompile/Pccts/dlg/DlgDDK.mak
> index 156d524acc94..dcc259543c4c 100644
> --- a/BaseTools/Source/C/VfrCompile/Pccts/dlg/DlgDDK.mak
> +++ b/BaseTools/Source/C/VfrCompile/Pccts/dlg/DlgDDK.mak
> @@ -16,7 +16,7 @@ SET=$(PCCTS_HOME)\support\set
>  # Compiler stuff
>  CC = cl
>  CFLAGS = /nologo -I "." -I "$(PCCTS_H)" -I "$(SET)" -D "USER_ZZSYN" -D
"PC"
> \
> -        -D "ZZLEXBUFSIZE=65536"  /D "LONGFILENAMES" /W3 /Zi
> +        -D "ZZLEXBUFSIZE=65536"  /D "LONGFILENAMES" /W3 /Z7
> 
>  DLG_OBJS = dlg_p.obj dlg_a.obj main.obj err.obj support.obj \
>             output.obj relabel.obj automata.obj
> @@ -113,7 +113,7 @@ set.obj: $(SET)\set.c \
> 
>      $(CC) -c $(CFLAGS) $(SET)\set.c
> 
> -clean:
> +clean:
>      del *.obj
> 
>  distclean:
> diff --git a/BaseTools/Source/C/VfrCompile/Pccts/dlg/DlgMS.mak
> b/BaseTools/Source/C/VfrCompile/Pccts/dlg/DlgMS.mak
> index 2714308d4fa0..c2cac00f53df 100644
> --- a/BaseTools/Source/C/VfrCompile/Pccts/dlg/DlgMS.mak
> +++ b/BaseTools/Source/C/VfrCompile/Pccts/dlg/DlgMS.mak
> @@ -16,8 +16,8 @@ SET=$(PCCTS_HOME)\support\set
>  # Compiler stuff
>  CC = cl
>  CFLAGS = /nologo -I "." -I "$(PCCTS_H)" -I "$(SET)" -D "USER_ZZSYN" -D
"PC"
> \
> -        -D "ZZLEXBUFSIZE=65536"  /D "LONGFILENAMES" /W3 /Zi \
> -        /D _CRT_SECURE_NO_DEPRECATE /D
> _CRT_NONSTDC_NO_DEPRECATE
> +        -D "ZZLEXBUFSIZE=65536"  /D "LONGFILENAMES" /W3 /Z7 \
> +        /D _CRT_SECURE_NO_DEPRECATE /D
> _CRT_NONSTDC_NO_DEPRECATE
> 
>  DLG_OBJS = dlg_p.obj dlg_a.obj main.obj err.obj support.obj \
>             output.obj relabel.obj automata.obj
> @@ -112,7 +112,7 @@ set.obj: $(SET)\set.c \
> 
>      $(CC) -c $(CFLAGS) $(SET)\set.c
> 
> -clean:
> +clean:
>      -del *.obj
>      -del *.ilk
>      -del *.pdb
> @@ -123,4 +123,3 @@ cleanall:
>      -del *.pdb
>  		-del *.exe
>      -del $(EDK_TOOLS_PATH)\Bin\Win32\dlg.exe
> -
> --
> 2.37.1.windows.1




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [edk2-devel] 回复: [Patch 1/1] BaseTools/Source/C: Use /Z7 instead of /Zi for host tools
  2022-11-07  4:23 ` 回复: " gaoliming
@ 2022-11-07  7:20   ` Michael D Kinney
  2022-11-08  1:03     ` 回复: " gaoliming
  0 siblings, 1 reply; 7+ messages in thread
From: Michael D Kinney @ 2022-11-07  7:20 UTC (permalink / raw)
  To: devel@edk2.groups.io, Gao, Liming, Kinney, Michael D
  Cc: Feng, Bob C, Chen, Christine

Hi Liming,

That seems like a bigger change.  

I see no harm in always producing symbols when build C host tools.

Mike

> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of gaoliming via groups.io
> Sent: Sunday, November 6, 2022 8:23 PM
> To: Kinney, Michael D <michael.d.kinney@intel.com>; devel@edk2.groups.io
> Cc: Feng, Bob C <bob.c.feng@intel.com>; Chen, Christine <yuwei.chen@intel.com>
> Subject: [edk2-devel] 回复: [Patch 1/1] BaseTools/Source/C: Use /Z7 instead of /Zi for host tools
> 
> Mike:
>   I suggest to remove /Zi and /DEBUG option for BaseTools C tool generation,
> because only tool developer may require the debug version C tool.
> 
> Thanks
> Liming
> > -----邮件原件-----
> > 发件人: Michael D Kinney <michael.d.kinney@intel.com>
> > 发送时间: 2022年11月6日 4:36
> > 收件人: devel@edk2.groups.io
> > 抄送: Bob Feng <bob.c.feng@intel.com>; Liming Gao
> > <gaoliming@byosoft.com.cn>; Yuwei Chen <yuwei.chen@intel.com>
> > 主题: [Patch 1/1] BaseTools/Source/C: Use /Z7 instead of /Zi for host
> tools
> >
> > REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4139
> >
> > Update ms.common and *.mak files to use /Z7 instead of /Zi to embed
> > symbol information in obj files for host tools built with VS compilers.
> > This prevents vcxxx.pdb files from being generated in the root of
> > the local edk2 repository or in BaseTools directories.
> >
> > Cc: Bob Feng <bob.c.feng@intel.com>
> > Cc: Liming Gao <gaoliming@byosoft.com.cn>
> > Cc: Yuwei Chen <yuwei.chen@intel.com>
> > Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
> > ---
> >  BaseTools/Source/C/Makefiles/ms.common                 | 5 ++---
> >  BaseTools/Source/C/VfrCompile/Pccts/antlr/AntlrDDK.mak | 4 ++--
> >  BaseTools/Source/C/VfrCompile/Pccts/antlr/AntlrMS.mak  | 6 +++---
> >  BaseTools/Source/C/VfrCompile/Pccts/dlg/DlgDDK.mak     | 4 ++--
> >  BaseTools/Source/C/VfrCompile/Pccts/dlg/DlgMS.mak      | 7 +++----
> >  5 files changed, 12 insertions(+), 14 deletions(-)
> >
> > diff --git a/BaseTools/Source/C/Makefiles/ms.common
> > b/BaseTools/Source/C/Makefiles/ms.common
> > index b2dbcf376c04..8391f10d5dd2 100644
> > --- a/BaseTools/Source/C/Makefiles/ms.common
> > +++ b/BaseTools/Source/C/Makefiles/ms.common
> > @@ -57,6 +57,5 @@ LINKER = $(LD)
> >
> >  INC = $(INC) -I . -I $(SOURCE_PATH)\Include -I $(ARCH_INCLUDE) -I
> > $(SOURCE_PATH)\Common
> >
> > -CFLAGS = $(CFLAGS) /nologo /Zi /c /O2 /MT /W4 /WX /D
> > _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE
> > -CPPFLAGS = $(CPPFLAGS) /EHsc /nologo /Zi /c /O2 /MT /D
> > _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE
> > -
> > +CFLAGS = $(CFLAGS) /nologo /Z7 /c /O2 /MT /W4 /WX /D
> > _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE
> > +CPPFLAGS = $(CPPFLAGS) /EHsc /nologo /Z7 /c /O2 /MT /D
> > _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE
> > diff --git a/BaseTools/Source/C/VfrCompile/Pccts/antlr/AntlrDDK.mak
> > b/BaseTools/Source/C/VfrCompile/Pccts/antlr/AntlrDDK.mak
> > index 71b7c6b0b141..cde91a47159e 100644
> > --- a/BaseTools/Source/C/VfrCompile/Pccts/antlr/AntlrDDK.mak
> > +++ b/BaseTools/Source/C/VfrCompile/Pccts/antlr/AntlrDDK.mak
> > @@ -16,7 +16,7 @@ SET=$(PCCTS_HOME)\support\set
> >  # Compiler stuff
> >  CC = cl
> >  CFLAGS = /nologo -I "." -I "$(PCCTS_H)" -I "$(SET)" -D "USER_ZZSYN" -D
> "PC"
> > \
> > -        -D "ZZLEXBUFSIZE=65536"  -D "LONGFILENAMES" /Zi /W3
> > -D__USE_PROTOS /wd4700
> > +        -D "ZZLEXBUFSIZE=65536"  -D "LONGFILENAMES" /Z7 /W3
> > -D__USE_PROTOS /wd4700
> >
> >  ANTLR_OBJS = antlr.obj scan.obj err.obj bits.obj build.obj fset2.obj \
> >              fset.obj gen.obj globals.obj hash.obj lex.obj main.obj \
> > @@ -225,7 +225,7 @@ set.obj: $(SET)\set.c \
> >
> >      $(CC) -c $(CFLAGS) $(SET)\set.c
> >
> > -clean:
> > +clean:
> >      del *.obj
> >
> >  distclean:
> > diff --git a/BaseTools/Source/C/VfrCompile/Pccts/antlr/AntlrMS.mak
> > b/BaseTools/Source/C/VfrCompile/Pccts/antlr/AntlrMS.mak
> > index b30a73bb7424..6fc4d5c15d6c 100644
> > --- a/BaseTools/Source/C/VfrCompile/Pccts/antlr/AntlrMS.mak
> > +++ b/BaseTools/Source/C/VfrCompile/Pccts/antlr/AntlrMS.mak
> > @@ -16,8 +16,8 @@ SET=$(PCCTS_HOME)\support\set
> >  # Compiler stuff
> >  CC = cl
> >  CFLAGS = /nologo -I "." -I "$(PCCTS_H)" -I "$(SET)" -D "USER_ZZSYN" -D
> "PC"
> > \
> > -        -D "ZZLEXBUFSIZE=65536"  /D "LONGFILENAMES" /Zi /W3
> > -D__USE_PROTOS /wd4700 \
> > -         /D _CRT_SECURE_NO_DEPRECATE /D
> > _CRT_NONSTDC_NO_DEPRECATE
> > +        -D "ZZLEXBUFSIZE=65536"  /D "LONGFILENAMES" /Z7 /W3
> > -D__USE_PROTOS /wd4700 \
> > +         /D _CRT_SECURE_NO_DEPRECATE /D
> > _CRT_NONSTDC_NO_DEPRECATE
> >
> >  ANTLR_OBJS = antlr.obj scan.obj err.obj bits.obj build.obj fset2.obj \
> >              fset.obj gen.obj globals.obj hash.obj lex.obj main.obj \
> > @@ -226,7 +226,7 @@ set.obj: $(SET)\set.c \
> >
> >      $(CC) -c $(CFLAGS) $(SET)\set.c
> >
> > -clean:
> > +clean:
> >      -del *.obj
> >      -del *.ilk
> >      -del *.pdb
> > diff --git a/BaseTools/Source/C/VfrCompile/Pccts/dlg/DlgDDK.mak
> > b/BaseTools/Source/C/VfrCompile/Pccts/dlg/DlgDDK.mak
> > index 156d524acc94..dcc259543c4c 100644
> > --- a/BaseTools/Source/C/VfrCompile/Pccts/dlg/DlgDDK.mak
> > +++ b/BaseTools/Source/C/VfrCompile/Pccts/dlg/DlgDDK.mak
> > @@ -16,7 +16,7 @@ SET=$(PCCTS_HOME)\support\set
> >  # Compiler stuff
> >  CC = cl
> >  CFLAGS = /nologo -I "." -I "$(PCCTS_H)" -I "$(SET)" -D "USER_ZZSYN" -D
> "PC"
> > \
> > -        -D "ZZLEXBUFSIZE=65536"  /D "LONGFILENAMES" /W3 /Zi
> > +        -D "ZZLEXBUFSIZE=65536"  /D "LONGFILENAMES" /W3 /Z7
> >
> >  DLG_OBJS = dlg_p.obj dlg_a.obj main.obj err.obj support.obj \
> >             output.obj relabel.obj automata.obj
> > @@ -113,7 +113,7 @@ set.obj: $(SET)\set.c \
> >
> >      $(CC) -c $(CFLAGS) $(SET)\set.c
> >
> > -clean:
> > +clean:
> >      del *.obj
> >
> >  distclean:
> > diff --git a/BaseTools/Source/C/VfrCompile/Pccts/dlg/DlgMS.mak
> > b/BaseTools/Source/C/VfrCompile/Pccts/dlg/DlgMS.mak
> > index 2714308d4fa0..c2cac00f53df 100644
> > --- a/BaseTools/Source/C/VfrCompile/Pccts/dlg/DlgMS.mak
> > +++ b/BaseTools/Source/C/VfrCompile/Pccts/dlg/DlgMS.mak
> > @@ -16,8 +16,8 @@ SET=$(PCCTS_HOME)\support\set
> >  # Compiler stuff
> >  CC = cl
> >  CFLAGS = /nologo -I "." -I "$(PCCTS_H)" -I "$(SET)" -D "USER_ZZSYN" -D
> "PC"
> > \
> > -        -D "ZZLEXBUFSIZE=65536"  /D "LONGFILENAMES" /W3 /Zi \
> > -        /D _CRT_SECURE_NO_DEPRECATE /D
> > _CRT_NONSTDC_NO_DEPRECATE
> > +        -D "ZZLEXBUFSIZE=65536"  /D "LONGFILENAMES" /W3 /Z7 \
> > +        /D _CRT_SECURE_NO_DEPRECATE /D
> > _CRT_NONSTDC_NO_DEPRECATE
> >
> >  DLG_OBJS = dlg_p.obj dlg_a.obj main.obj err.obj support.obj \
> >             output.obj relabel.obj automata.obj
> > @@ -112,7 +112,7 @@ set.obj: $(SET)\set.c \
> >
> >      $(CC) -c $(CFLAGS) $(SET)\set.c
> >
> > -clean:
> > +clean:
> >      -del *.obj
> >      -del *.ilk
> >      -del *.pdb
> > @@ -123,4 +123,3 @@ cleanall:
> >      -del *.pdb
> >  		-del *.exe
> >      -del $(EDK_TOOLS_PATH)\Bin\Win32\dlg.exe
> > -
> > --
> > 2.37.1.windows.1
> 
> 
> 
> 
> 
> 
> 


^ permalink raw reply	[flat|nested] 7+ messages in thread

* 回复: [edk2-devel] 回复: [Patch 1/1] BaseTools/Source/C: Use /Z7 instead of /Zi for host tools
  2022-11-07  7:20   ` [edk2-devel] " Michael D Kinney
@ 2022-11-08  1:03     ` gaoliming
  2022-11-08  1:59       ` Michael D Kinney
  0 siblings, 1 reply; 7+ messages in thread
From: gaoliming @ 2022-11-08  1:03 UTC (permalink / raw)
  To: devel, michael.d.kinney; +Cc: 'Feng, Bob C', 'Chen, Christine'

Mike:
 I agree there is no impact with debug symbol in the binary C tools. 

 But, the release version binary C tools should be better for the developer. If you think this change is big, I will submit one BZ for future stable tag release. 

Thanks
Liming
> -----邮件原件-----
> 发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Michael D
> Kinney
> 发送时间: 2022年11月7日 15:21
> 收件人: devel@edk2.groups.io; Gao, Liming <gaoliming@byosoft.com.cn>;
> Kinney, Michael D <michael.d.kinney@intel.com>
> 抄送: Feng, Bob C <bob.c.feng@intel.com>; Chen, Christine
> <yuwei.chen@intel.com>
> 主题: Re: [edk2-devel] 回复: [Patch 1/1] BaseTools/Source/C: Use /Z7
> instead of /Zi for host tools
> 
> Hi Liming,
> 
> That seems like a bigger change.
> 
> I see no harm in always producing symbols when build C host tools.
> 
> Mike
> 
> > -----Original Message-----
> > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of
> gaoliming via groups.io
> > Sent: Sunday, November 6, 2022 8:23 PM
> > To: Kinney, Michael D <michael.d.kinney@intel.com>;
> devel@edk2.groups.io
> > Cc: Feng, Bob C <bob.c.feng@intel.com>; Chen, Christine
> <yuwei.chen@intel.com>
> > Subject: [edk2-devel] 回复: [Patch 1/1] BaseTools/Source/C: Use /Z7
> instead of /Zi for host tools
> >
> > Mike:
> >   I suggest to remove /Zi and /DEBUG option for BaseTools C tool
> generation,
> > because only tool developer may require the debug version C tool.
> >
> > Thanks
> > Liming
> > > -----邮件原件-----
> > > 发件人: Michael D Kinney <michael.d.kinney@intel.com>
> > > 发送时间: 2022年11月6日 4:36
> > > 收件人: devel@edk2.groups.io
> > > 抄送: Bob Feng <bob.c.feng@intel.com>; Liming Gao
> > > <gaoliming@byosoft.com.cn>; Yuwei Chen <yuwei.chen@intel.com>
> > > 主题: [Patch 1/1] BaseTools/Source/C: Use /Z7 instead of /Zi for host
> > tools
> > >
> > > REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4139
> > >
> > > Update ms.common and *.mak files to use /Z7 instead of /Zi to embed
> > > symbol information in obj files for host tools built with VS compilers.
> > > This prevents vcxxx.pdb files from being generated in the root of
> > > the local edk2 repository or in BaseTools directories.
> > >
> > > Cc: Bob Feng <bob.c.feng@intel.com>
> > > Cc: Liming Gao <gaoliming@byosoft.com.cn>
> > > Cc: Yuwei Chen <yuwei.chen@intel.com>
> > > Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
> > > ---
> > >  BaseTools/Source/C/Makefiles/ms.common                 | 5
> ++---
> > >  BaseTools/Source/C/VfrCompile/Pccts/antlr/AntlrDDK.mak | 4 ++--
> > >  BaseTools/Source/C/VfrCompile/Pccts/antlr/AntlrMS.mak  | 6 +++---
> > >  BaseTools/Source/C/VfrCompile/Pccts/dlg/DlgDDK.mak     | 4 ++--
> > >  BaseTools/Source/C/VfrCompile/Pccts/dlg/DlgMS.mak      | 7
> +++----
> > >  5 files changed, 12 insertions(+), 14 deletions(-)
> > >
> > > diff --git a/BaseTools/Source/C/Makefiles/ms.common
> > > b/BaseTools/Source/C/Makefiles/ms.common
> > > index b2dbcf376c04..8391f10d5dd2 100644
> > > --- a/BaseTools/Source/C/Makefiles/ms.common
> > > +++ b/BaseTools/Source/C/Makefiles/ms.common
> > > @@ -57,6 +57,5 @@ LINKER = $(LD)
> > >
> > >  INC = $(INC) -I . -I $(SOURCE_PATH)\Include -I $(ARCH_INCLUDE) -I
> > > $(SOURCE_PATH)\Common
> > >
> > > -CFLAGS = $(CFLAGS) /nologo /Zi /c /O2 /MT /W4 /WX /D
> > > _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE
> > > -CPPFLAGS = $(CPPFLAGS) /EHsc /nologo /Zi /c /O2 /MT /D
> > > _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE
> > > -
> > > +CFLAGS = $(CFLAGS) /nologo /Z7 /c /O2 /MT /W4 /WX /D
> > > _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE
> > > +CPPFLAGS = $(CPPFLAGS) /EHsc /nologo /Z7 /c /O2 /MT /D
> > > _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE
> > > diff --git a/BaseTools/Source/C/VfrCompile/Pccts/antlr/AntlrDDK.mak
> > > b/BaseTools/Source/C/VfrCompile/Pccts/antlr/AntlrDDK.mak
> > > index 71b7c6b0b141..cde91a47159e 100644
> > > --- a/BaseTools/Source/C/VfrCompile/Pccts/antlr/AntlrDDK.mak
> > > +++ b/BaseTools/Source/C/VfrCompile/Pccts/antlr/AntlrDDK.mak
> > > @@ -16,7 +16,7 @@ SET=$(PCCTS_HOME)\support\set
> > >  # Compiler stuff
> > >  CC = cl
> > >  CFLAGS = /nologo -I "." -I "$(PCCTS_H)" -I "$(SET)" -D "USER_ZZSYN" -D
> > "PC"
> > > \
> > > -        -D "ZZLEXBUFSIZE=65536"  -D "LONGFILENAMES" /Zi /W3
> > > -D__USE_PROTOS /wd4700
> > > +        -D "ZZLEXBUFSIZE=65536"  -D "LONGFILENAMES" /Z7 /W3
> > > -D__USE_PROTOS /wd4700
> > >
> > >  ANTLR_OBJS = antlr.obj scan.obj err.obj bits.obj build.obj fset2.obj \
> > >              fset.obj gen.obj globals.obj hash.obj lex.obj main.obj \
> > > @@ -225,7 +225,7 @@ set.obj: $(SET)\set.c \
> > >
> > >      $(CC) -c $(CFLAGS) $(SET)\set.c
> > >
> > > -clean:
> > > +clean:
> > >      del *.obj
> > >
> > >  distclean:
> > > diff --git a/BaseTools/Source/C/VfrCompile/Pccts/antlr/AntlrMS.mak
> > > b/BaseTools/Source/C/VfrCompile/Pccts/antlr/AntlrMS.mak
> > > index b30a73bb7424..6fc4d5c15d6c 100644
> > > --- a/BaseTools/Source/C/VfrCompile/Pccts/antlr/AntlrMS.mak
> > > +++ b/BaseTools/Source/C/VfrCompile/Pccts/antlr/AntlrMS.mak
> > > @@ -16,8 +16,8 @@ SET=$(PCCTS_HOME)\support\set
> > >  # Compiler stuff
> > >  CC = cl
> > >  CFLAGS = /nologo -I "." -I "$(PCCTS_H)" -I "$(SET)" -D "USER_ZZSYN" -D
> > "PC"
> > > \
> > > -        -D "ZZLEXBUFSIZE=65536"  /D "LONGFILENAMES" /Zi /W3
> > > -D__USE_PROTOS /wd4700 \
> > > -         /D _CRT_SECURE_NO_DEPRECATE /D
> > > _CRT_NONSTDC_NO_DEPRECATE
> > > +        -D "ZZLEXBUFSIZE=65536"  /D "LONGFILENAMES" /Z7 /W3
> > > -D__USE_PROTOS /wd4700 \
> > > +         /D _CRT_SECURE_NO_DEPRECATE /D
> > > _CRT_NONSTDC_NO_DEPRECATE
> > >
> > >  ANTLR_OBJS = antlr.obj scan.obj err.obj bits.obj build.obj fset2.obj \
> > >              fset.obj gen.obj globals.obj hash.obj lex.obj main.obj \
> > > @@ -226,7 +226,7 @@ set.obj: $(SET)\set.c \
> > >
> > >      $(CC) -c $(CFLAGS) $(SET)\set.c
> > >
> > > -clean:
> > > +clean:
> > >      -del *.obj
> > >      -del *.ilk
> > >      -del *.pdb
> > > diff --git a/BaseTools/Source/C/VfrCompile/Pccts/dlg/DlgDDK.mak
> > > b/BaseTools/Source/C/VfrCompile/Pccts/dlg/DlgDDK.mak
> > > index 156d524acc94..dcc259543c4c 100644
> > > --- a/BaseTools/Source/C/VfrCompile/Pccts/dlg/DlgDDK.mak
> > > +++ b/BaseTools/Source/C/VfrCompile/Pccts/dlg/DlgDDK.mak
> > > @@ -16,7 +16,7 @@ SET=$(PCCTS_HOME)\support\set
> > >  # Compiler stuff
> > >  CC = cl
> > >  CFLAGS = /nologo -I "." -I "$(PCCTS_H)" -I "$(SET)" -D "USER_ZZSYN" -D
> > "PC"
> > > \
> > > -        -D "ZZLEXBUFSIZE=65536"  /D "LONGFILENAMES" /W3 /Zi
> > > +        -D "ZZLEXBUFSIZE=65536"  /D "LONGFILENAMES" /W3 /Z7
> > >
> > >  DLG_OBJS = dlg_p.obj dlg_a.obj main.obj err.obj support.obj \
> > >             output.obj relabel.obj automata.obj
> > > @@ -113,7 +113,7 @@ set.obj: $(SET)\set.c \
> > >
> > >      $(CC) -c $(CFLAGS) $(SET)\set.c
> > >
> > > -clean:
> > > +clean:
> > >      del *.obj
> > >
> > >  distclean:
> > > diff --git a/BaseTools/Source/C/VfrCompile/Pccts/dlg/DlgMS.mak
> > > b/BaseTools/Source/C/VfrCompile/Pccts/dlg/DlgMS.mak
> > > index 2714308d4fa0..c2cac00f53df 100644
> > > --- a/BaseTools/Source/C/VfrCompile/Pccts/dlg/DlgMS.mak
> > > +++ b/BaseTools/Source/C/VfrCompile/Pccts/dlg/DlgMS.mak
> > > @@ -16,8 +16,8 @@ SET=$(PCCTS_HOME)\support\set
> > >  # Compiler stuff
> > >  CC = cl
> > >  CFLAGS = /nologo -I "." -I "$(PCCTS_H)" -I "$(SET)" -D "USER_ZZSYN" -D
> > "PC"
> > > \
> > > -        -D "ZZLEXBUFSIZE=65536"  /D "LONGFILENAMES" /W3 /Zi \
> > > -        /D _CRT_SECURE_NO_DEPRECATE /D
> > > _CRT_NONSTDC_NO_DEPRECATE
> > > +        -D "ZZLEXBUFSIZE=65536"  /D "LONGFILENAMES" /W3 /Z7 \
> > > +        /D _CRT_SECURE_NO_DEPRECATE /D
> > > _CRT_NONSTDC_NO_DEPRECATE
> > >
> > >  DLG_OBJS = dlg_p.obj dlg_a.obj main.obj err.obj support.obj \
> > >             output.obj relabel.obj automata.obj
> > > @@ -112,7 +112,7 @@ set.obj: $(SET)\set.c \
> > >
> > >      $(CC) -c $(CFLAGS) $(SET)\set.c
> > >
> > > -clean:
> > > +clean:
> > >      -del *.obj
> > >      -del *.ilk
> > >      -del *.pdb
> > > @@ -123,4 +123,3 @@ cleanall:
> > >      -del *.pdb
> > >  		-del *.exe
> > >      -del $(EDK_TOOLS_PATH)\Bin\Win32\dlg.exe
> > > -
> > > --
> > > 2.37.1.windows.1
> >
> >
> >
> >
> >
> >
> >
> 
> 
> 
> 
> 




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [edk2-devel] 回复: [Patch 1/1] BaseTools/Source/C: Use /Z7 instead of /Zi for host tools
  2022-11-08  1:03     ` 回复: " gaoliming
@ 2022-11-08  1:59       ` Michael D Kinney
  2022-11-08  7:15         ` 回复: " gaoliming
  0 siblings, 1 reply; 7+ messages in thread
From: Michael D Kinney @ 2022-11-08  1:59 UTC (permalink / raw)
  To: devel@edk2.groups.io, Gao, Liming, Kinney, Michael D
  Cc: Feng, Bob C, Chen, Christine

Hi Liming,

I think a BZ feature request for BaseTools to support building with or without symbols would be good to submit for future stable tag.

I would like to see this patch be added to the current stable tag.

Thanks,

Mike

> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of gaoliming via groups.io
> Sent: Monday, November 7, 2022 5:04 PM
> To: devel@edk2.groups.io; Kinney, Michael D <michael.d.kinney@intel.com>
> Cc: Feng, Bob C <bob.c.feng@intel.com>; Chen, Christine <yuwei.chen@intel.com>
> Subject: 回复: [edk2-devel] 回复: [Patch 1/1] BaseTools/Source/C: Use /Z7 instead of /Zi for host tools
> 
> Mike:
>  I agree there is no impact with debug symbol in the binary C tools.
> 
>  But, the release version binary C tools should be better for the developer. If you think this change is big, I will submit one
> BZ for future stable tag release.
> 
> Thanks
> Liming
> > -----邮件原件-----
> > 发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Michael D
> > Kinney
> > 发送时间: 2022年11月7日 15:21
> > 收件人: devel@edk2.groups.io; Gao, Liming <gaoliming@byosoft.com.cn>;
> > Kinney, Michael D <michael.d.kinney@intel.com>
> > 抄送: Feng, Bob C <bob.c.feng@intel.com>; Chen, Christine
> > <yuwei.chen@intel.com>
> > 主题: Re: [edk2-devel] 回复: [Patch 1/1] BaseTools/Source/C: Use /Z7
> > instead of /Zi for host tools
> >
> > Hi Liming,
> >
> > That seems like a bigger change.
> >
> > I see no harm in always producing symbols when build C host tools.
> >
> > Mike
> >
> > > -----Original Message-----
> > > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of
> > gaoliming via groups.io
> > > Sent: Sunday, November 6, 2022 8:23 PM
> > > To: Kinney, Michael D <michael.d.kinney@intel.com>;
> > devel@edk2.groups.io
> > > Cc: Feng, Bob C <bob.c.feng@intel.com>; Chen, Christine
> > <yuwei.chen@intel.com>
> > > Subject: [edk2-devel] 回复: [Patch 1/1] BaseTools/Source/C: Use /Z7
> > instead of /Zi for host tools
> > >
> > > Mike:
> > >   I suggest to remove /Zi and /DEBUG option for BaseTools C tool
> > generation,
> > > because only tool developer may require the debug version C tool.
> > >
> > > Thanks
> > > Liming
> > > > -----邮件原件-----
> > > > 发件人: Michael D Kinney <michael.d.kinney@intel.com>
> > > > 发送时间: 2022年11月6日 4:36
> > > > 收件人: devel@edk2.groups.io
> > > > 抄送: Bob Feng <bob.c.feng@intel.com>; Liming Gao
> > > > <gaoliming@byosoft.com.cn>; Yuwei Chen <yuwei.chen@intel.com>
> > > > 主题: [Patch 1/1] BaseTools/Source/C: Use /Z7 instead of /Zi for host
> > > tools
> > > >
> > > > REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4139
> > > >
> > > > Update ms.common and *.mak files to use /Z7 instead of /Zi to embed
> > > > symbol information in obj files for host tools built with VS compilers.
> > > > This prevents vcxxx.pdb files from being generated in the root of
> > > > the local edk2 repository or in BaseTools directories.
> > > >
> > > > Cc: Bob Feng <bob.c.feng@intel.com>
> > > > Cc: Liming Gao <gaoliming@byosoft.com.cn>
> > > > Cc: Yuwei Chen <yuwei.chen@intel.com>
> > > > Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
> > > > ---
> > > >  BaseTools/Source/C/Makefiles/ms.common                 | 5
> > ++---
> > > >  BaseTools/Source/C/VfrCompile/Pccts/antlr/AntlrDDK.mak | 4 ++--
> > > >  BaseTools/Source/C/VfrCompile/Pccts/antlr/AntlrMS.mak  | 6 +++---
> > > >  BaseTools/Source/C/VfrCompile/Pccts/dlg/DlgDDK.mak     | 4 ++--
> > > >  BaseTools/Source/C/VfrCompile/Pccts/dlg/DlgMS.mak      | 7
> > +++----
> > > >  5 files changed, 12 insertions(+), 14 deletions(-)
> > > >
> > > > diff --git a/BaseTools/Source/C/Makefiles/ms.common
> > > > b/BaseTools/Source/C/Makefiles/ms.common
> > > > index b2dbcf376c04..8391f10d5dd2 100644
> > > > --- a/BaseTools/Source/C/Makefiles/ms.common
> > > > +++ b/BaseTools/Source/C/Makefiles/ms.common
> > > > @@ -57,6 +57,5 @@ LINKER = $(LD)
> > > >
> > > >  INC = $(INC) -I . -I $(SOURCE_PATH)\Include -I $(ARCH_INCLUDE) -I
> > > > $(SOURCE_PATH)\Common
> > > >
> > > > -CFLAGS = $(CFLAGS) /nologo /Zi /c /O2 /MT /W4 /WX /D
> > > > _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE
> > > > -CPPFLAGS = $(CPPFLAGS) /EHsc /nologo /Zi /c /O2 /MT /D
> > > > _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE
> > > > -
> > > > +CFLAGS = $(CFLAGS) /nologo /Z7 /c /O2 /MT /W4 /WX /D
> > > > _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE
> > > > +CPPFLAGS = $(CPPFLAGS) /EHsc /nologo /Z7 /c /O2 /MT /D
> > > > _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE
> > > > diff --git a/BaseTools/Source/C/VfrCompile/Pccts/antlr/AntlrDDK.mak
> > > > b/BaseTools/Source/C/VfrCompile/Pccts/antlr/AntlrDDK.mak
> > > > index 71b7c6b0b141..cde91a47159e 100644
> > > > --- a/BaseTools/Source/C/VfrCompile/Pccts/antlr/AntlrDDK.mak
> > > > +++ b/BaseTools/Source/C/VfrCompile/Pccts/antlr/AntlrDDK.mak
> > > > @@ -16,7 +16,7 @@ SET=$(PCCTS_HOME)\support\set
> > > >  # Compiler stuff
> > > >  CC = cl
> > > >  CFLAGS = /nologo -I "." -I "$(PCCTS_H)" -I "$(SET)" -D "USER_ZZSYN" -D
> > > "PC"
> > > > \
> > > > -        -D "ZZLEXBUFSIZE=65536"  -D "LONGFILENAMES" /Zi /W3
> > > > -D__USE_PROTOS /wd4700
> > > > +        -D "ZZLEXBUFSIZE=65536"  -D "LONGFILENAMES" /Z7 /W3
> > > > -D__USE_PROTOS /wd4700
> > > >
> > > >  ANTLR_OBJS = antlr.obj scan.obj err.obj bits.obj build.obj fset2.obj \
> > > >              fset.obj gen.obj globals.obj hash.obj lex.obj main.obj \
> > > > @@ -225,7 +225,7 @@ set.obj: $(SET)\set.c \
> > > >
> > > >      $(CC) -c $(CFLAGS) $(SET)\set.c
> > > >
> > > > -clean:
> > > > +clean:
> > > >      del *.obj
> > > >
> > > >  distclean:
> > > > diff --git a/BaseTools/Source/C/VfrCompile/Pccts/antlr/AntlrMS.mak
> > > > b/BaseTools/Source/C/VfrCompile/Pccts/antlr/AntlrMS.mak
> > > > index b30a73bb7424..6fc4d5c15d6c 100644
> > > > --- a/BaseTools/Source/C/VfrCompile/Pccts/antlr/AntlrMS.mak
> > > > +++ b/BaseTools/Source/C/VfrCompile/Pccts/antlr/AntlrMS.mak
> > > > @@ -16,8 +16,8 @@ SET=$(PCCTS_HOME)\support\set
> > > >  # Compiler stuff
> > > >  CC = cl
> > > >  CFLAGS = /nologo -I "." -I "$(PCCTS_H)" -I "$(SET)" -D "USER_ZZSYN" -D
> > > "PC"
> > > > \
> > > > -        -D "ZZLEXBUFSIZE=65536"  /D "LONGFILENAMES" /Zi /W3
> > > > -D__USE_PROTOS /wd4700 \
> > > > -         /D _CRT_SECURE_NO_DEPRECATE /D
> > > > _CRT_NONSTDC_NO_DEPRECATE
> > > > +        -D "ZZLEXBUFSIZE=65536"  /D "LONGFILENAMES" /Z7 /W3
> > > > -D__USE_PROTOS /wd4700 \
> > > > +         /D _CRT_SECURE_NO_DEPRECATE /D
> > > > _CRT_NONSTDC_NO_DEPRECATE
> > > >
> > > >  ANTLR_OBJS = antlr.obj scan.obj err.obj bits.obj build.obj fset2.obj \
> > > >              fset.obj gen.obj globals.obj hash.obj lex.obj main.obj \
> > > > @@ -226,7 +226,7 @@ set.obj: $(SET)\set.c \
> > > >
> > > >      $(CC) -c $(CFLAGS) $(SET)\set.c
> > > >
> > > > -clean:
> > > > +clean:
> > > >      -del *.obj
> > > >      -del *.ilk
> > > >      -del *.pdb
> > > > diff --git a/BaseTools/Source/C/VfrCompile/Pccts/dlg/DlgDDK.mak
> > > > b/BaseTools/Source/C/VfrCompile/Pccts/dlg/DlgDDK.mak
> > > > index 156d524acc94..dcc259543c4c 100644
> > > > --- a/BaseTools/Source/C/VfrCompile/Pccts/dlg/DlgDDK.mak
> > > > +++ b/BaseTools/Source/C/VfrCompile/Pccts/dlg/DlgDDK.mak
> > > > @@ -16,7 +16,7 @@ SET=$(PCCTS_HOME)\support\set
> > > >  # Compiler stuff
> > > >  CC = cl
> > > >  CFLAGS = /nologo -I "." -I "$(PCCTS_H)" -I "$(SET)" -D "USER_ZZSYN" -D
> > > "PC"
> > > > \
> > > > -        -D "ZZLEXBUFSIZE=65536"  /D "LONGFILENAMES" /W3 /Zi
> > > > +        -D "ZZLEXBUFSIZE=65536"  /D "LONGFILENAMES" /W3 /Z7
> > > >
> > > >  DLG_OBJS = dlg_p.obj dlg_a.obj main.obj err.obj support.obj \
> > > >             output.obj relabel.obj automata.obj
> > > > @@ -113,7 +113,7 @@ set.obj: $(SET)\set.c \
> > > >
> > > >      $(CC) -c $(CFLAGS) $(SET)\set.c
> > > >
> > > > -clean:
> > > > +clean:
> > > >      del *.obj
> > > >
> > > >  distclean:
> > > > diff --git a/BaseTools/Source/C/VfrCompile/Pccts/dlg/DlgMS.mak
> > > > b/BaseTools/Source/C/VfrCompile/Pccts/dlg/DlgMS.mak
> > > > index 2714308d4fa0..c2cac00f53df 100644
> > > > --- a/BaseTools/Source/C/VfrCompile/Pccts/dlg/DlgMS.mak
> > > > +++ b/BaseTools/Source/C/VfrCompile/Pccts/dlg/DlgMS.mak
> > > > @@ -16,8 +16,8 @@ SET=$(PCCTS_HOME)\support\set
> > > >  # Compiler stuff
> > > >  CC = cl
> > > >  CFLAGS = /nologo -I "." -I "$(PCCTS_H)" -I "$(SET)" -D "USER_ZZSYN" -D
> > > "PC"
> > > > \
> > > > -        -D "ZZLEXBUFSIZE=65536"  /D "LONGFILENAMES" /W3 /Zi \
> > > > -        /D _CRT_SECURE_NO_DEPRECATE /D
> > > > _CRT_NONSTDC_NO_DEPRECATE
> > > > +        -D "ZZLEXBUFSIZE=65536"  /D "LONGFILENAMES" /W3 /Z7 \
> > > > +        /D _CRT_SECURE_NO_DEPRECATE /D
> > > > _CRT_NONSTDC_NO_DEPRECATE
> > > >
> > > >  DLG_OBJS = dlg_p.obj dlg_a.obj main.obj err.obj support.obj \
> > > >             output.obj relabel.obj automata.obj
> > > > @@ -112,7 +112,7 @@ set.obj: $(SET)\set.c \
> > > >
> > > >      $(CC) -c $(CFLAGS) $(SET)\set.c
> > > >
> > > > -clean:
> > > > +clean:
> > > >      -del *.obj
> > > >      -del *.ilk
> > > >      -del *.pdb
> > > > @@ -123,4 +123,3 @@ cleanall:
> > > >      -del *.pdb
> > > >  		-del *.exe
> > > >      -del $(EDK_TOOLS_PATH)\Bin\Win32\dlg.exe
> > > > -
> > > > --
> > > > 2.37.1.windows.1
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> >
> >
> >
> >
> >
> 
> 
> 
> 
> 
> 
> 


^ permalink raw reply	[flat|nested] 7+ messages in thread

* 回复: [edk2-devel] 回复: [Patch 1/1] BaseTools/Source/C: Use /Z7 instead of /Zi for host tools
  2022-11-08  1:59       ` Michael D Kinney
@ 2022-11-08  7:15         ` gaoliming
  2022-11-08 23:43           ` Michael D Kinney
  0 siblings, 1 reply; 7+ messages in thread
From: gaoliming @ 2022-11-08  7:15 UTC (permalink / raw)
  To: devel, michael.d.kinney; +Cc: 'Feng, Bob C', 'Chen, Christine'

Mike: 
  I submit https://bugzilla.tianocore.org/show_bug.cgi?id=4145 to remove debug symbol in the C tools generation. 

  I am OK to merge current change first. Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>

Thanks
Liming
> -----邮件原件-----
> 发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Michael D
> Kinney
> 发送时间: 2022年11月8日 10:00
> 收件人: devel@edk2.groups.io; Gao, Liming <gaoliming@byosoft.com.cn>;
> Kinney, Michael D <michael.d.kinney@intel.com>
> 抄送: Feng, Bob C <bob.c.feng@intel.com>; Chen, Christine
> <yuwei.chen@intel.com>
> 主题: Re: [edk2-devel] 回复: [Patch 1/1] BaseTools/Source/C: Use /Z7
> instead of /Zi for host tools
> 
> Hi Liming,
> 
> I think a BZ feature request for BaseTools to support building with or without
> symbols would be good to submit for future stable tag.
> 
> I would like to see this patch be added to the current stable tag.
> 
> Thanks,
> 
> Mike
> 
> > -----Original Message-----
> > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of
> gaoliming via groups.io
> > Sent: Monday, November 7, 2022 5:04 PM
> > To: devel@edk2.groups.io; Kinney, Michael D
> <michael.d.kinney@intel.com>
> > Cc: Feng, Bob C <bob.c.feng@intel.com>; Chen, Christine
> <yuwei.chen@intel.com>
> > Subject: 回复: [edk2-devel] 回复: [Patch 1/1] BaseTools/Source/C: Use
> /Z7 instead of /Zi for host tools
> >
> > Mike:
> >  I agree there is no impact with debug symbol in the binary C tools.
> >
> >  But, the release version binary C tools should be better for the developer.
> If you think this change is big, I will submit one
> > BZ for future stable tag release.
> >
> > Thanks
> > Liming
> > > -----邮件原件-----
> > > 发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Michael
> D
> > > Kinney
> > > 发送时间: 2022年11月7日 15:21
> > > 收件人: devel@edk2.groups.io; Gao, Liming
> <gaoliming@byosoft.com.cn>;
> > > Kinney, Michael D <michael.d.kinney@intel.com>
> > > 抄送: Feng, Bob C <bob.c.feng@intel.com>; Chen, Christine
> > > <yuwei.chen@intel.com>
> > > 主题: Re: [edk2-devel] 回复: [Patch 1/1] BaseTools/Source/C: Use /Z7
> > > instead of /Zi for host tools
> > >
> > > Hi Liming,
> > >
> > > That seems like a bigger change.
> > >
> > > I see no harm in always producing symbols when build C host tools.
> > >
> > > Mike
> > >
> > > > -----Original Message-----
> > > > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of
> > > gaoliming via groups.io
> > > > Sent: Sunday, November 6, 2022 8:23 PM
> > > > To: Kinney, Michael D <michael.d.kinney@intel.com>;
> > > devel@edk2.groups.io
> > > > Cc: Feng, Bob C <bob.c.feng@intel.com>; Chen, Christine
> > > <yuwei.chen@intel.com>
> > > > Subject: [edk2-devel] 回复: [Patch 1/1] BaseTools/Source/C: Use /Z7
> > > instead of /Zi for host tools
> > > >
> > > > Mike:
> > > >   I suggest to remove /Zi and /DEBUG option for BaseTools C tool
> > > generation,
> > > > because only tool developer may require the debug version C tool.
> > > >
> > > > Thanks
> > > > Liming
> > > > > -----邮件原件-----
> > > > > 发件人: Michael D Kinney <michael.d.kinney@intel.com>
> > > > > 发送时间: 2022年11月6日 4:36
> > > > > 收件人: devel@edk2.groups.io
> > > > > 抄送: Bob Feng <bob.c.feng@intel.com>; Liming Gao
> > > > > <gaoliming@byosoft.com.cn>; Yuwei Chen <yuwei.chen@intel.com>
> > > > > 主题: [Patch 1/1] BaseTools/Source/C: Use /Z7 instead of /Zi for host
> > > > tools
> > > > >
> > > > > REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4139
> > > > >
> > > > > Update ms.common and *.mak files to use /Z7 instead of /Zi to embed
> > > > > symbol information in obj files for host tools built with VS compilers.
> > > > > This prevents vcxxx.pdb files from being generated in the root of
> > > > > the local edk2 repository or in BaseTools directories.
> > > > >
> > > > > Cc: Bob Feng <bob.c.feng@intel.com>
> > > > > Cc: Liming Gao <gaoliming@byosoft.com.cn>
> > > > > Cc: Yuwei Chen <yuwei.chen@intel.com>
> > > > > Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
> > > > > ---
> > > > >  BaseTools/Source/C/Makefiles/ms.common                 | 5
> > > ++---
> > > > >  BaseTools/Source/C/VfrCompile/Pccts/antlr/AntlrDDK.mak | 4 ++--
> > > > >  BaseTools/Source/C/VfrCompile/Pccts/antlr/AntlrMS.mak  | 6
> +++---
> > > > >  BaseTools/Source/C/VfrCompile/Pccts/dlg/DlgDDK.mak     | 4
> ++--
> > > > >  BaseTools/Source/C/VfrCompile/Pccts/dlg/DlgMS.mak      | 7
> > > +++----
> > > > >  5 files changed, 12 insertions(+), 14 deletions(-)
> > > > >
> > > > > diff --git a/BaseTools/Source/C/Makefiles/ms.common
> > > > > b/BaseTools/Source/C/Makefiles/ms.common
> > > > > index b2dbcf376c04..8391f10d5dd2 100644
> > > > > --- a/BaseTools/Source/C/Makefiles/ms.common
> > > > > +++ b/BaseTools/Source/C/Makefiles/ms.common
> > > > > @@ -57,6 +57,5 @@ LINKER = $(LD)
> > > > >
> > > > >  INC = $(INC) -I . -I $(SOURCE_PATH)\Include -I $(ARCH_INCLUDE) -I
> > > > > $(SOURCE_PATH)\Common
> > > > >
> > > > > -CFLAGS = $(CFLAGS) /nologo /Zi /c /O2 /MT /W4 /WX /D
> > > > > _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE
> > > > > -CPPFLAGS = $(CPPFLAGS) /EHsc /nologo /Zi /c /O2 /MT /D
> > > > > _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE
> > > > > -
> > > > > +CFLAGS = $(CFLAGS) /nologo /Z7 /c /O2 /MT /W4 /WX /D
> > > > > _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE
> > > > > +CPPFLAGS = $(CPPFLAGS) /EHsc /nologo /Z7 /c /O2 /MT /D
> > > > > _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE
> > > > > diff --git a/BaseTools/Source/C/VfrCompile/Pccts/antlr/AntlrDDK.mak
> > > > > b/BaseTools/Source/C/VfrCompile/Pccts/antlr/AntlrDDK.mak
> > > > > index 71b7c6b0b141..cde91a47159e 100644
> > > > > --- a/BaseTools/Source/C/VfrCompile/Pccts/antlr/AntlrDDK.mak
> > > > > +++ b/BaseTools/Source/C/VfrCompile/Pccts/antlr/AntlrDDK.mak
> > > > > @@ -16,7 +16,7 @@ SET=$(PCCTS_HOME)\support\set
> > > > >  # Compiler stuff
> > > > >  CC = cl
> > > > >  CFLAGS = /nologo -I "." -I "$(PCCTS_H)" -I "$(SET)" -D "USER_ZZSYN"
> -D
> > > > "PC"
> > > > > \
> > > > > -        -D "ZZLEXBUFSIZE=65536"  -D "LONGFILENAMES" /Zi /W3
> > > > > -D__USE_PROTOS /wd4700
> > > > > +        -D "ZZLEXBUFSIZE=65536"  -D "LONGFILENAMES" /Z7
> /W3
> > > > > -D__USE_PROTOS /wd4700
> > > > >
> > > > >  ANTLR_OBJS = antlr.obj scan.obj err.obj bits.obj build.obj fset2.obj \
> > > > >              fset.obj gen.obj globals.obj hash.obj lex.obj main.obj \
> > > > > @@ -225,7 +225,7 @@ set.obj: $(SET)\set.c \
> > > > >
> > > > >      $(CC) -c $(CFLAGS) $(SET)\set.c
> > > > >
> > > > > -clean:
> > > > > +clean:
> > > > >      del *.obj
> > > > >
> > > > >  distclean:
> > > > > diff --git a/BaseTools/Source/C/VfrCompile/Pccts/antlr/AntlrMS.mak
> > > > > b/BaseTools/Source/C/VfrCompile/Pccts/antlr/AntlrMS.mak
> > > > > index b30a73bb7424..6fc4d5c15d6c 100644
> > > > > --- a/BaseTools/Source/C/VfrCompile/Pccts/antlr/AntlrMS.mak
> > > > > +++ b/BaseTools/Source/C/VfrCompile/Pccts/antlr/AntlrMS.mak
> > > > > @@ -16,8 +16,8 @@ SET=$(PCCTS_HOME)\support\set
> > > > >  # Compiler stuff
> > > > >  CC = cl
> > > > >  CFLAGS = /nologo -I "." -I "$(PCCTS_H)" -I "$(SET)" -D "USER_ZZSYN"
> -D
> > > > "PC"
> > > > > \
> > > > > -        -D "ZZLEXBUFSIZE=65536"  /D "LONGFILENAMES" /Zi /W3
> > > > > -D__USE_PROTOS /wd4700 \
> > > > > -         /D _CRT_SECURE_NO_DEPRECATE /D
> > > > > _CRT_NONSTDC_NO_DEPRECATE
> > > > > +        -D "ZZLEXBUFSIZE=65536"  /D "LONGFILENAMES" /Z7
> /W3
> > > > > -D__USE_PROTOS /wd4700 \
> > > > > +         /D _CRT_SECURE_NO_DEPRECATE /D
> > > > > _CRT_NONSTDC_NO_DEPRECATE
> > > > >
> > > > >  ANTLR_OBJS = antlr.obj scan.obj err.obj bits.obj build.obj fset2.obj \
> > > > >              fset.obj gen.obj globals.obj hash.obj lex.obj main.obj \
> > > > > @@ -226,7 +226,7 @@ set.obj: $(SET)\set.c \
> > > > >
> > > > >      $(CC) -c $(CFLAGS) $(SET)\set.c
> > > > >
> > > > > -clean:
> > > > > +clean:
> > > > >      -del *.obj
> > > > >      -del *.ilk
> > > > >      -del *.pdb
> > > > > diff --git a/BaseTools/Source/C/VfrCompile/Pccts/dlg/DlgDDK.mak
> > > > > b/BaseTools/Source/C/VfrCompile/Pccts/dlg/DlgDDK.mak
> > > > > index 156d524acc94..dcc259543c4c 100644
> > > > > --- a/BaseTools/Source/C/VfrCompile/Pccts/dlg/DlgDDK.mak
> > > > > +++ b/BaseTools/Source/C/VfrCompile/Pccts/dlg/DlgDDK.mak
> > > > > @@ -16,7 +16,7 @@ SET=$(PCCTS_HOME)\support\set
> > > > >  # Compiler stuff
> > > > >  CC = cl
> > > > >  CFLAGS = /nologo -I "." -I "$(PCCTS_H)" -I "$(SET)" -D "USER_ZZSYN"
> -D
> > > > "PC"
> > > > > \
> > > > > -        -D "ZZLEXBUFSIZE=65536"  /D "LONGFILENAMES" /W3 /Zi
> > > > > +        -D "ZZLEXBUFSIZE=65536"  /D "LONGFILENAMES" /W3
> /Z7
> > > > >
> > > > >  DLG_OBJS = dlg_p.obj dlg_a.obj main.obj err.obj support.obj \
> > > > >             output.obj relabel.obj automata.obj
> > > > > @@ -113,7 +113,7 @@ set.obj: $(SET)\set.c \
> > > > >
> > > > >      $(CC) -c $(CFLAGS) $(SET)\set.c
> > > > >
> > > > > -clean:
> > > > > +clean:
> > > > >      del *.obj
> > > > >
> > > > >  distclean:
> > > > > diff --git a/BaseTools/Source/C/VfrCompile/Pccts/dlg/DlgMS.mak
> > > > > b/BaseTools/Source/C/VfrCompile/Pccts/dlg/DlgMS.mak
> > > > > index 2714308d4fa0..c2cac00f53df 100644
> > > > > --- a/BaseTools/Source/C/VfrCompile/Pccts/dlg/DlgMS.mak
> > > > > +++ b/BaseTools/Source/C/VfrCompile/Pccts/dlg/DlgMS.mak
> > > > > @@ -16,8 +16,8 @@ SET=$(PCCTS_HOME)\support\set
> > > > >  # Compiler stuff
> > > > >  CC = cl
> > > > >  CFLAGS = /nologo -I "." -I "$(PCCTS_H)" -I "$(SET)" -D "USER_ZZSYN"
> -D
> > > > "PC"
> > > > > \
> > > > > -        -D "ZZLEXBUFSIZE=65536"  /D "LONGFILENAMES" /W3 /Zi
> \
> > > > > -        /D _CRT_SECURE_NO_DEPRECATE /D
> > > > > _CRT_NONSTDC_NO_DEPRECATE
> > > > > +        -D "ZZLEXBUFSIZE=65536"  /D "LONGFILENAMES" /W3
> /Z7 \
> > > > > +        /D _CRT_SECURE_NO_DEPRECATE /D
> > > > > _CRT_NONSTDC_NO_DEPRECATE
> > > > >
> > > > >  DLG_OBJS = dlg_p.obj dlg_a.obj main.obj err.obj support.obj \
> > > > >             output.obj relabel.obj automata.obj
> > > > > @@ -112,7 +112,7 @@ set.obj: $(SET)\set.c \
> > > > >
> > > > >      $(CC) -c $(CFLAGS) $(SET)\set.c
> > > > >
> > > > > -clean:
> > > > > +clean:
> > > > >      -del *.obj
> > > > >      -del *.ilk
> > > > >      -del *.pdb
> > > > > @@ -123,4 +123,3 @@ cleanall:
> > > > >      -del *.pdb
> > > > >  		-del *.exe
> > > > >      -del $(EDK_TOOLS_PATH)\Bin\Win32\dlg.exe
> > > > > -
> > > > > --
> > > > > 2.37.1.windows.1
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> > >
> > >
> > >
> >
> >
> >
> >
> >
> >
> >
> 
> 
> 
> 
> 




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [edk2-devel] 回复: [Patch 1/1] BaseTools/Source/C: Use /Z7 instead of /Zi for host tools
  2022-11-08  7:15         ` 回复: " gaoliming
@ 2022-11-08 23:43           ` Michael D Kinney
  0 siblings, 0 replies; 7+ messages in thread
From: Michael D Kinney @ 2022-11-08 23:43 UTC (permalink / raw)
  To: Gao, Liming, devel@edk2.groups.io, Kinney, Michael D
  Cc: Feng, Bob C, Chen, Christine

Hi Liming,

Thank you for the review and adding the new BZ.  I updated the new BZ with a few more details.

Merged PR: https://github.com/tianocore/edk2/pull/3598

Mike


> -----Original Message-----
> From: gaoliming <gaoliming@byosoft.com.cn>
> Sent: Monday, November 7, 2022 11:16 PM
> To: devel@edk2.groups.io; Kinney, Michael D <michael.d.kinney@intel.com>
> Cc: Feng, Bob C <bob.c.feng@intel.com>; Chen, Christine <yuwei.chen@intel.com>
> Subject: 回复: [edk2-devel] 回复: [Patch 1/1] BaseTools/Source/C: Use /Z7 instead of /Zi for host tools
> 
> Mike:
>   I submit https://bugzilla.tianocore.org/show_bug.cgi?id=4145 to remove debug symbol in the C tools generation.
> 
>   I am OK to merge current change first. Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
> 
> Thanks
> Liming
> > -----邮件原件-----
> > 发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Michael D
> > Kinney
> > 发送时间: 2022年11月8日 10:00
> > 收件人: devel@edk2.groups.io; Gao, Liming <gaoliming@byosoft.com.cn>;
> > Kinney, Michael D <michael.d.kinney@intel.com>
> > 抄送: Feng, Bob C <bob.c.feng@intel.com>; Chen, Christine
> > <yuwei.chen@intel.com>
> > 主题: Re: [edk2-devel] 回复: [Patch 1/1] BaseTools/Source/C: Use /Z7
> > instead of /Zi for host tools
> >
> > Hi Liming,
> >
> > I think a BZ feature request for BaseTools to support building with or without
> > symbols would be good to submit for future stable tag.
> >
> > I would like to see this patch be added to the current stable tag.
> >
> > Thanks,
> >
> > Mike
> >
> > > -----Original Message-----
> > > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of
> > gaoliming via groups.io
> > > Sent: Monday, November 7, 2022 5:04 PM
> > > To: devel@edk2.groups.io; Kinney, Michael D
> > <michael.d.kinney@intel.com>
> > > Cc: Feng, Bob C <bob.c.feng@intel.com>; Chen, Christine
> > <yuwei.chen@intel.com>
> > > Subject: 回复: [edk2-devel] 回复: [Patch 1/1] BaseTools/Source/C: Use
> > /Z7 instead of /Zi for host tools
> > >
> > > Mike:
> > >  I agree there is no impact with debug symbol in the binary C tools.
> > >
> > >  But, the release version binary C tools should be better for the developer.
> > If you think this change is big, I will submit one
> > > BZ for future stable tag release.
> > >
> > > Thanks
> > > Liming
> > > > -----邮件原件-----
> > > > 发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Michael
> > D
> > > > Kinney
> > > > 发送时间: 2022年11月7日 15:21
> > > > 收件人: devel@edk2.groups.io; Gao, Liming
> > <gaoliming@byosoft.com.cn>;
> > > > Kinney, Michael D <michael.d.kinney@intel.com>
> > > > 抄送: Feng, Bob C <bob.c.feng@intel.com>; Chen, Christine
> > > > <yuwei.chen@intel.com>
> > > > 主题: Re: [edk2-devel] 回复: [Patch 1/1] BaseTools/Source/C: Use /Z7
> > > > instead of /Zi for host tools
> > > >
> > > > Hi Liming,
> > > >
> > > > That seems like a bigger change.
> > > >
> > > > I see no harm in always producing symbols when build C host tools.
> > > >
> > > > Mike
> > > >
> > > > > -----Original Message-----
> > > > > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of
> > > > gaoliming via groups.io
> > > > > Sent: Sunday, November 6, 2022 8:23 PM
> > > > > To: Kinney, Michael D <michael.d.kinney@intel.com>;
> > > > devel@edk2.groups.io
> > > > > Cc: Feng, Bob C <bob.c.feng@intel.com>; Chen, Christine
> > > > <yuwei.chen@intel.com>
> > > > > Subject: [edk2-devel] 回复: [Patch 1/1] BaseTools/Source/C: Use /Z7
> > > > instead of /Zi for host tools
> > > > >
> > > > > Mike:
> > > > >   I suggest to remove /Zi and /DEBUG option for BaseTools C tool
> > > > generation,
> > > > > because only tool developer may require the debug version C tool.
> > > > >
> > > > > Thanks
> > > > > Liming
> > > > > > -----邮件原件-----
> > > > > > 发件人: Michael D Kinney <michael.d.kinney@intel.com>
> > > > > > 发送时间: 2022年11月6日 4:36
> > > > > > 收件人: devel@edk2.groups.io
> > > > > > 抄送: Bob Feng <bob.c.feng@intel.com>; Liming Gao
> > > > > > <gaoliming@byosoft.com.cn>; Yuwei Chen <yuwei.chen@intel.com>
> > > > > > 主题: [Patch 1/1] BaseTools/Source/C: Use /Z7 instead of /Zi for host
> > > > > tools
> > > > > >
> > > > > > REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4139
> > > > > >
> > > > > > Update ms.common and *.mak files to use /Z7 instead of /Zi to embed
> > > > > > symbol information in obj files for host tools built with VS compilers.
> > > > > > This prevents vcxxx.pdb files from being generated in the root of
> > > > > > the local edk2 repository or in BaseTools directories.
> > > > > >
> > > > > > Cc: Bob Feng <bob.c.feng@intel.com>
> > > > > > Cc: Liming Gao <gaoliming@byosoft.com.cn>
> > > > > > Cc: Yuwei Chen <yuwei.chen@intel.com>
> > > > > > Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
> > > > > > ---
> > > > > >  BaseTools/Source/C/Makefiles/ms.common                 | 5
> > > > ++---
> > > > > >  BaseTools/Source/C/VfrCompile/Pccts/antlr/AntlrDDK.mak | 4 ++--
> > > > > >  BaseTools/Source/C/VfrCompile/Pccts/antlr/AntlrMS.mak  | 6
> > +++---
> > > > > >  BaseTools/Source/C/VfrCompile/Pccts/dlg/DlgDDK.mak     | 4
> > ++--
> > > > > >  BaseTools/Source/C/VfrCompile/Pccts/dlg/DlgMS.mak      | 7
> > > > +++----
> > > > > >  5 files changed, 12 insertions(+), 14 deletions(-)
> > > > > >
> > > > > > diff --git a/BaseTools/Source/C/Makefiles/ms.common
> > > > > > b/BaseTools/Source/C/Makefiles/ms.common
> > > > > > index b2dbcf376c04..8391f10d5dd2 100644
> > > > > > --- a/BaseTools/Source/C/Makefiles/ms.common
> > > > > > +++ b/BaseTools/Source/C/Makefiles/ms.common
> > > > > > @@ -57,6 +57,5 @@ LINKER = $(LD)
> > > > > >
> > > > > >  INC = $(INC) -I . -I $(SOURCE_PATH)\Include -I $(ARCH_INCLUDE) -I
> > > > > > $(SOURCE_PATH)\Common
> > > > > >
> > > > > > -CFLAGS = $(CFLAGS) /nologo /Zi /c /O2 /MT /W4 /WX /D
> > > > > > _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE
> > > > > > -CPPFLAGS = $(CPPFLAGS) /EHsc /nologo /Zi /c /O2 /MT /D
> > > > > > _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE
> > > > > > -
> > > > > > +CFLAGS = $(CFLAGS) /nologo /Z7 /c /O2 /MT /W4 /WX /D
> > > > > > _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE
> > > > > > +CPPFLAGS = $(CPPFLAGS) /EHsc /nologo /Z7 /c /O2 /MT /D
> > > > > > _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE
> > > > > > diff --git a/BaseTools/Source/C/VfrCompile/Pccts/antlr/AntlrDDK.mak
> > > > > > b/BaseTools/Source/C/VfrCompile/Pccts/antlr/AntlrDDK.mak
> > > > > > index 71b7c6b0b141..cde91a47159e 100644
> > > > > > --- a/BaseTools/Source/C/VfrCompile/Pccts/antlr/AntlrDDK.mak
> > > > > > +++ b/BaseTools/Source/C/VfrCompile/Pccts/antlr/AntlrDDK.mak
> > > > > > @@ -16,7 +16,7 @@ SET=$(PCCTS_HOME)\support\set
> > > > > >  # Compiler stuff
> > > > > >  CC = cl
> > > > > >  CFLAGS = /nologo -I "." -I "$(PCCTS_H)" -I "$(SET)" -D "USER_ZZSYN"
> > -D
> > > > > "PC"
> > > > > > \
> > > > > > -        -D "ZZLEXBUFSIZE=65536"  -D "LONGFILENAMES" /Zi /W3
> > > > > > -D__USE_PROTOS /wd4700
> > > > > > +        -D "ZZLEXBUFSIZE=65536"  -D "LONGFILENAMES" /Z7
> > /W3
> > > > > > -D__USE_PROTOS /wd4700
> > > > > >
> > > > > >  ANTLR_OBJS = antlr.obj scan.obj err.obj bits.obj build.obj fset2.obj \
> > > > > >              fset.obj gen.obj globals.obj hash.obj lex.obj main.obj \
> > > > > > @@ -225,7 +225,7 @@ set.obj: $(SET)\set.c \
> > > > > >
> > > > > >      $(CC) -c $(CFLAGS) $(SET)\set.c
> > > > > >
> > > > > > -clean:
> > > > > > +clean:
> > > > > >      del *.obj
> > > > > >
> > > > > >  distclean:
> > > > > > diff --git a/BaseTools/Source/C/VfrCompile/Pccts/antlr/AntlrMS.mak
> > > > > > b/BaseTools/Source/C/VfrCompile/Pccts/antlr/AntlrMS.mak
> > > > > > index b30a73bb7424..6fc4d5c15d6c 100644
> > > > > > --- a/BaseTools/Source/C/VfrCompile/Pccts/antlr/AntlrMS.mak
> > > > > > +++ b/BaseTools/Source/C/VfrCompile/Pccts/antlr/AntlrMS.mak
> > > > > > @@ -16,8 +16,8 @@ SET=$(PCCTS_HOME)\support\set
> > > > > >  # Compiler stuff
> > > > > >  CC = cl
> > > > > >  CFLAGS = /nologo -I "." -I "$(PCCTS_H)" -I "$(SET)" -D "USER_ZZSYN"
> > -D
> > > > > "PC"
> > > > > > \
> > > > > > -        -D "ZZLEXBUFSIZE=65536"  /D "LONGFILENAMES" /Zi /W3
> > > > > > -D__USE_PROTOS /wd4700 \
> > > > > > -         /D _CRT_SECURE_NO_DEPRECATE /D
> > > > > > _CRT_NONSTDC_NO_DEPRECATE
> > > > > > +        -D "ZZLEXBUFSIZE=65536"  /D "LONGFILENAMES" /Z7
> > /W3
> > > > > > -D__USE_PROTOS /wd4700 \
> > > > > > +         /D _CRT_SECURE_NO_DEPRECATE /D
> > > > > > _CRT_NONSTDC_NO_DEPRECATE
> > > > > >
> > > > > >  ANTLR_OBJS = antlr.obj scan.obj err.obj bits.obj build.obj fset2.obj \
> > > > > >              fset.obj gen.obj globals.obj hash.obj lex.obj main.obj \
> > > > > > @@ -226,7 +226,7 @@ set.obj: $(SET)\set.c \
> > > > > >
> > > > > >      $(CC) -c $(CFLAGS) $(SET)\set.c
> > > > > >
> > > > > > -clean:
> > > > > > +clean:
> > > > > >      -del *.obj
> > > > > >      -del *.ilk
> > > > > >      -del *.pdb
> > > > > > diff --git a/BaseTools/Source/C/VfrCompile/Pccts/dlg/DlgDDK.mak
> > > > > > b/BaseTools/Source/C/VfrCompile/Pccts/dlg/DlgDDK.mak
> > > > > > index 156d524acc94..dcc259543c4c 100644
> > > > > > --- a/BaseTools/Source/C/VfrCompile/Pccts/dlg/DlgDDK.mak
> > > > > > +++ b/BaseTools/Source/C/VfrCompile/Pccts/dlg/DlgDDK.mak
> > > > > > @@ -16,7 +16,7 @@ SET=$(PCCTS_HOME)\support\set
> > > > > >  # Compiler stuff
> > > > > >  CC = cl
> > > > > >  CFLAGS = /nologo -I "." -I "$(PCCTS_H)" -I "$(SET)" -D "USER_ZZSYN"
> > -D
> > > > > "PC"
> > > > > > \
> > > > > > -        -D "ZZLEXBUFSIZE=65536"  /D "LONGFILENAMES" /W3 /Zi
> > > > > > +        -D "ZZLEXBUFSIZE=65536"  /D "LONGFILENAMES" /W3
> > /Z7
> > > > > >
> > > > > >  DLG_OBJS = dlg_p.obj dlg_a.obj main.obj err.obj support.obj \
> > > > > >             output.obj relabel.obj automata.obj
> > > > > > @@ -113,7 +113,7 @@ set.obj: $(SET)\set.c \
> > > > > >
> > > > > >      $(CC) -c $(CFLAGS) $(SET)\set.c
> > > > > >
> > > > > > -clean:
> > > > > > +clean:
> > > > > >      del *.obj
> > > > > >
> > > > > >  distclean:
> > > > > > diff --git a/BaseTools/Source/C/VfrCompile/Pccts/dlg/DlgMS.mak
> > > > > > b/BaseTools/Source/C/VfrCompile/Pccts/dlg/DlgMS.mak
> > > > > > index 2714308d4fa0..c2cac00f53df 100644
> > > > > > --- a/BaseTools/Source/C/VfrCompile/Pccts/dlg/DlgMS.mak
> > > > > > +++ b/BaseTools/Source/C/VfrCompile/Pccts/dlg/DlgMS.mak
> > > > > > @@ -16,8 +16,8 @@ SET=$(PCCTS_HOME)\support\set
> > > > > >  # Compiler stuff
> > > > > >  CC = cl
> > > > > >  CFLAGS = /nologo -I "." -I "$(PCCTS_H)" -I "$(SET)" -D "USER_ZZSYN"
> > -D
> > > > > "PC"
> > > > > > \
> > > > > > -        -D "ZZLEXBUFSIZE=65536"  /D "LONGFILENAMES" /W3 /Zi
> > \
> > > > > > -        /D _CRT_SECURE_NO_DEPRECATE /D
> > > > > > _CRT_NONSTDC_NO_DEPRECATE
> > > > > > +        -D "ZZLEXBUFSIZE=65536"  /D "LONGFILENAMES" /W3
> > /Z7 \
> > > > > > +        /D _CRT_SECURE_NO_DEPRECATE /D
> > > > > > _CRT_NONSTDC_NO_DEPRECATE
> > > > > >
> > > > > >  DLG_OBJS = dlg_p.obj dlg_a.obj main.obj err.obj support.obj \
> > > > > >             output.obj relabel.obj automata.obj
> > > > > > @@ -112,7 +112,7 @@ set.obj: $(SET)\set.c \
> > > > > >
> > > > > >      $(CC) -c $(CFLAGS) $(SET)\set.c
> > > > > >
> > > > > > -clean:
> > > > > > +clean:
> > > > > >      -del *.obj
> > > > > >      -del *.ilk
> > > > > >      -del *.pdb
> > > > > > @@ -123,4 +123,3 @@ cleanall:
> > > > > >      -del *.pdb
> > > > > >  		-del *.exe
> > > > > >      -del $(EDK_TOOLS_PATH)\Bin\Win32\dlg.exe
> > > > > > -
> > > > > > --
> > > > > > 2.37.1.windows.1
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> >
> >
> >
> > 
> >
> 
> 


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-11-08 23:44 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-05 20:35 [Patch 1/1] BaseTools/Source/C: Use /Z7 instead of /Zi for host tools Michael D Kinney
2022-11-07  4:23 ` 回复: " gaoliming
2022-11-07  7:20   ` [edk2-devel] " Michael D Kinney
2022-11-08  1:03     ` 回复: " gaoliming
2022-11-08  1:59       ` Michael D Kinney
2022-11-08  7:15         ` 回复: " gaoliming
2022-11-08 23:43           ` Michael D Kinney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox