* [PATCH v1 0/2] BaseTools: Make undefined VFR macro an error @ 2021-03-02 8:21 Daniel Schaefer 2021-03-02 8:21 ` [PATCH v1 1/2] BaseTools: Make undefined VFR macro an error (GCC) Daniel Schaefer 2021-03-02 8:21 ` [PATCH v1 2/2] BaseTools: Make undefined VFR macro an error (MSVC) Daniel Schaefer 0 siblings, 2 replies; 9+ messages in thread From: Daniel Schaefer @ 2021-03-02 8:21 UTC (permalink / raw) To: devel; +Cc: Bob Feng, Liming Gao, Yuwei Chen, Derek Lin See the individual commit descriptions. I split it up into GCC/CLANG and MSVC commits but feel free to squash them if you think they belong together. We found a few bugs and lots of dead code with this in our internal code-base. I only tested GCC5, CLANBPDB and VS2015 toolchains. Not 100% sure if this warnings exists in the old MSVC toolchains. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Yuwei Chen <yuwei.chen@intel.com> Cc: Derek Lin <derek.lin2@hpe.com> Daniel Schaefer (2): BaseTools: Make undefined VFR macro an error (GCC) BaseTools: Make undefined VFR macro an error (MSVC) BaseTools/Conf/tools_def.template | 50 ++++++++++---------- 1 file changed, 25 insertions(+), 25 deletions(-) -- 2.30.0 ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v1 1/2] BaseTools: Make undefined VFR macro an error (GCC) 2021-03-02 8:21 [PATCH v1 0/2] BaseTools: Make undefined VFR macro an error Daniel Schaefer @ 2021-03-02 8:21 ` Daniel Schaefer 2021-03-08 1:05 ` [edk2-devel] " Bob Feng 2021-03-02 8:21 ` [PATCH v1 2/2] BaseTools: Make undefined VFR macro an error (MSVC) Daniel Schaefer 1 sibling, 1 reply; 9+ messages in thread From: Daniel Schaefer @ 2021-03-02 8:21 UTC (permalink / raw) To: devel; +Cc: Bob Feng, Liming Gao, Yuwei Chen, Derek Lin VFR successfully compiles if we forget to include a header that defines a macro. In that case the HII option was hidden when it shouldn't be just because the macro was used but not defined. The behaviour is totally intended by the C/PP standard. When a macro is undefined it evaluates to 0. GCC, MSVC and Clang have warnings to catch this type of mistake. With this commit we enable this warning and make it a compiler error. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Yuwei Chen <yuwei.chen@intel.com> Cc: Derek Lin <derek.lin2@hpe.com> --- BaseTools/Conf/tools_def.template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template index 933b3160fd2b..728c1d3119e4 100755 --- a/BaseTools/Conf/tools_def.template +++ b/BaseTools/Conf/tools_def.template @@ -3,7 +3,7 @@ # Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR> # Portions copyright (c) 2011 - 2019, ARM Ltd. All rights reserved.<BR> # Copyright (c) 2015, Hewlett-Packard Development Company, L.P.<BR> -# (C) Copyright 2020, Hewlett Packard Enterprise Development LP<BR> +# (C) Copyright 2020-2021, Hewlett Packard Enterprise Development LP<BR> # Copyright (c) Microsoft Corporation # # SPDX-License-Identifier: BSD-2-Clause-Patent @@ -1938,7 +1938,7 @@ DEFINE GCC_AARCH64_ASLDLINK_FLAGS = DEF(GCC_AARCH64_DLINK_FLAGS) -Wl,--entry,Re DEFINE GCC_IA32_X64_DLINK_FLAGS = DEF(GCC_IA32_X64_DLINK_COMMON) --entry _$(IMAGE_ENTRY_POINT) --file-alignment 0x20 --section-alignment 0x20 -Map $(DEST_DIR_DEBUG)/$(BASE_NAME).map DEFINE GCC_ASM_FLAGS = -c -x assembler -imacros AutoGen.h DEFINE GCC_PP_FLAGS = -E -x assembler-with-cpp -include AutoGen.h -DEFINE GCC_VFRPP_FLAGS = -x c -E -P -DVFRCOMPILE --include $(MODULE_NAME)StrDefs.h +DEFINE GCC_VFRPP_FLAGS = -x c -E -P -DVFRCOMPILE --include $(MODULE_NAME)StrDefs.h -Wundef -Werror DEFINE GCC_ASLPP_FLAGS = -x c -E -include AutoGen.h DEFINE GCC_ASLCC_FLAGS = -x c DEFINE GCC_WINDRES_FLAGS = -J rc -O coff -- 2.30.0 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [edk2-devel] [PATCH v1 1/2] BaseTools: Make undefined VFR macro an error (GCC) 2021-03-02 8:21 ` [PATCH v1 1/2] BaseTools: Make undefined VFR macro an error (GCC) Daniel Schaefer @ 2021-03-08 1:05 ` Bob Feng 2021-03-08 3:44 ` Daniel Schaefer [not found] ` <166A41333DA0F959.3944@groups.io> 0 siblings, 2 replies; 9+ messages in thread From: Bob Feng @ 2021-03-08 1:05 UTC (permalink / raw) To: devel@edk2.groups.io, daniel.schaefer@hpe.com Cc: Liming Gao, Chen, Christine, Derek Lin Hi Derek, -Werror. Make all warnings into errors. Should here be that only treat undef warning as error? Thanks, Bob -----Original Message----- From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Daniel Schaefer Sent: Tuesday, March 2, 2021 4:22 PM To: devel@edk2.groups.io Cc: Feng, Bob C <bob.c.feng@intel.com>; Liming Gao <gaoliming@byosoft.com.cn>; Chen, Christine <yuwei.chen@intel.com>; Derek Lin <derek.lin2@hpe.com> Subject: [edk2-devel] [PATCH v1 1/2] BaseTools: Make undefined VFR macro an error (GCC) VFR successfully compiles if we forget to include a header that defines a macro. In that case the HII option was hidden when it shouldn't be just because the macro was used but not defined. The behaviour is totally intended by the C/PP standard. When a macro is undefined it evaluates to 0. GCC, MSVC and Clang have warnings to catch this type of mistake. With this commit we enable this warning and make it a compiler error. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Yuwei Chen <yuwei.chen@intel.com> Cc: Derek Lin <derek.lin2@hpe.com> --- BaseTools/Conf/tools_def.template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template index 933b3160fd2b..728c1d3119e4 100755 --- a/BaseTools/Conf/tools_def.template +++ b/BaseTools/Conf/tools_def.template @@ -3,7 +3,7 @@ # Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR> # Portions copyright (c) 2011 - 2019, ARM Ltd. All rights reserved.<BR> # Copyright (c) 2015, Hewlett-Packard Development Company, L.P.<BR> -# (C) Copyright 2020, Hewlett Packard Enterprise Development LP<BR> +# (C) Copyright 2020-2021, Hewlett Packard Enterprise Development +LP<BR> # Copyright (c) Microsoft Corporation # # SPDX-License-Identifier: BSD-2-Clause-Patent @@ -1938,7 +1938,7 @@ DEFINE GCC_AARCH64_ASLDLINK_FLAGS = DEF(GCC_AARCH64_DLINK_FLAGS) -Wl,--entry,Re DEFINE GCC_IA32_X64_DLINK_FLAGS = DEF(GCC_IA32_X64_DLINK_COMMON) --entry _$(IMAGE_ENTRY_POINT) --file-alignment 0x20 --section-alignment 0x20 -Map $(DEST_DIR_DEBUG)/$(BASE_NAME).map DEFINE GCC_ASM_FLAGS = -c -x assembler -imacros AutoGen.h DEFINE GCC_PP_FLAGS = -E -x assembler-with-cpp -include AutoGen.h -DEFINE GCC_VFRPP_FLAGS = -x c -E -P -DVFRCOMPILE --include $(MODULE_NAME)StrDefs.h +DEFINE GCC_VFRPP_FLAGS = -x c -E -P -DVFRCOMPILE --include $(MODULE_NAME)StrDefs.h -Wundef -Werror DEFINE GCC_ASLPP_FLAGS = -x c -E -include AutoGen.h DEFINE GCC_ASLCC_FLAGS = -x c DEFINE GCC_WINDRES_FLAGS = -J rc -O coff -- 2.30.0 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [edk2-devel] [PATCH v1 1/2] BaseTools: Make undefined VFR macro an error (GCC) 2021-03-08 1:05 ` [edk2-devel] " Bob Feng @ 2021-03-08 3:44 ` Daniel Schaefer [not found] ` <166A41333DA0F959.3944@groups.io> 1 sibling, 0 replies; 9+ messages in thread From: Daniel Schaefer @ 2021-03-08 3:44 UTC (permalink / raw) To: Feng, Bob C, devel@edk2.groups.io Cc: Liming Gao, Chen, Christine, Lin, Derek (HPS SW) [-- Attachment #1: Type: text/plain, Size: 3368 bytes --] It didn't cause any other errors for the huge HPE codebase. Only undefined macros. I don't believe the preprocessor has so many warnings anyways. So -Werror should be fine. ________________________________ From: Feng, Bob C <bob.c.feng@intel.com> Sent: Monday, March 8, 2021 09:05 To: devel@edk2.groups.io <devel@edk2.groups.io>; Schaefer, Daniel <daniel.schaefer@hpe.com> Cc: Liming Gao <gaoliming@byosoft.com.cn>; Chen, Christine <yuwei.chen@intel.com>; Lin, Derek (HPS SW) <derek.lin2@hpe.com> Subject: RE: [edk2-devel] [PATCH v1 1/2] BaseTools: Make undefined VFR macro an error (GCC) Hi Derek, -Werror. Make all warnings into errors. Should here be that only treat undef warning as error? Thanks, Bob -----Original Message----- From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Daniel Schaefer Sent: Tuesday, March 2, 2021 4:22 PM To: devel@edk2.groups.io Cc: Feng, Bob C <bob.c.feng@intel.com>; Liming Gao <gaoliming@byosoft.com.cn>; Chen, Christine <yuwei.chen@intel.com>; Derek Lin <derek.lin2@hpe.com> Subject: [edk2-devel] [PATCH v1 1/2] BaseTools: Make undefined VFR macro an error (GCC) VFR successfully compiles if we forget to include a header that defines a macro. In that case the HII option was hidden when it shouldn't be just because the macro was used but not defined. The behaviour is totally intended by the C/PP standard. When a macro is undefined it evaluates to 0. GCC, MSVC and Clang have warnings to catch this type of mistake. With this commit we enable this warning and make it a compiler error. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Yuwei Chen <yuwei.chen@intel.com> Cc: Derek Lin <derek.lin2@hpe.com> --- BaseTools/Conf/tools_def.template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template index 933b3160fd2b..728c1d3119e4 100755 --- a/BaseTools/Conf/tools_def.template +++ b/BaseTools/Conf/tools_def.template @@ -3,7 +3,7 @@ # Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR> # Portions copyright (c) 2011 - 2019, ARM Ltd. All rights reserved.<BR> # Copyright (c) 2015, Hewlett-Packard Development Company, L.P.<BR> -# (C) Copyright 2020, Hewlett Packard Enterprise Development LP<BR> +# (C) Copyright 2020-2021, Hewlett Packard Enterprise Development +LP<BR> # Copyright (c) Microsoft Corporation # # SPDX-License-Identifier: BSD-2-Clause-Patent @@ -1938,7 +1938,7 @@ DEFINE GCC_AARCH64_ASLDLINK_FLAGS = DEF(GCC_AARCH64_DLINK_FLAGS) -Wl,--entry,Re DEFINE GCC_IA32_X64_DLINK_FLAGS = DEF(GCC_IA32_X64_DLINK_COMMON) --entry _$(IMAGE_ENTRY_POINT) --file-alignment 0x20 --section-alignment 0x20 -Map $(DEST_DIR_DEBUG)/$(BASE_NAME).map DEFINE GCC_ASM_FLAGS = -c -x assembler -imacros AutoGen.h DEFINE GCC_PP_FLAGS = -E -x assembler-with-cpp -include AutoGen.h -DEFINE GCC_VFRPP_FLAGS = -x c -E -P -DVFRCOMPILE --include $(MODULE_NAME)StrDefs.h +DEFINE GCC_VFRPP_FLAGS = -x c -E -P -DVFRCOMPILE --include $(MODULE_NAME)StrDefs.h -Wundef -Werror DEFINE GCC_ASLPP_FLAGS = -x c -E -include AutoGen.h DEFINE GCC_ASLCC_FLAGS = -x c DEFINE GCC_WINDRES_FLAGS = -J rc -O coff -- 2.30.0 [-- Attachment #2: Type: text/html, Size: 4784 bytes --] ^ permalink raw reply related [flat|nested] 9+ messages in thread
[parent not found: <166A41333DA0F959.3944@groups.io>]
* Re: [edk2-devel] [PATCH v1 1/2] BaseTools: Make undefined VFR macro an error (GCC) [not found] ` <166A41333DA0F959.3944@groups.io> @ 2021-04-23 8:22 ` Daniel Schaefer 0 siblings, 0 replies; 9+ messages in thread From: Daniel Schaefer @ 2021-04-23 8:22 UTC (permalink / raw) To: Feng, Bob C, devel@edk2.groups.io, Schaefer, Daniel Cc: Liming Gao, Chen, Christine, Lin, Derek (HPS SW) [-- Attachment #1: Type: text/plain, Size: 3969 bytes --] Ok sure, let's make only undef an error, not all other warnings. Then the behaviour will also be the same as on MSVC. ________________________________ From: devel@edk2.groups.io <devel@edk2.groups.io> on behalf of Daniel Schaefer <daniel.schaefer@hpe.com> Sent: Monday, March 8, 2021 11:44 To: Feng, Bob C <bob.c.feng@intel.com>; devel@edk2.groups.io <devel@edk2.groups.io> Cc: Liming Gao <gaoliming@byosoft.com.cn>; Chen, Christine <yuwei.chen@intel.com>; Lin, Derek (HPS SW) <derek.lin2@hpe.com> Subject: Re: [edk2-devel] [PATCH v1 1/2] BaseTools: Make undefined VFR macro an error (GCC) It didn't cause any other errors for the huge HPE codebase. Only undefined macros. I don't believe the preprocessor has so many warnings anyways. So -Werror should be fine. ________________________________ From: Feng, Bob C <bob.c.feng@intel.com> Sent: Monday, March 8, 2021 09:05 To: devel@edk2.groups.io <devel@edk2.groups.io>; Schaefer, Daniel <daniel.schaefer@hpe.com> Cc: Liming Gao <gaoliming@byosoft.com.cn>; Chen, Christine <yuwei.chen@intel.com>; Lin, Derek (HPS SW) <derek.lin2@hpe.com> Subject: RE: [edk2-devel] [PATCH v1 1/2] BaseTools: Make undefined VFR macro an error (GCC) Hi Derek, -Werror. Make all warnings into errors. Should here be that only treat undef warning as error? Thanks, Bob -----Original Message----- From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Daniel Schaefer Sent: Tuesday, March 2, 2021 4:22 PM To: devel@edk2.groups.io Cc: Feng, Bob C <bob.c.feng@intel.com>; Liming Gao <gaoliming@byosoft.com.cn>; Chen, Christine <yuwei.chen@intel.com>; Derek Lin <derek.lin2@hpe.com> Subject: [edk2-devel] [PATCH v1 1/2] BaseTools: Make undefined VFR macro an error (GCC) VFR successfully compiles if we forget to include a header that defines a macro. In that case the HII option was hidden when it shouldn't be just because the macro was used but not defined. The behaviour is totally intended by the C/PP standard. When a macro is undefined it evaluates to 0. GCC, MSVC and Clang have warnings to catch this type of mistake. With this commit we enable this warning and make it a compiler error. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Yuwei Chen <yuwei.chen@intel.com> Cc: Derek Lin <derek.lin2@hpe.com> --- BaseTools/Conf/tools_def.template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template index 933b3160fd2b..728c1d3119e4 100755 --- a/BaseTools/Conf/tools_def.template +++ b/BaseTools/Conf/tools_def.template @@ -3,7 +3,7 @@ # Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR> # Portions copyright (c) 2011 - 2019, ARM Ltd. All rights reserved.<BR> # Copyright (c) 2015, Hewlett-Packard Development Company, L.P.<BR> -# (C) Copyright 2020, Hewlett Packard Enterprise Development LP<BR> +# (C) Copyright 2020-2021, Hewlett Packard Enterprise Development +LP<BR> # Copyright (c) Microsoft Corporation # # SPDX-License-Identifier: BSD-2-Clause-Patent @@ -1938,7 +1938,7 @@ DEFINE GCC_AARCH64_ASLDLINK_FLAGS = DEF(GCC_AARCH64_DLINK_FLAGS) -Wl,--entry,Re DEFINE GCC_IA32_X64_DLINK_FLAGS = DEF(GCC_IA32_X64_DLINK_COMMON) --entry _$(IMAGE_ENTRY_POINT) --file-alignment 0x20 --section-alignment 0x20 -Map $(DEST_DIR_DEBUG)/$(BASE_NAME).map DEFINE GCC_ASM_FLAGS = -c -x assembler -imacros AutoGen.h DEFINE GCC_PP_FLAGS = -E -x assembler-with-cpp -include AutoGen.h -DEFINE GCC_VFRPP_FLAGS = -x c -E -P -DVFRCOMPILE --include $(MODULE_NAME)StrDefs.h +DEFINE GCC_VFRPP_FLAGS = -x c -E -P -DVFRCOMPILE --include $(MODULE_NAME)StrDefs.h -Wundef -Werror DEFINE GCC_ASLPP_FLAGS = -x c -E -include AutoGen.h DEFINE GCC_ASLCC_FLAGS = -x c DEFINE GCC_WINDRES_FLAGS = -J rc -O coff -- 2.30.0 [-- Attachment #2: Type: text/html, Size: 5908 bytes --] ^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v1 2/2] BaseTools: Make undefined VFR macro an error (MSVC) 2021-03-02 8:21 [PATCH v1 0/2] BaseTools: Make undefined VFR macro an error Daniel Schaefer 2021-03-02 8:21 ` [PATCH v1 1/2] BaseTools: Make undefined VFR macro an error (GCC) Daniel Schaefer @ 2021-03-02 8:21 ` Daniel Schaefer 2021-03-04 2:12 ` 回复: " gaoliming 1 sibling, 1 reply; 9+ messages in thread From: Daniel Schaefer @ 2021-03-02 8:21 UTC (permalink / raw) To: devel; +Cc: Bob Feng, Liming Gao, Yuwei Chen, Derek Lin VFR successfully compiles if we forget to include a header that defines a macro. In that case the HII option was hidden when it shouldn't be just because the macro was used but not defined. The behaviour is totally intended by the C/PP standard. When a macro is undefined it evaluates to 0. GCC, MSVC and Clang have warnings to catch this type of mistake. With this commit we enable this warning and make it a compiler error. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Yuwei Chen <yuwei.chen@intel.com> Cc: Derek Lin <derek.lin2@hpe.com> --- BaseTools/Conf/tools_def.template | 46 ++++++++++---------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template index 728c1d3119e4..56c7bd13f157 100755 --- a/BaseTools/Conf/tools_def.template +++ b/BaseTools/Conf/tools_def.template @@ -422,7 +422,7 @@ DEFINE DTC_BIN = ENV(DTC_PREFIX)dtc *_VS2008_*_SLINK_FLAGS = /NOLOGO /LTCG *_VS2008_*_APP_FLAGS = /nologo /E /TC *_VS2008_*_PP_FLAGS = /nologo /E /TC /FIAutoGen.h -*_VS2008_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h +*_VS2008_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h /we4668 *_VS2008_*_DEPS_FLAGS = DEF(MSFT_DEPS_FLAGS) *_VS2008_*_ASM16_PATH = DEF(VS2008_BIN)\ml.exe @@ -518,7 +518,7 @@ NOOPT_VS2008_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT *_VS2008_EBC_MAKE_FLAGS = /nologo *_VS2008_EBC_PP_FLAGS = /nologo /E /TC /FIAutoGen.h *_VS2008_EBC_CC_FLAGS = /nologo /c /WX /W3 /FIAutoGen.h /D$(MODULE_ENTRY_POINT)=$(ARCH_ENTRY_POINT) -*_VS2008_EBC_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h +*_VS2008_EBC_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h /we4668 *_VS2008_EBC_SLINK_FLAGS = /lib /NOLOGO /MACHINE:EBC *_VS2008_EBC_DLINK_FLAGS = "C:\Program Files\Intel\EBC\Lib\EbcLib.lib" /NOLOGO /NODEFAULTLIB /MACHINE:EBC /OPT:REF /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /MAP /ALIGN:32 /DRIVER @@ -538,7 +538,7 @@ NOOPT_VS2008_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT *_VS2008x86_*_SLINK_FLAGS = /NOLOGO /LTCG *_VS2008x86_*_APP_FLAGS = /nologo /E /TC *_VS2008x86_*_PP_FLAGS = /nologo /E /TC /FIAutoGen.h -*_VS2008x86_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h +*_VS2008x86_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h /we4668 *_VS2008x86_*_DEPS_FLAGS = DEF(MSFT_DEPS_FLAGS) *_VS2008x86_*_ASM16_PATH = DEF(VS2008x86_BIN)\ml.exe @@ -633,7 +633,7 @@ NOOPT_VS2008x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF *_VS2008x86_EBC_MAKE_FLAGS = /nologo *_VS2008x86_EBC_PP_FLAGS = /nologo /E /TC /FIAutoGen.h *_VS2008x86_EBC_CC_FLAGS = /nologo /c /WX /W3 /FIAutoGen.h /D$(MODULE_ENTRY_POINT)=$(ARCH_ENTRY_POINT) -*_VS2008x86_EBC_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h +*_VS2008x86_EBC_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h /we4668 *_VS2008x86_EBC_SLINK_FLAGS = /lib /NOLOGO /MACHINE:EBC *_VS2008x86_EBC_DLINK_FLAGS = "C:\Program Files (x86)\Intel\EBC\Lib\EbcLib.lib" /NOLOGO /NODEFAULTLIB /MACHINE:EBC /OPT:REF /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /MAP /ALIGN:32 /DRIVER @@ -656,7 +656,7 @@ NOOPT_VS2008x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF *_VS2010_*_SLINK_FLAGS = /NOLOGO /LTCG *_VS2010_*_APP_FLAGS = /nologo /E /TC *_VS2010_*_PP_FLAGS = /nologo /E /TC /FIAutoGen.h -*_VS2010_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h +*_VS2010_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h /we4668 *_VS2010_*_DEPS_FLAGS = DEF(MSFT_DEPS_FLAGS) *_VS2010_*_ASM16_PATH = DEF(VS2010_BIN)\ml.exe @@ -752,7 +752,7 @@ NOOPT_VS2010_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT *_VS2010_EBC_MAKE_FLAGS = /nologo *_VS2010_EBC_PP_FLAGS = /nologo /E /TC /FIAutoGen.h *_VS2010_EBC_CC_FLAGS = /nologo /c /WX /W3 /FIAutoGen.h /D$(MODULE_ENTRY_POINT)=$(ARCH_ENTRY_POINT) -*_VS2010_EBC_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h +*_VS2010_EBC_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h /we4668 *_VS2010_EBC_SLINK_FLAGS = /lib /NOLOGO /MACHINE:EBC *_VS2010_EBC_DLINK_FLAGS = "C:\Program Files\Intel\EBC\Lib\EbcLib.lib" /NOLOGO /NODEFAULTLIB /MACHINE:EBC /OPT:REF /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /MAP /ALIGN:32 /DRIVER @@ -772,7 +772,7 @@ NOOPT_VS2010_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT *_VS2010x86_*_SLINK_FLAGS = /NOLOGO /LTCG *_VS2010x86_*_APP_FLAGS = /nologo /E /TC *_VS2010x86_*_PP_FLAGS = /nologo /E /TC /FIAutoGen.h -*_VS2010x86_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h +*_VS2010x86_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h /we4668 *_VS2010x86_*_DEPS_FLAGS = DEF(MSFT_DEPS_FLAGS) *_VS2010x86_*_ASM16_PATH = DEF(VS2010x86_BIN)\ml.exe @@ -868,7 +868,7 @@ NOOPT_VS2010x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF *_VS2010x86_EBC_MAKE_FLAGS = /nologo *_VS2010x86_EBC_PP_FLAGS = /nologo /E /TC /FIAutoGen.h *_VS2010x86_EBC_CC_FLAGS = /nologo /c /WX /W3 /FIAutoGen.h /D$(MODULE_ENTRY_POINT)=$(ARCH_ENTRY_POINT) -*_VS2010x86_EBC_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h +*_VS2010x86_EBC_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h /we4668 *_VS2010x86_EBC_SLINK_FLAGS = /lib /NOLOGO /MACHINE:EBC *_VS2010x86_EBC_DLINK_FLAGS = "C:\Program Files (x86)\Intel\EBC\Lib\EbcLib.lib" /NOLOGO /NODEFAULTLIB /MACHINE:EBC /OPT:REF /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /MAP /ALIGN:32 /DRIVER @@ -890,7 +890,7 @@ NOOPT_VS2010x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF *_VS2012_*_SLINK_FLAGS = /NOLOGO /LTCG *_VS2012_*_APP_FLAGS = /nologo /E /TC *_VS2012_*_PP_FLAGS = /nologo /E /TC /FIAutoGen.h -*_VS2012_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h +*_VS2012_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h /we4668 *_VS2012_*_DEPS_FLAGS = DEF(MSFT_DEPS_FLAGS) *_VS2012_*_ASM16_PATH = DEF(VS2012_BIN)\ml.exe @@ -986,7 +986,7 @@ NOOPT_VS2012_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT *_VS2012_EBC_MAKE_FLAGS = /nologo *_VS2012_EBC_PP_FLAGS = /nologo /E /TC /FIAutoGen.h *_VS2012_EBC_CC_FLAGS = /nologo /c /WX /W3 /FIAutoGen.h /D$(MODULE_ENTRY_POINT)=$(ARCH_ENTRY_POINT) -*_VS2012_EBC_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h +*_VS2012_EBC_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h /we4668 *_VS2012_EBC_SLINK_FLAGS = /lib /NOLOGO /MACHINE:EBC *_VS2012_EBC_DLINK_FLAGS = "C:\Program Files\Intel\EBC\Lib\EbcLib.lib" /NOLOGO /NODEFAULTLIB /MACHINE:EBC /OPT:REF /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /MAP /ALIGN:32 /DRIVER @@ -1006,7 +1006,7 @@ NOOPT_VS2012_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT *_VS2012x86_*_SLINK_FLAGS = /NOLOGO /LTCG *_VS2012x86_*_APP_FLAGS = /nologo /E /TC *_VS2012x86_*_PP_FLAGS = /nologo /E /TC /FIAutoGen.h -*_VS2012x86_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h +*_VS2012x86_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h /we4668 *_VS2012x86_*_DEPS_FLAGS = DEF(MSFT_DEPS_FLAGS) *_VS2012x86_*_ASM16_PATH = DEF(VS2012x86_BIN)\ml.exe @@ -1102,7 +1102,7 @@ NOOPT_VS2012x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF *_VS2012x86_EBC_MAKE_FLAGS = /nologo *_VS2012x86_EBC_PP_FLAGS = /nologo /E /TC /FIAutoGen.h *_VS2012x86_EBC_CC_FLAGS = /nologo /c /WX /W3 /FIAutoGen.h /D$(MODULE_ENTRY_POINT)=$(ARCH_ENTRY_POINT) -*_VS2012x86_EBC_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h +*_VS2012x86_EBC_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h /we4668 *_VS2012x86_EBC_SLINK_FLAGS = /lib /NOLOGO /MACHINE:EBC *_VS2012x86_EBC_DLINK_FLAGS = "C:\Program Files (x86)\Intel\EBC\Lib\EbcLib.lib" /NOLOGO /NODEFAULTLIB /MACHINE:EBC /OPT:REF /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /MAP /ALIGN:32 /DRIVER @@ -1124,7 +1124,7 @@ NOOPT_VS2012x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF *_VS2013_*_SLINK_FLAGS = /NOLOGO /LTCG *_VS2013_*_APP_FLAGS = /nologo /E /TC *_VS2013_*_PP_FLAGS = /nologo /E /TC /FIAutoGen.h -*_VS2013_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h +*_VS2013_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h /we4668 *_VS2013_*_DEPS_FLAGS = DEF(MSFT_DEPS_FLAGS) *_VS2013_*_ASM16_PATH = DEF(VS2013_BIN)\ml.exe @@ -1220,7 +1220,7 @@ NOOPT_VS2013_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT *_VS2013_EBC_MAKE_FLAGS = /nologo *_VS2013_EBC_PP_FLAGS = /nologo /E /TC /FIAutoGen.h *_VS2013_EBC_CC_FLAGS = /nologo /c /WX /W3 /FIAutoGen.h /D$(MODULE_ENTRY_POINT)=$(ARCH_ENTRY_POINT) -*_VS2013_EBC_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h +*_VS2013_EBC_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h /we4668 *_VS2013_EBC_SLINK_FLAGS = /lib /NOLOGO /MACHINE:EBC *_VS2013_EBC_DLINK_FLAGS = "C:\Program Files\Intel\EBC\Lib\EbcLib.lib" /NOLOGO /NODEFAULTLIB /MACHINE:EBC /OPT:REF /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /MAP /ALIGN:32 /DRIVER @@ -1240,7 +1240,7 @@ NOOPT_VS2013_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT *_VS2013x86_*_SLINK_FLAGS = /NOLOGO /LTCG *_VS2013x86_*_APP_FLAGS = /nologo /E /TC *_VS2013x86_*_PP_FLAGS = /nologo /E /TC /FIAutoGen.h -*_VS2013x86_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h +*_VS2013x86_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h /we4668 *_VS2013x86_*_DEPS_FLAGS = DEF(MSFT_DEPS_FLAGS) *_VS2013x86_*_ASM16_PATH = DEF(VS2013x86_BIN)\ml.exe @@ -1336,7 +1336,7 @@ NOOPT_VS2013x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF *_VS2013x86_EBC_MAKE_FLAGS = /nologo *_VS2013x86_EBC_PP_FLAGS = /nologo /E /TC /FIAutoGen.h *_VS2013x86_EBC_CC_FLAGS = /nologo /c /WX /W3 /FIAutoGen.h /D$(MODULE_ENTRY_POINT)=$(ARCH_ENTRY_POINT) -*_VS2013x86_EBC_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h +*_VS2013x86_EBC_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h /we4668 *_VS2013x86_EBC_SLINK_FLAGS = /lib /NOLOGO /MACHINE:EBC *_VS2013x86_EBC_DLINK_FLAGS = "C:\Program Files (x86)\Intel\EBC\Lib\EbcLib.lib" /NOLOGO /NODEFAULTLIB /MACHINE:EBC /OPT:REF /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /MAP /ALIGN:32 /DRIVER @@ -1358,7 +1358,7 @@ NOOPT_VS2013x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF *_VS2015_*_SLINK_FLAGS = /NOLOGO /LTCG *_VS2015_*_APP_FLAGS = /nologo /E /TC *_VS2015_*_PP_FLAGS = /nologo /E /TC /FIAutoGen.h -*_VS2015_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h +*_VS2015_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h /we4668 *_VS2015_*_DLINK2_FLAGS = *_VS2015_*_DEPS_FLAGS = DEF(MSFT_DEPS_FLAGS) *_VS2015_*_ASM16_PATH = DEF(VS2015_BIN)\ml.exe @@ -1455,7 +1455,7 @@ NOOPT_VS2015_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT *_VS2015_EBC_MAKE_FLAGS = /nologo *_VS2015_EBC_PP_FLAGS = /nologo /E /TC /FIAutoGen.h *_VS2015_EBC_CC_FLAGS = /nologo /c /WX /W3 /FIAutoGen.h /D$(MODULE_ENTRY_POINT)=$(ARCH_ENTRY_POINT) -*_VS2015_EBC_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h +*_VS2015_EBC_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h /we4668 *_VS2015_EBC_SLINK_FLAGS = /lib /NOLOGO /MACHINE:EBC *_VS2015_EBC_DLINK_FLAGS = "C:\Program Files\Intel\EBC\Lib\EbcLib.lib" /NOLOGO /NODEFAULTLIB /MACHINE:EBC /OPT:REF /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /MAP /ALIGN:32 /DRIVER @@ -1475,7 +1475,7 @@ NOOPT_VS2015_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT *_VS2015x86_*_SLINK_FLAGS = /NOLOGO /LTCG *_VS2015x86_*_APP_FLAGS = /nologo /E /TC *_VS2015x86_*_PP_FLAGS = /nologo /E /TC /FIAutoGen.h -*_VS2015x86_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h +*_VS2015x86_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h /we4668 *_VS2015x86_*_DLINK2_FLAGS = *_VS2015x86_*_DEPS_FLAGS = DEF(MSFT_DEPS_FLAGS) *_VS2015x86_*_ASM16_PATH = DEF(VS2015x86_BIN)\ml.exe @@ -1593,7 +1593,7 @@ NOOPT_VS2015x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF *_VS2017_*_SLINK_FLAGS = /NOLOGO /LTCG *_VS2017_*_APP_FLAGS = /nologo /E /TC *_VS2017_*_PP_FLAGS = /nologo /E /TC /FIAutoGen.h -*_VS2017_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h +*_VS2017_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h /we4668 *_VS2017_*_DLINK2_FLAGS = /WHOLEARCHIVE *_VS2017_*_ASM16_PATH = DEF(VS2017_BIN_IA32)\ml.exe *_VS2017_*_DEPS_FLAGS = DEF(MSFT_DEPS_FLAGS) @@ -1736,7 +1736,7 @@ NOOPT_VS2017_AARCH64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF *_VS2017_EBC_MAKE_FLAGS = /nologo *_VS2017_EBC_PP_FLAGS = /nologo /E /TC /FIAutoGen.h *_VS2017_EBC_CC_FLAGS = /nologo /c /WX /W3 /FIAutoGen.h /D$(MODULE_ENTRY_POINT)=$(ARCH_ENTRY_POINT) -*_VS2017_EBC_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h +*_VS2017_EBC_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h /we4668 *_VS2017_EBC_SLINK_FLAGS = /lib /NOLOGO /MACHINE:EBC *_VS2017_EBC_DLINK_FLAGS = "C:\Program Files (x86)\Intel\EBC\Lib\EbcLib.lib" /NOLOGO /NODEFAULTLIB /MACHINE:EBC /OPT:REF /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /MAP /ALIGN:32 /DRIVER @@ -1756,7 +1756,7 @@ NOOPT_VS2017_AARCH64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF *_VS2019_*_SLINK_FLAGS = /NOLOGO /LTCG *_VS2019_*_APP_FLAGS = /nologo /E /TC *_VS2019_*_PP_FLAGS = /nologo /E /TC /FIAutoGen.h -*_VS2019_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h +*_VS2019_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h /we4668 *_VS2019_*_DLINK2_FLAGS = /WHOLEARCHIVE *_VS2019_*_ASM16_PATH = DEF(VS2019_BIN_IA32)\ml.exe *_VS2019_*_DEPS_FLAGS = DEF(MSFT_DEPS_FLAGS) @@ -1899,7 +1899,7 @@ NOOPT_VS2019_AARCH64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF *_VS2019_EBC_MAKE_FLAGS = /nologo *_VS2019_EBC_PP_FLAGS = /nologo /E /TC /FIAutoGen.h *_VS2019_EBC_CC_FLAGS = /nologo /c /WX /W3 /FIAutoGen.h /D$(MODULE_ENTRY_POINT)=$(ARCH_ENTRY_POINT) -*_VS2019_EBC_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h +*_VS2019_EBC_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h /we4668 *_VS2019_EBC_SLINK_FLAGS = /lib /NOLOGO /MACHINE:EBC *_VS2019_EBC_DLINK_FLAGS = "C:\Program Files (x86)\Intel\EBC\Lib\EbcLib.lib" /NOLOGO /NODEFAULTLIB /MACHINE:EBC /OPT:REF /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /MAP /ALIGN:32 /DRIVER -- 2.30.0 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* 回复: [PATCH v1 2/2] BaseTools: Make undefined VFR macro an error (MSVC) 2021-03-02 8:21 ` [PATCH v1 2/2] BaseTools: Make undefined VFR macro an error (MSVC) Daniel Schaefer @ 2021-03-04 2:12 ` gaoliming 2021-03-04 2:46 ` Daniel Schaefer 0 siblings, 1 reply; 9+ messages in thread From: gaoliming @ 2021-03-04 2:12 UTC (permalink / raw) To: 'Daniel Schaefer', devel Cc: 'Bob Feng', 'Yuwei Chen', 'Derek Lin' Do you check whether EBC compiler supports this warning? And, do you evaluate CLANG compiler support for this warning? Thanks Liming > -----邮件原件----- > 发件人: Daniel Schaefer <daniel.schaefer@hpe.com> > 发送时间: 2021年3月2日 16:22 > 收件人: devel@edk2.groups.io > 抄送: Bob Feng <bob.c.feng@intel.com>; Liming Gao > <gaoliming@byosoft.com.cn>; Yuwei Chen <yuwei.chen@intel.com>; Derek > Lin <derek.lin2@hpe.com> > 主题: [PATCH v1 2/2] BaseTools: Make undefined VFR macro an error (MSVC) > > VFR successfully compiles if we forget to include a header that defines > a macro. In that case the HII option was hidden when it shouldn't be > just because the macro was used but not defined. > > The behaviour is totally intended by the C/PP standard. When a macro is > undefined it evaluates to 0. > GCC, MSVC and Clang have warnings to catch this type of mistake. With > this commit we enable this warning and make it a compiler error. > > Cc: Bob Feng <bob.c.feng@intel.com> > Cc: Liming Gao <gaoliming@byosoft.com.cn> > Cc: Yuwei Chen <yuwei.chen@intel.com> > Cc: Derek Lin <derek.lin2@hpe.com> > --- > BaseTools/Conf/tools_def.template | 46 ++++++++++---------- > 1 file changed, 23 insertions(+), 23 deletions(-) > > diff --git a/BaseTools/Conf/tools_def.template > b/BaseTools/Conf/tools_def.template > index 728c1d3119e4..56c7bd13f157 100755 > --- a/BaseTools/Conf/tools_def.template > +++ b/BaseTools/Conf/tools_def.template > @@ -422,7 +422,7 @@ DEFINE DTC_BIN = > ENV(DTC_PREFIX)dtc > *_VS2008_*_SLINK_FLAGS = /NOLOGO /LTCG > > *_VS2008_*_APP_FLAGS = /nologo /E /TC > > *_VS2008_*_PP_FLAGS = /nologo /E /TC /FIAutoGen.h > > -*_VS2008_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE > /FI$(MODULE_NAME)StrDefs.h > > +*_VS2008_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE > /FI$(MODULE_NAME)StrDefs.h /we4668 > > *_VS2008_*_DEPS_FLAGS = DEF(MSFT_DEPS_FLAGS) > > *_VS2008_*_ASM16_PATH = DEF(VS2008_BIN)\ml.exe > > > > @@ -518,7 +518,7 @@ NOOPT_VS2008_X64_DLINK_FLAGS = /NOLOGO > /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT > *_VS2008_EBC_MAKE_FLAGS = /nologo > > *_VS2008_EBC_PP_FLAGS = /nologo /E /TC /FIAutoGen.h > > *_VS2008_EBC_CC_FLAGS = /nologo /c /WX /W3 > /FIAutoGen.h /D$(MODULE_ENTRY_POINT)=$(ARCH_ENTRY_POINT) > > -*_VS2008_EBC_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE > /FI$(MODULE_NAME)StrDefs.h > > +*_VS2008_EBC_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE > /FI$(MODULE_NAME)StrDefs.h /we4668 > > *_VS2008_EBC_SLINK_FLAGS = /lib /NOLOGO /MACHINE:EBC > > *_VS2008_EBC_DLINK_FLAGS = "C:\Program > Files\Intel\EBC\Lib\EbcLib.lib" /NOLOGO /NODEFAULTLIB /MACHINE:EBC > /OPT:REF /ENTRY:$(IMAGE_ENTRY_POINT) > /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /MAP /ALIGN:32 /DRIVER > > > > @@ -538,7 +538,7 @@ NOOPT_VS2008_X64_DLINK_FLAGS = /NOLOGO > /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT > *_VS2008x86_*_SLINK_FLAGS = /NOLOGO /LTCG > > *_VS2008x86_*_APP_FLAGS = /nologo /E /TC > > *_VS2008x86_*_PP_FLAGS = /nologo /E /TC /FIAutoGen.h > > -*_VS2008x86_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE > /FI$(MODULE_NAME)StrDefs.h > > +*_VS2008x86_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE > /FI$(MODULE_NAME)StrDefs.h /we4668 > > *_VS2008x86_*_DEPS_FLAGS = DEF(MSFT_DEPS_FLAGS) > > *_VS2008x86_*_ASM16_PATH = DEF(VS2008x86_BIN)\ml.exe > > > > @@ -633,7 +633,7 @@ NOOPT_VS2008x86_X64_DLINK_FLAGS = > /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF > *_VS2008x86_EBC_MAKE_FLAGS = /nologo > > *_VS2008x86_EBC_PP_FLAGS = /nologo /E /TC /FIAutoGen.h > > *_VS2008x86_EBC_CC_FLAGS = /nologo /c /WX /W3 > /FIAutoGen.h /D$(MODULE_ENTRY_POINT)=$(ARCH_ENTRY_POINT) > > -*_VS2008x86_EBC_VFRPP_FLAGS = /nologo /E /TC > /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h > > +*_VS2008x86_EBC_VFRPP_FLAGS = /nologo /E /TC > /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h /we4668 > > *_VS2008x86_EBC_SLINK_FLAGS = /lib /NOLOGO > /MACHINE:EBC > > *_VS2008x86_EBC_DLINK_FLAGS = "C:\Program Files > (x86)\Intel\EBC\Lib\EbcLib.lib" /NOLOGO /NODEFAULTLIB /MACHINE:EBC > /OPT:REF /ENTRY:$(IMAGE_ENTRY_POINT) > /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /MAP /ALIGN:32 /DRIVER > > > > @@ -656,7 +656,7 @@ NOOPT_VS2008x86_X64_DLINK_FLAGS = > /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF > *_VS2010_*_SLINK_FLAGS = /NOLOGO /LTCG > > *_VS2010_*_APP_FLAGS = /nologo /E /TC > > *_VS2010_*_PP_FLAGS = /nologo /E /TC /FIAutoGen.h > > -*_VS2010_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE > /FI$(MODULE_NAME)StrDefs.h > > +*_VS2010_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE > /FI$(MODULE_NAME)StrDefs.h /we4668 > > *_VS2010_*_DEPS_FLAGS = DEF(MSFT_DEPS_FLAGS) > > *_VS2010_*_ASM16_PATH = DEF(VS2010_BIN)\ml.exe > > > > @@ -752,7 +752,7 @@ NOOPT_VS2010_X64_DLINK_FLAGS = /NOLOGO > /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT > *_VS2010_EBC_MAKE_FLAGS = /nologo > > *_VS2010_EBC_PP_FLAGS = /nologo /E /TC /FIAutoGen.h > > *_VS2010_EBC_CC_FLAGS = /nologo /c /WX /W3 > /FIAutoGen.h /D$(MODULE_ENTRY_POINT)=$(ARCH_ENTRY_POINT) > > -*_VS2010_EBC_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE > /FI$(MODULE_NAME)StrDefs.h > > +*_VS2010_EBC_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE > /FI$(MODULE_NAME)StrDefs.h /we4668 > > *_VS2010_EBC_SLINK_FLAGS = /lib /NOLOGO /MACHINE:EBC > > *_VS2010_EBC_DLINK_FLAGS = "C:\Program > Files\Intel\EBC\Lib\EbcLib.lib" /NOLOGO /NODEFAULTLIB /MACHINE:EBC > /OPT:REF /ENTRY:$(IMAGE_ENTRY_POINT) > /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /MAP /ALIGN:32 /DRIVER > > > > @@ -772,7 +772,7 @@ NOOPT_VS2010_X64_DLINK_FLAGS = /NOLOGO > /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT > *_VS2010x86_*_SLINK_FLAGS = /NOLOGO /LTCG > > *_VS2010x86_*_APP_FLAGS = /nologo /E /TC > > *_VS2010x86_*_PP_FLAGS = /nologo /E /TC /FIAutoGen.h > > -*_VS2010x86_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE > /FI$(MODULE_NAME)StrDefs.h > > +*_VS2010x86_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE > /FI$(MODULE_NAME)StrDefs.h /we4668 > > *_VS2010x86_*_DEPS_FLAGS = DEF(MSFT_DEPS_FLAGS) > > *_VS2010x86_*_ASM16_PATH = DEF(VS2010x86_BIN)\ml.exe > > > > @@ -868,7 +868,7 @@ NOOPT_VS2010x86_X64_DLINK_FLAGS = > /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF > *_VS2010x86_EBC_MAKE_FLAGS = /nologo > > *_VS2010x86_EBC_PP_FLAGS = /nologo /E /TC /FIAutoGen.h > > *_VS2010x86_EBC_CC_FLAGS = /nologo /c /WX /W3 > /FIAutoGen.h /D$(MODULE_ENTRY_POINT)=$(ARCH_ENTRY_POINT) > > -*_VS2010x86_EBC_VFRPP_FLAGS = /nologo /E /TC > /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h > > +*_VS2010x86_EBC_VFRPP_FLAGS = /nologo /E /TC > /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h /we4668 > > *_VS2010x86_EBC_SLINK_FLAGS = /lib /NOLOGO > /MACHINE:EBC > > *_VS2010x86_EBC_DLINK_FLAGS = "C:\Program Files > (x86)\Intel\EBC\Lib\EbcLib.lib" /NOLOGO /NODEFAULTLIB /MACHINE:EBC > /OPT:REF /ENTRY:$(IMAGE_ENTRY_POINT) > /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /MAP /ALIGN:32 /DRIVER > > > > @@ -890,7 +890,7 @@ NOOPT_VS2010x86_X64_DLINK_FLAGS = > /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF > *_VS2012_*_SLINK_FLAGS = /NOLOGO /LTCG > > *_VS2012_*_APP_FLAGS = /nologo /E /TC > > *_VS2012_*_PP_FLAGS = /nologo /E /TC /FIAutoGen.h > > -*_VS2012_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE > /FI$(MODULE_NAME)StrDefs.h > > +*_VS2012_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE > /FI$(MODULE_NAME)StrDefs.h /we4668 > > *_VS2012_*_DEPS_FLAGS = DEF(MSFT_DEPS_FLAGS) > > *_VS2012_*_ASM16_PATH = DEF(VS2012_BIN)\ml.exe > > > > @@ -986,7 +986,7 @@ NOOPT_VS2012_X64_DLINK_FLAGS = /NOLOGO > /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT > *_VS2012_EBC_MAKE_FLAGS = /nologo > > *_VS2012_EBC_PP_FLAGS = /nologo /E /TC /FIAutoGen.h > > *_VS2012_EBC_CC_FLAGS = /nologo /c /WX /W3 > /FIAutoGen.h /D$(MODULE_ENTRY_POINT)=$(ARCH_ENTRY_POINT) > > -*_VS2012_EBC_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE > /FI$(MODULE_NAME)StrDefs.h > > +*_VS2012_EBC_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE > /FI$(MODULE_NAME)StrDefs.h /we4668 > > *_VS2012_EBC_SLINK_FLAGS = /lib /NOLOGO /MACHINE:EBC > > *_VS2012_EBC_DLINK_FLAGS = "C:\Program > Files\Intel\EBC\Lib\EbcLib.lib" /NOLOGO /NODEFAULTLIB /MACHINE:EBC > /OPT:REF /ENTRY:$(IMAGE_ENTRY_POINT) > /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /MAP /ALIGN:32 /DRIVER > > > > @@ -1006,7 +1006,7 @@ NOOPT_VS2012_X64_DLINK_FLAGS = /NOLOGO > /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT > *_VS2012x86_*_SLINK_FLAGS = /NOLOGO /LTCG > > *_VS2012x86_*_APP_FLAGS = /nologo /E /TC > > *_VS2012x86_*_PP_FLAGS = /nologo /E /TC /FIAutoGen.h > > -*_VS2012x86_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE > /FI$(MODULE_NAME)StrDefs.h > > +*_VS2012x86_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE > /FI$(MODULE_NAME)StrDefs.h /we4668 > > *_VS2012x86_*_DEPS_FLAGS = DEF(MSFT_DEPS_FLAGS) > > *_VS2012x86_*_ASM16_PATH = DEF(VS2012x86_BIN)\ml.exe > > > > @@ -1102,7 +1102,7 @@ NOOPT_VS2012x86_X64_DLINK_FLAGS = > /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF > *_VS2012x86_EBC_MAKE_FLAGS = /nologo > > *_VS2012x86_EBC_PP_FLAGS = /nologo /E /TC /FIAutoGen.h > > *_VS2012x86_EBC_CC_FLAGS = /nologo /c /WX /W3 > /FIAutoGen.h /D$(MODULE_ENTRY_POINT)=$(ARCH_ENTRY_POINT) > > -*_VS2012x86_EBC_VFRPP_FLAGS = /nologo /E /TC > /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h > > +*_VS2012x86_EBC_VFRPP_FLAGS = /nologo /E /TC > /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h /we4668 > > *_VS2012x86_EBC_SLINK_FLAGS = /lib /NOLOGO > /MACHINE:EBC > > *_VS2012x86_EBC_DLINK_FLAGS = "C:\Program Files > (x86)\Intel\EBC\Lib\EbcLib.lib" /NOLOGO /NODEFAULTLIB /MACHINE:EBC > /OPT:REF /ENTRY:$(IMAGE_ENTRY_POINT) > /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /MAP /ALIGN:32 /DRIVER > > > > @@ -1124,7 +1124,7 @@ NOOPT_VS2012x86_X64_DLINK_FLAGS = > /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF > *_VS2013_*_SLINK_FLAGS = /NOLOGO /LTCG > > *_VS2013_*_APP_FLAGS = /nologo /E /TC > > *_VS2013_*_PP_FLAGS = /nologo /E /TC /FIAutoGen.h > > -*_VS2013_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE > /FI$(MODULE_NAME)StrDefs.h > > +*_VS2013_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE > /FI$(MODULE_NAME)StrDefs.h /we4668 > > *_VS2013_*_DEPS_FLAGS = DEF(MSFT_DEPS_FLAGS) > > *_VS2013_*_ASM16_PATH = DEF(VS2013_BIN)\ml.exe > > > > @@ -1220,7 +1220,7 @@ NOOPT_VS2013_X64_DLINK_FLAGS = /NOLOGO > /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT > *_VS2013_EBC_MAKE_FLAGS = /nologo > > *_VS2013_EBC_PP_FLAGS = /nologo /E /TC /FIAutoGen.h > > *_VS2013_EBC_CC_FLAGS = /nologo /c /WX /W3 > /FIAutoGen.h /D$(MODULE_ENTRY_POINT)=$(ARCH_ENTRY_POINT) > > -*_VS2013_EBC_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE > /FI$(MODULE_NAME)StrDefs.h > > +*_VS2013_EBC_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE > /FI$(MODULE_NAME)StrDefs.h /we4668 > > *_VS2013_EBC_SLINK_FLAGS = /lib /NOLOGO /MACHINE:EBC > > *_VS2013_EBC_DLINK_FLAGS = "C:\Program > Files\Intel\EBC\Lib\EbcLib.lib" /NOLOGO /NODEFAULTLIB /MACHINE:EBC > /OPT:REF /ENTRY:$(IMAGE_ENTRY_POINT) > /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /MAP /ALIGN:32 /DRIVER > > > > @@ -1240,7 +1240,7 @@ NOOPT_VS2013_X64_DLINK_FLAGS = /NOLOGO > /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT > *_VS2013x86_*_SLINK_FLAGS = /NOLOGO /LTCG > > *_VS2013x86_*_APP_FLAGS = /nologo /E /TC > > *_VS2013x86_*_PP_FLAGS = /nologo /E /TC /FIAutoGen.h > > -*_VS2013x86_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE > /FI$(MODULE_NAME)StrDefs.h > > +*_VS2013x86_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE > /FI$(MODULE_NAME)StrDefs.h /we4668 > > *_VS2013x86_*_DEPS_FLAGS = DEF(MSFT_DEPS_FLAGS) > > *_VS2013x86_*_ASM16_PATH = DEF(VS2013x86_BIN)\ml.exe > > > > @@ -1336,7 +1336,7 @@ NOOPT_VS2013x86_X64_DLINK_FLAGS = > /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF > *_VS2013x86_EBC_MAKE_FLAGS = /nologo > > *_VS2013x86_EBC_PP_FLAGS = /nologo /E /TC /FIAutoGen.h > > *_VS2013x86_EBC_CC_FLAGS = /nologo /c /WX /W3 > /FIAutoGen.h /D$(MODULE_ENTRY_POINT)=$(ARCH_ENTRY_POINT) > > -*_VS2013x86_EBC_VFRPP_FLAGS = /nologo /E /TC > /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h > > +*_VS2013x86_EBC_VFRPP_FLAGS = /nologo /E /TC > /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h /we4668 > > *_VS2013x86_EBC_SLINK_FLAGS = /lib /NOLOGO > /MACHINE:EBC > > *_VS2013x86_EBC_DLINK_FLAGS = "C:\Program Files > (x86)\Intel\EBC\Lib\EbcLib.lib" /NOLOGO /NODEFAULTLIB /MACHINE:EBC > /OPT:REF /ENTRY:$(IMAGE_ENTRY_POINT) > /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /MAP /ALIGN:32 /DRIVER > > > > @@ -1358,7 +1358,7 @@ NOOPT_VS2013x86_X64_DLINK_FLAGS = > /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF > *_VS2015_*_SLINK_FLAGS = /NOLOGO /LTCG > > *_VS2015_*_APP_FLAGS = /nologo /E /TC > > *_VS2015_*_PP_FLAGS = /nologo /E /TC /FIAutoGen.h > > -*_VS2015_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE > /FI$(MODULE_NAME)StrDefs.h > > +*_VS2015_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE > /FI$(MODULE_NAME)StrDefs.h /we4668 > > *_VS2015_*_DLINK2_FLAGS = > > *_VS2015_*_DEPS_FLAGS = DEF(MSFT_DEPS_FLAGS) > > *_VS2015_*_ASM16_PATH = DEF(VS2015_BIN)\ml.exe > > @@ -1455,7 +1455,7 @@ NOOPT_VS2015_X64_DLINK_FLAGS = /NOLOGO > /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT > *_VS2015_EBC_MAKE_FLAGS = /nologo > > *_VS2015_EBC_PP_FLAGS = /nologo /E /TC /FIAutoGen.h > > *_VS2015_EBC_CC_FLAGS = /nologo /c /WX /W3 > /FIAutoGen.h /D$(MODULE_ENTRY_POINT)=$(ARCH_ENTRY_POINT) > > -*_VS2015_EBC_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE > /FI$(MODULE_NAME)StrDefs.h > > +*_VS2015_EBC_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE > /FI$(MODULE_NAME)StrDefs.h /we4668 > > *_VS2015_EBC_SLINK_FLAGS = /lib /NOLOGO /MACHINE:EBC > > *_VS2015_EBC_DLINK_FLAGS = "C:\Program > Files\Intel\EBC\Lib\EbcLib.lib" /NOLOGO /NODEFAULTLIB /MACHINE:EBC > /OPT:REF /ENTRY:$(IMAGE_ENTRY_POINT) > /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /MAP /ALIGN:32 /DRIVER > > > > @@ -1475,7 +1475,7 @@ NOOPT_VS2015_X64_DLINK_FLAGS = /NOLOGO > /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT > *_VS2015x86_*_SLINK_FLAGS = /NOLOGO /LTCG > > *_VS2015x86_*_APP_FLAGS = /nologo /E /TC > > *_VS2015x86_*_PP_FLAGS = /nologo /E /TC /FIAutoGen.h > > -*_VS2015x86_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE > /FI$(MODULE_NAME)StrDefs.h > > +*_VS2015x86_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE > /FI$(MODULE_NAME)StrDefs.h /we4668 > > *_VS2015x86_*_DLINK2_FLAGS = > > *_VS2015x86_*_DEPS_FLAGS = DEF(MSFT_DEPS_FLAGS) > > *_VS2015x86_*_ASM16_PATH = DEF(VS2015x86_BIN)\ml.exe > > @@ -1593,7 +1593,7 @@ NOOPT_VS2015x86_X64_DLINK_FLAGS = > /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF > *_VS2017_*_SLINK_FLAGS = /NOLOGO /LTCG > > *_VS2017_*_APP_FLAGS = /nologo /E /TC > > *_VS2017_*_PP_FLAGS = /nologo /E /TC /FIAutoGen.h > > -*_VS2017_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE > /FI$(MODULE_NAME)StrDefs.h > > +*_VS2017_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE > /FI$(MODULE_NAME)StrDefs.h /we4668 > > *_VS2017_*_DLINK2_FLAGS = /WHOLEARCHIVE > > *_VS2017_*_ASM16_PATH = DEF(VS2017_BIN_IA32)\ml.exe > > *_VS2017_*_DEPS_FLAGS = DEF(MSFT_DEPS_FLAGS) > > @@ -1736,7 +1736,7 @@ NOOPT_VS2017_AARCH64_DLINK_FLAGS = > /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF > *_VS2017_EBC_MAKE_FLAGS = /nologo > > *_VS2017_EBC_PP_FLAGS = /nologo /E /TC /FIAutoGen.h > > *_VS2017_EBC_CC_FLAGS = /nologo /c /WX /W3 > /FIAutoGen.h /D$(MODULE_ENTRY_POINT)=$(ARCH_ENTRY_POINT) > > -*_VS2017_EBC_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE > /FI$(MODULE_NAME)StrDefs.h > > +*_VS2017_EBC_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE > /FI$(MODULE_NAME)StrDefs.h /we4668 > > *_VS2017_EBC_SLINK_FLAGS = /lib /NOLOGO /MACHINE:EBC > > *_VS2017_EBC_DLINK_FLAGS = "C:\Program Files > (x86)\Intel\EBC\Lib\EbcLib.lib" /NOLOGO /NODEFAULTLIB /MACHINE:EBC > /OPT:REF /ENTRY:$(IMAGE_ENTRY_POINT) > /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /MAP /ALIGN:32 /DRIVER > > > > @@ -1756,7 +1756,7 @@ NOOPT_VS2017_AARCH64_DLINK_FLAGS = > /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF > *_VS2019_*_SLINK_FLAGS = /NOLOGO /LTCG > > *_VS2019_*_APP_FLAGS = /nologo /E /TC > > *_VS2019_*_PP_FLAGS = /nologo /E /TC /FIAutoGen.h > > -*_VS2019_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE > /FI$(MODULE_NAME)StrDefs.h > > +*_VS2019_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE > /FI$(MODULE_NAME)StrDefs.h /we4668 > > *_VS2019_*_DLINK2_FLAGS = /WHOLEARCHIVE > > *_VS2019_*_ASM16_PATH = DEF(VS2019_BIN_IA32)\ml.exe > > *_VS2019_*_DEPS_FLAGS = DEF(MSFT_DEPS_FLAGS) > > @@ -1899,7 +1899,7 @@ NOOPT_VS2019_AARCH64_DLINK_FLAGS = > /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF > *_VS2019_EBC_MAKE_FLAGS = /nologo > > *_VS2019_EBC_PP_FLAGS = /nologo /E /TC /FIAutoGen.h > > *_VS2019_EBC_CC_FLAGS = /nologo /c /WX /W3 > /FIAutoGen.h /D$(MODULE_ENTRY_POINT)=$(ARCH_ENTRY_POINT) > > -*_VS2019_EBC_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE > /FI$(MODULE_NAME)StrDefs.h > > +*_VS2019_EBC_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE > /FI$(MODULE_NAME)StrDefs.h /we4668 > > *_VS2019_EBC_SLINK_FLAGS = /lib /NOLOGO /MACHINE:EBC > > *_VS2019_EBC_DLINK_FLAGS = "C:\Program Files > (x86)\Intel\EBC\Lib\EbcLib.lib" /NOLOGO /NODEFAULTLIB /MACHINE:EBC > /OPT:REF /ENTRY:$(IMAGE_ENTRY_POINT) > /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /MAP /ALIGN:32 /DRIVER > > > > -- > 2.30.0 ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: 回复: [PATCH v1 2/2] BaseTools: Make undefined VFR macro an error (MSVC) 2021-03-04 2:12 ` 回复: " gaoliming @ 2021-03-04 2:46 ` Daniel Schaefer 2021-04-23 8:21 ` Daniel Schaefer 0 siblings, 1 reply; 9+ messages in thread From: Daniel Schaefer @ 2021-03-04 2:46 UTC (permalink / raw) To: gaoliming, devel Cc: 'Bob Feng', 'Yuwei Chen', 'Derek Lin' Hi Liming, as stated in the coverletter, "I only tested GCC5, CLANPDB and VS2015 toolchains." Clang support is documented here: https://clang.llvm.org/docs/DiagnosticsReference.html#wundef GCC support is documented here: https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html MSVC support is documented here: https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-4-c4668?view=msvc-160 I'm sorry, I'm unable to find documentation for, or even the EBC compiler itself. Can you please help me with this? Thanks, Daniel On 3/4/21 10:12 AM, gaoliming wrote: > Do you check whether EBC compiler supports this warning? > > And, do you evaluate CLANG compiler support for this warning? > > Thanks > Liming >> -----邮件原件----- >> 发件人: Daniel Schaefer <daniel.schaefer@hpe.com> >> 发送时间: 2021年3月2日 16:22 >> 收件人: devel@edk2.groups.io >> 抄送: Bob Feng <bob.c.feng@intel.com>; Liming Gao >> <gaoliming@byosoft.com.cn>; Yuwei Chen <yuwei.chen@intel.com>; Derek >> Lin <derek.lin2@hpe.com> >> 主题: [PATCH v1 2/2] BaseTools: Make undefined VFR macro an error (MSVC) >> >> VFR successfully compiles if we forget to include a header that defines >> a macro. In that case the HII option was hidden when it shouldn't be >> just because the macro was used but not defined. >> >> The behaviour is totally intended by the C/PP standard. When a macro is >> undefined it evaluates to 0. >> GCC, MSVC and Clang have warnings to catch this type of mistake. With >> this commit we enable this warning and make it a compiler error. >> >> Cc: Bob Feng <bob.c.feng@intel.com> >> Cc: Liming Gao <gaoliming@byosoft.com.cn> >> Cc: Yuwei Chen <yuwei.chen@intel.com> >> Cc: Derek Lin <derek.lin2@hpe.com> >> --- >> BaseTools/Conf/tools_def.template | 46 ++++++++++---------- >> 1 file changed, 23 insertions(+), 23 deletions(-) >> >> diff --git a/BaseTools/Conf/tools_def.template >> b/BaseTools/Conf/tools_def.template >> index 728c1d3119e4..56c7bd13f157 100755 >> --- a/BaseTools/Conf/tools_def.template >> +++ b/BaseTools/Conf/tools_def.template >> @@ -422,7 +422,7 @@ DEFINE DTC_BIN = >> ENV(DTC_PREFIX)dtc >> *_VS2008_*_SLINK_FLAGS = /NOLOGO /LTCG >> >> *_VS2008_*_APP_FLAGS = /nologo /E /TC >> >> *_VS2008_*_PP_FLAGS = /nologo /E /TC /FIAutoGen.h >> >> -*_VS2008_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h >> >> +*_VS2008_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h /we4668 >> >> *_VS2008_*_DEPS_FLAGS = DEF(MSFT_DEPS_FLAGS) >> >> *_VS2008_*_ASM16_PATH = DEF(VS2008_BIN)\ml.exe >> >> >> >> @@ -518,7 +518,7 @@ NOOPT_VS2008_X64_DLINK_FLAGS = /NOLOGO >> /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT >> *_VS2008_EBC_MAKE_FLAGS = /nologo >> >> *_VS2008_EBC_PP_FLAGS = /nologo /E /TC /FIAutoGen.h >> >> *_VS2008_EBC_CC_FLAGS = /nologo /c /WX /W3 >> /FIAutoGen.h /D$(MODULE_ENTRY_POINT)=$(ARCH_ENTRY_POINT) >> >> -*_VS2008_EBC_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h >> >> +*_VS2008_EBC_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h /we4668 >> >> *_VS2008_EBC_SLINK_FLAGS = /lib /NOLOGO /MACHINE:EBC >> >> *_VS2008_EBC_DLINK_FLAGS = "C:\Program >> Files\Intel\EBC\Lib\EbcLib.lib" /NOLOGO /NODEFAULTLIB /MACHINE:EBC >> /OPT:REF /ENTRY:$(IMAGE_ENTRY_POINT) >> /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /MAP /ALIGN:32 /DRIVER >> >> >> >> @@ -538,7 +538,7 @@ NOOPT_VS2008_X64_DLINK_FLAGS = /NOLOGO >> /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT >> *_VS2008x86_*_SLINK_FLAGS = /NOLOGO /LTCG >> >> *_VS2008x86_*_APP_FLAGS = /nologo /E /TC >> >> *_VS2008x86_*_PP_FLAGS = /nologo /E /TC /FIAutoGen.h >> >> -*_VS2008x86_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h >> >> +*_VS2008x86_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h /we4668 >> >> *_VS2008x86_*_DEPS_FLAGS = DEF(MSFT_DEPS_FLAGS) >> >> *_VS2008x86_*_ASM16_PATH = DEF(VS2008x86_BIN)\ml.exe >> >> >> >> @@ -633,7 +633,7 @@ NOOPT_VS2008x86_X64_DLINK_FLAGS = >> /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF >> *_VS2008x86_EBC_MAKE_FLAGS = /nologo >> >> *_VS2008x86_EBC_PP_FLAGS = /nologo /E /TC /FIAutoGen.h >> >> *_VS2008x86_EBC_CC_FLAGS = /nologo /c /WX /W3 >> /FIAutoGen.h /D$(MODULE_ENTRY_POINT)=$(ARCH_ENTRY_POINT) >> >> -*_VS2008x86_EBC_VFRPP_FLAGS = /nologo /E /TC >> /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h >> >> +*_VS2008x86_EBC_VFRPP_FLAGS = /nologo /E /TC >> /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h /we4668 >> >> *_VS2008x86_EBC_SLINK_FLAGS = /lib /NOLOGO >> /MACHINE:EBC >> >> *_VS2008x86_EBC_DLINK_FLAGS = "C:\Program Files >> (x86)\Intel\EBC\Lib\EbcLib.lib" /NOLOGO /NODEFAULTLIB /MACHINE:EBC >> /OPT:REF /ENTRY:$(IMAGE_ENTRY_POINT) >> /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /MAP /ALIGN:32 /DRIVER >> >> >> >> @@ -656,7 +656,7 @@ NOOPT_VS2008x86_X64_DLINK_FLAGS = >> /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF >> *_VS2010_*_SLINK_FLAGS = /NOLOGO /LTCG >> >> *_VS2010_*_APP_FLAGS = /nologo /E /TC >> >> *_VS2010_*_PP_FLAGS = /nologo /E /TC /FIAutoGen.h >> >> -*_VS2010_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h >> >> +*_VS2010_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h /we4668 >> >> *_VS2010_*_DEPS_FLAGS = DEF(MSFT_DEPS_FLAGS) >> >> *_VS2010_*_ASM16_PATH = DEF(VS2010_BIN)\ml.exe >> >> >> >> @@ -752,7 +752,7 @@ NOOPT_VS2010_X64_DLINK_FLAGS = /NOLOGO >> /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT >> *_VS2010_EBC_MAKE_FLAGS = /nologo >> >> *_VS2010_EBC_PP_FLAGS = /nologo /E /TC /FIAutoGen.h >> >> *_VS2010_EBC_CC_FLAGS = /nologo /c /WX /W3 >> /FIAutoGen.h /D$(MODULE_ENTRY_POINT)=$(ARCH_ENTRY_POINT) >> >> -*_VS2010_EBC_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h >> >> +*_VS2010_EBC_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h /we4668 >> >> *_VS2010_EBC_SLINK_FLAGS = /lib /NOLOGO /MACHINE:EBC >> >> *_VS2010_EBC_DLINK_FLAGS = "C:\Program >> Files\Intel\EBC\Lib\EbcLib.lib" /NOLOGO /NODEFAULTLIB /MACHINE:EBC >> /OPT:REF /ENTRY:$(IMAGE_ENTRY_POINT) >> /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /MAP /ALIGN:32 /DRIVER >> >> >> >> @@ -772,7 +772,7 @@ NOOPT_VS2010_X64_DLINK_FLAGS = /NOLOGO >> /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT >> *_VS2010x86_*_SLINK_FLAGS = /NOLOGO /LTCG >> >> *_VS2010x86_*_APP_FLAGS = /nologo /E /TC >> >> *_VS2010x86_*_PP_FLAGS = /nologo /E /TC /FIAutoGen.h >> >> -*_VS2010x86_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h >> >> +*_VS2010x86_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h /we4668 >> >> *_VS2010x86_*_DEPS_FLAGS = DEF(MSFT_DEPS_FLAGS) >> >> *_VS2010x86_*_ASM16_PATH = DEF(VS2010x86_BIN)\ml.exe >> >> >> >> @@ -868,7 +868,7 @@ NOOPT_VS2010x86_X64_DLINK_FLAGS = >> /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF >> *_VS2010x86_EBC_MAKE_FLAGS = /nologo >> >> *_VS2010x86_EBC_PP_FLAGS = /nologo /E /TC /FIAutoGen.h >> >> *_VS2010x86_EBC_CC_FLAGS = /nologo /c /WX /W3 >> /FIAutoGen.h /D$(MODULE_ENTRY_POINT)=$(ARCH_ENTRY_POINT) >> >> -*_VS2010x86_EBC_VFRPP_FLAGS = /nologo /E /TC >> /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h >> >> +*_VS2010x86_EBC_VFRPP_FLAGS = /nologo /E /TC >> /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h /we4668 >> >> *_VS2010x86_EBC_SLINK_FLAGS = /lib /NOLOGO >> /MACHINE:EBC >> >> *_VS2010x86_EBC_DLINK_FLAGS = "C:\Program Files >> (x86)\Intel\EBC\Lib\EbcLib.lib" /NOLOGO /NODEFAULTLIB /MACHINE:EBC >> /OPT:REF /ENTRY:$(IMAGE_ENTRY_POINT) >> /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /MAP /ALIGN:32 /DRIVER >> >> >> >> @@ -890,7 +890,7 @@ NOOPT_VS2010x86_X64_DLINK_FLAGS = >> /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF >> *_VS2012_*_SLINK_FLAGS = /NOLOGO /LTCG >> >> *_VS2012_*_APP_FLAGS = /nologo /E /TC >> >> *_VS2012_*_PP_FLAGS = /nologo /E /TC /FIAutoGen.h >> >> -*_VS2012_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h >> >> +*_VS2012_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h /we4668 >> >> *_VS2012_*_DEPS_FLAGS = DEF(MSFT_DEPS_FLAGS) >> >> *_VS2012_*_ASM16_PATH = DEF(VS2012_BIN)\ml.exe >> >> >> >> @@ -986,7 +986,7 @@ NOOPT_VS2012_X64_DLINK_FLAGS = /NOLOGO >> /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT >> *_VS2012_EBC_MAKE_FLAGS = /nologo >> >> *_VS2012_EBC_PP_FLAGS = /nologo /E /TC /FIAutoGen.h >> >> *_VS2012_EBC_CC_FLAGS = /nologo /c /WX /W3 >> /FIAutoGen.h /D$(MODULE_ENTRY_POINT)=$(ARCH_ENTRY_POINT) >> >> -*_VS2012_EBC_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h >> >> +*_VS2012_EBC_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h /we4668 >> >> *_VS2012_EBC_SLINK_FLAGS = /lib /NOLOGO /MACHINE:EBC >> >> *_VS2012_EBC_DLINK_FLAGS = "C:\Program >> Files\Intel\EBC\Lib\EbcLib.lib" /NOLOGO /NODEFAULTLIB /MACHINE:EBC >> /OPT:REF /ENTRY:$(IMAGE_ENTRY_POINT) >> /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /MAP /ALIGN:32 /DRIVER >> >> >> >> @@ -1006,7 +1006,7 @@ NOOPT_VS2012_X64_DLINK_FLAGS = /NOLOGO >> /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT >> *_VS2012x86_*_SLINK_FLAGS = /NOLOGO /LTCG >> >> *_VS2012x86_*_APP_FLAGS = /nologo /E /TC >> >> *_VS2012x86_*_PP_FLAGS = /nologo /E /TC /FIAutoGen.h >> >> -*_VS2012x86_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h >> >> +*_VS2012x86_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h /we4668 >> >> *_VS2012x86_*_DEPS_FLAGS = DEF(MSFT_DEPS_FLAGS) >> >> *_VS2012x86_*_ASM16_PATH = DEF(VS2012x86_BIN)\ml.exe >> >> >> >> @@ -1102,7 +1102,7 @@ NOOPT_VS2012x86_X64_DLINK_FLAGS = >> /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF >> *_VS2012x86_EBC_MAKE_FLAGS = /nologo >> >> *_VS2012x86_EBC_PP_FLAGS = /nologo /E /TC /FIAutoGen.h >> >> *_VS2012x86_EBC_CC_FLAGS = /nologo /c /WX /W3 >> /FIAutoGen.h /D$(MODULE_ENTRY_POINT)=$(ARCH_ENTRY_POINT) >> >> -*_VS2012x86_EBC_VFRPP_FLAGS = /nologo /E /TC >> /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h >> >> +*_VS2012x86_EBC_VFRPP_FLAGS = /nologo /E /TC >> /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h /we4668 >> >> *_VS2012x86_EBC_SLINK_FLAGS = /lib /NOLOGO >> /MACHINE:EBC >> >> *_VS2012x86_EBC_DLINK_FLAGS = "C:\Program Files >> (x86)\Intel\EBC\Lib\EbcLib.lib" /NOLOGO /NODEFAULTLIB /MACHINE:EBC >> /OPT:REF /ENTRY:$(IMAGE_ENTRY_POINT) >> /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /MAP /ALIGN:32 /DRIVER >> >> >> >> @@ -1124,7 +1124,7 @@ NOOPT_VS2012x86_X64_DLINK_FLAGS = >> /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF >> *_VS2013_*_SLINK_FLAGS = /NOLOGO /LTCG >> >> *_VS2013_*_APP_FLAGS = /nologo /E /TC >> >> *_VS2013_*_PP_FLAGS = /nologo /E /TC /FIAutoGen.h >> >> -*_VS2013_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h >> >> +*_VS2013_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h /we4668 >> >> *_VS2013_*_DEPS_FLAGS = DEF(MSFT_DEPS_FLAGS) >> >> *_VS2013_*_ASM16_PATH = DEF(VS2013_BIN)\ml.exe >> >> >> >> @@ -1220,7 +1220,7 @@ NOOPT_VS2013_X64_DLINK_FLAGS = /NOLOGO >> /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT >> *_VS2013_EBC_MAKE_FLAGS = /nologo >> >> *_VS2013_EBC_PP_FLAGS = /nologo /E /TC /FIAutoGen.h >> >> *_VS2013_EBC_CC_FLAGS = /nologo /c /WX /W3 >> /FIAutoGen.h /D$(MODULE_ENTRY_POINT)=$(ARCH_ENTRY_POINT) >> >> -*_VS2013_EBC_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h >> >> +*_VS2013_EBC_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h /we4668 >> >> *_VS2013_EBC_SLINK_FLAGS = /lib /NOLOGO /MACHINE:EBC >> >> *_VS2013_EBC_DLINK_FLAGS = "C:\Program >> Files\Intel\EBC\Lib\EbcLib.lib" /NOLOGO /NODEFAULTLIB /MACHINE:EBC >> /OPT:REF /ENTRY:$(IMAGE_ENTRY_POINT) >> /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /MAP /ALIGN:32 /DRIVER >> >> >> >> @@ -1240,7 +1240,7 @@ NOOPT_VS2013_X64_DLINK_FLAGS = /NOLOGO >> /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT >> *_VS2013x86_*_SLINK_FLAGS = /NOLOGO /LTCG >> >> *_VS2013x86_*_APP_FLAGS = /nologo /E /TC >> >> *_VS2013x86_*_PP_FLAGS = /nologo /E /TC /FIAutoGen.h >> >> -*_VS2013x86_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h >> >> +*_VS2013x86_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h /we4668 >> >> *_VS2013x86_*_DEPS_FLAGS = DEF(MSFT_DEPS_FLAGS) >> >> *_VS2013x86_*_ASM16_PATH = DEF(VS2013x86_BIN)\ml.exe >> >> >> >> @@ -1336,7 +1336,7 @@ NOOPT_VS2013x86_X64_DLINK_FLAGS = >> /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF >> *_VS2013x86_EBC_MAKE_FLAGS = /nologo >> >> *_VS2013x86_EBC_PP_FLAGS = /nologo /E /TC /FIAutoGen.h >> >> *_VS2013x86_EBC_CC_FLAGS = /nologo /c /WX /W3 >> /FIAutoGen.h /D$(MODULE_ENTRY_POINT)=$(ARCH_ENTRY_POINT) >> >> -*_VS2013x86_EBC_VFRPP_FLAGS = /nologo /E /TC >> /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h >> >> +*_VS2013x86_EBC_VFRPP_FLAGS = /nologo /E /TC >> /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h /we4668 >> >> *_VS2013x86_EBC_SLINK_FLAGS = /lib /NOLOGO >> /MACHINE:EBC >> >> *_VS2013x86_EBC_DLINK_FLAGS = "C:\Program Files >> (x86)\Intel\EBC\Lib\EbcLib.lib" /NOLOGO /NODEFAULTLIB /MACHINE:EBC >> /OPT:REF /ENTRY:$(IMAGE_ENTRY_POINT) >> /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /MAP /ALIGN:32 /DRIVER >> >> >> >> @@ -1358,7 +1358,7 @@ NOOPT_VS2013x86_X64_DLINK_FLAGS = >> /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF >> *_VS2015_*_SLINK_FLAGS = /NOLOGO /LTCG >> >> *_VS2015_*_APP_FLAGS = /nologo /E /TC >> >> *_VS2015_*_PP_FLAGS = /nologo /E /TC /FIAutoGen.h >> >> -*_VS2015_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h >> >> +*_VS2015_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h /we4668 >> >> *_VS2015_*_DLINK2_FLAGS = >> >> *_VS2015_*_DEPS_FLAGS = DEF(MSFT_DEPS_FLAGS) >> >> *_VS2015_*_ASM16_PATH = DEF(VS2015_BIN)\ml.exe >> >> @@ -1455,7 +1455,7 @@ NOOPT_VS2015_X64_DLINK_FLAGS = /NOLOGO >> /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT >> *_VS2015_EBC_MAKE_FLAGS = /nologo >> >> *_VS2015_EBC_PP_FLAGS = /nologo /E /TC /FIAutoGen.h >> >> *_VS2015_EBC_CC_FLAGS = /nologo /c /WX /W3 >> /FIAutoGen.h /D$(MODULE_ENTRY_POINT)=$(ARCH_ENTRY_POINT) >> >> -*_VS2015_EBC_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h >> >> +*_VS2015_EBC_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h /we4668 >> >> *_VS2015_EBC_SLINK_FLAGS = /lib /NOLOGO /MACHINE:EBC >> >> *_VS2015_EBC_DLINK_FLAGS = "C:\Program >> Files\Intel\EBC\Lib\EbcLib.lib" /NOLOGO /NODEFAULTLIB /MACHINE:EBC >> /OPT:REF /ENTRY:$(IMAGE_ENTRY_POINT) >> /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /MAP /ALIGN:32 /DRIVER >> >> >> >> @@ -1475,7 +1475,7 @@ NOOPT_VS2015_X64_DLINK_FLAGS = /NOLOGO >> /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT >> *_VS2015x86_*_SLINK_FLAGS = /NOLOGO /LTCG >> >> *_VS2015x86_*_APP_FLAGS = /nologo /E /TC >> >> *_VS2015x86_*_PP_FLAGS = /nologo /E /TC /FIAutoGen.h >> >> -*_VS2015x86_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h >> >> +*_VS2015x86_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h /we4668 >> >> *_VS2015x86_*_DLINK2_FLAGS = >> >> *_VS2015x86_*_DEPS_FLAGS = DEF(MSFT_DEPS_FLAGS) >> >> *_VS2015x86_*_ASM16_PATH = DEF(VS2015x86_BIN)\ml.exe >> >> @@ -1593,7 +1593,7 @@ NOOPT_VS2015x86_X64_DLINK_FLAGS = >> /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF >> *_VS2017_*_SLINK_FLAGS = /NOLOGO /LTCG >> >> *_VS2017_*_APP_FLAGS = /nologo /E /TC >> >> *_VS2017_*_PP_FLAGS = /nologo /E /TC /FIAutoGen.h >> >> -*_VS2017_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h >> >> +*_VS2017_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h /we4668 >> >> *_VS2017_*_DLINK2_FLAGS = /WHOLEARCHIVE >> >> *_VS2017_*_ASM16_PATH = DEF(VS2017_BIN_IA32)\ml.exe >> >> *_VS2017_*_DEPS_FLAGS = DEF(MSFT_DEPS_FLAGS) >> >> @@ -1736,7 +1736,7 @@ NOOPT_VS2017_AARCH64_DLINK_FLAGS = >> /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF >> *_VS2017_EBC_MAKE_FLAGS = /nologo >> >> *_VS2017_EBC_PP_FLAGS = /nologo /E /TC /FIAutoGen.h >> >> *_VS2017_EBC_CC_FLAGS = /nologo /c /WX /W3 >> /FIAutoGen.h /D$(MODULE_ENTRY_POINT)=$(ARCH_ENTRY_POINT) >> >> -*_VS2017_EBC_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h >> >> +*_VS2017_EBC_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h /we4668 >> >> *_VS2017_EBC_SLINK_FLAGS = /lib /NOLOGO /MACHINE:EBC >> >> *_VS2017_EBC_DLINK_FLAGS = "C:\Program Files >> (x86)\Intel\EBC\Lib\EbcLib.lib" /NOLOGO /NODEFAULTLIB /MACHINE:EBC >> /OPT:REF /ENTRY:$(IMAGE_ENTRY_POINT) >> /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /MAP /ALIGN:32 /DRIVER >> >> >> >> @@ -1756,7 +1756,7 @@ NOOPT_VS2017_AARCH64_DLINK_FLAGS = >> /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF >> *_VS2019_*_SLINK_FLAGS = /NOLOGO /LTCG >> >> *_VS2019_*_APP_FLAGS = /nologo /E /TC >> >> *_VS2019_*_PP_FLAGS = /nologo /E /TC /FIAutoGen.h >> >> -*_VS2019_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h >> >> +*_VS2019_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h /we4668 >> >> *_VS2019_*_DLINK2_FLAGS = /WHOLEARCHIVE >> >> *_VS2019_*_ASM16_PATH = DEF(VS2019_BIN_IA32)\ml.exe >> >> *_VS2019_*_DEPS_FLAGS = DEF(MSFT_DEPS_FLAGS) >> >> @@ -1899,7 +1899,7 @@ NOOPT_VS2019_AARCH64_DLINK_FLAGS = >> /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF >> *_VS2019_EBC_MAKE_FLAGS = /nologo >> >> *_VS2019_EBC_PP_FLAGS = /nologo /E /TC /FIAutoGen.h >> >> *_VS2019_EBC_CC_FLAGS = /nologo /c /WX /W3 >> /FIAutoGen.h /D$(MODULE_ENTRY_POINT)=$(ARCH_ENTRY_POINT) >> >> -*_VS2019_EBC_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h >> >> +*_VS2019_EBC_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h /we4668 >> >> *_VS2019_EBC_SLINK_FLAGS = /lib /NOLOGO /MACHINE:EBC >> >> *_VS2019_EBC_DLINK_FLAGS = "C:\Program Files >> (x86)\Intel\EBC\Lib\EbcLib.lib" /NOLOGO /NODEFAULTLIB /MACHINE:EBC >> /OPT:REF /ENTRY:$(IMAGE_ENTRY_POINT) >> /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /MAP /ALIGN:32 /DRIVER >> >> >> >> -- >> 2.30.0 > > > ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: 回复: [PATCH v1 2/2] BaseTools: Make undefined VFR macro an error (MSVC) 2021-03-04 2:46 ` Daniel Schaefer @ 2021-04-23 8:21 ` Daniel Schaefer 0 siblings, 0 replies; 9+ messages in thread From: Daniel Schaefer @ 2021-04-23 8:21 UTC (permalink / raw) To: gaoliming, devel@edk2.groups.io Cc: 'Bob Feng', 'Yuwei Chen', Lin, Derek (HPS SW) [-- Attachment #1: Type: text/plain, Size: 20408 bytes --] Ok, I'll send a new series without EBC. Can't find anything about it and we don't use it. ________________________________ From: Schaefer, Daniel <daniel.schaefer@hpe.com> Sent: Thursday, March 4, 2021 10:46 To: gaoliming <gaoliming@byosoft.com.cn>; devel@edk2.groups.io <devel@edk2.groups.io> Cc: 'Bob Feng' <bob.c.feng@intel.com>; 'Yuwei Chen' <yuwei.chen@intel.com>; Lin, Derek (HPS SW) <derek.lin2@hpe.com> Subject: Re: 回复: [PATCH v1 2/2] BaseTools: Make undefined VFR macro an error (MSVC) Hi Liming, as stated in the coverletter, "I only tested GCC5, CLANPDB and VS2015 toolchains." Clang support is documented here: https://clang.llvm.org/docs/DiagnosticsReference.html#wundef GCC support is documented here: https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html MSVC support is documented here: https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-4-c4668?view=msvc-160 I'm sorry, I'm unable to find documentation for, or even the EBC compiler itself. Can you please help me with this? Thanks, Daniel On 3/4/21 10:12 AM, gaoliming wrote: > Do you check whether EBC compiler supports this warning? > > And, do you evaluate CLANG compiler support for this warning? > > Thanks > Liming >> -----邮件原件----- >> 发件人: Daniel Schaefer <daniel.schaefer@hpe.com> >> 发送时间: 2021年3月2日 16:22 >> 收件人: devel@edk2.groups.io >> 抄送: Bob Feng <bob.c.feng@intel.com>; Liming Gao >> <gaoliming@byosoft.com.cn>; Yuwei Chen <yuwei.chen@intel.com>; Derek >> Lin <derek.lin2@hpe.com> >> 主题: [PATCH v1 2/2] BaseTools: Make undefined VFR macro an error (MSVC) >> >> VFR successfully compiles if we forget to include a header that defines >> a macro. In that case the HII option was hidden when it shouldn't be >> just because the macro was used but not defined. >> >> The behaviour is totally intended by the C/PP standard. When a macro is >> undefined it evaluates to 0. >> GCC, MSVC and Clang have warnings to catch this type of mistake. With >> this commit we enable this warning and make it a compiler error. >> >> Cc: Bob Feng <bob.c.feng@intel.com> >> Cc: Liming Gao <gaoliming@byosoft.com.cn> >> Cc: Yuwei Chen <yuwei.chen@intel.com> >> Cc: Derek Lin <derek.lin2@hpe.com> >> --- >> BaseTools/Conf/tools_def.template | 46 ++++++++++---------- >> 1 file changed, 23 insertions(+), 23 deletions(-) >> >> diff --git a/BaseTools/Conf/tools_def.template >> b/BaseTools/Conf/tools_def.template >> index 728c1d3119e4..56c7bd13f157 100755 >> --- a/BaseTools/Conf/tools_def.template >> +++ b/BaseTools/Conf/tools_def.template >> @@ -422,7 +422,7 @@ DEFINE DTC_BIN = >> ENV(DTC_PREFIX)dtc >> *_VS2008_*_SLINK_FLAGS = /NOLOGO /LTCG >> >> *_VS2008_*_APP_FLAGS = /nologo /E /TC >> >> *_VS2008_*_PP_FLAGS = /nologo /E /TC /FIAutoGen.h >> >> -*_VS2008_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h >> >> +*_VS2008_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h /we4668 >> >> *_VS2008_*_DEPS_FLAGS = DEF(MSFT_DEPS_FLAGS) >> >> *_VS2008_*_ASM16_PATH = DEF(VS2008_BIN)\ml.exe >> >> >> >> @@ -518,7 +518,7 @@ NOOPT_VS2008_X64_DLINK_FLAGS = /NOLOGO >> /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT >> *_VS2008_EBC_MAKE_FLAGS = /nologo >> >> *_VS2008_EBC_PP_FLAGS = /nologo /E /TC /FIAutoGen.h >> >> *_VS2008_EBC_CC_FLAGS = /nologo /c /WX /W3 >> /FIAutoGen.h /D$(MODULE_ENTRY_POINT)=$(ARCH_ENTRY_POINT) >> >> -*_VS2008_EBC_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h >> >> +*_VS2008_EBC_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h /we4668 >> >> *_VS2008_EBC_SLINK_FLAGS = /lib /NOLOGO /MACHINE:EBC >> >> *_VS2008_EBC_DLINK_FLAGS = "C:\Program >> Files\Intel\EBC\Lib\EbcLib.lib" /NOLOGO /NODEFAULTLIB /MACHINE:EBC >> /OPT:REF /ENTRY:$(IMAGE_ENTRY_POINT) >> /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /MAP /ALIGN:32 /DRIVER >> >> >> >> @@ -538,7 +538,7 @@ NOOPT_VS2008_X64_DLINK_FLAGS = /NOLOGO >> /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT >> *_VS2008x86_*_SLINK_FLAGS = /NOLOGO /LTCG >> >> *_VS2008x86_*_APP_FLAGS = /nologo /E /TC >> >> *_VS2008x86_*_PP_FLAGS = /nologo /E /TC /FIAutoGen.h >> >> -*_VS2008x86_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h >> >> +*_VS2008x86_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h /we4668 >> >> *_VS2008x86_*_DEPS_FLAGS = DEF(MSFT_DEPS_FLAGS) >> >> *_VS2008x86_*_ASM16_PATH = DEF(VS2008x86_BIN)\ml.exe >> >> >> >> @@ -633,7 +633,7 @@ NOOPT_VS2008x86_X64_DLINK_FLAGS = >> /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF >> *_VS2008x86_EBC_MAKE_FLAGS = /nologo >> >> *_VS2008x86_EBC_PP_FLAGS = /nologo /E /TC /FIAutoGen.h >> >> *_VS2008x86_EBC_CC_FLAGS = /nologo /c /WX /W3 >> /FIAutoGen.h /D$(MODULE_ENTRY_POINT)=$(ARCH_ENTRY_POINT) >> >> -*_VS2008x86_EBC_VFRPP_FLAGS = /nologo /E /TC >> /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h >> >> +*_VS2008x86_EBC_VFRPP_FLAGS = /nologo /E /TC >> /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h /we4668 >> >> *_VS2008x86_EBC_SLINK_FLAGS = /lib /NOLOGO >> /MACHINE:EBC >> >> *_VS2008x86_EBC_DLINK_FLAGS = "C:\Program Files >> (x86)\Intel\EBC\Lib\EbcLib.lib" /NOLOGO /NODEFAULTLIB /MACHINE:EBC >> /OPT:REF /ENTRY:$(IMAGE_ENTRY_POINT) >> /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /MAP /ALIGN:32 /DRIVER >> >> >> >> @@ -656,7 +656,7 @@ NOOPT_VS2008x86_X64_DLINK_FLAGS = >> /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF >> *_VS2010_*_SLINK_FLAGS = /NOLOGO /LTCG >> >> *_VS2010_*_APP_FLAGS = /nologo /E /TC >> >> *_VS2010_*_PP_FLAGS = /nologo /E /TC /FIAutoGen.h >> >> -*_VS2010_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h >> >> +*_VS2010_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h /we4668 >> >> *_VS2010_*_DEPS_FLAGS = DEF(MSFT_DEPS_FLAGS) >> >> *_VS2010_*_ASM16_PATH = DEF(VS2010_BIN)\ml.exe >> >> >> >> @@ -752,7 +752,7 @@ NOOPT_VS2010_X64_DLINK_FLAGS = /NOLOGO >> /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT >> *_VS2010_EBC_MAKE_FLAGS = /nologo >> >> *_VS2010_EBC_PP_FLAGS = /nologo /E /TC /FIAutoGen.h >> >> *_VS2010_EBC_CC_FLAGS = /nologo /c /WX /W3 >> /FIAutoGen.h /D$(MODULE_ENTRY_POINT)=$(ARCH_ENTRY_POINT) >> >> -*_VS2010_EBC_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h >> >> +*_VS2010_EBC_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h /we4668 >> >> *_VS2010_EBC_SLINK_FLAGS = /lib /NOLOGO /MACHINE:EBC >> >> *_VS2010_EBC_DLINK_FLAGS = "C:\Program >> Files\Intel\EBC\Lib\EbcLib.lib" /NOLOGO /NODEFAULTLIB /MACHINE:EBC >> /OPT:REF /ENTRY:$(IMAGE_ENTRY_POINT) >> /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /MAP /ALIGN:32 /DRIVER >> >> >> >> @@ -772,7 +772,7 @@ NOOPT_VS2010_X64_DLINK_FLAGS = /NOLOGO >> /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT >> *_VS2010x86_*_SLINK_FLAGS = /NOLOGO /LTCG >> >> *_VS2010x86_*_APP_FLAGS = /nologo /E /TC >> >> *_VS2010x86_*_PP_FLAGS = /nologo /E /TC /FIAutoGen.h >> >> -*_VS2010x86_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h >> >> +*_VS2010x86_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h /we4668 >> >> *_VS2010x86_*_DEPS_FLAGS = DEF(MSFT_DEPS_FLAGS) >> >> *_VS2010x86_*_ASM16_PATH = DEF(VS2010x86_BIN)\ml.exe >> >> >> >> @@ -868,7 +868,7 @@ NOOPT_VS2010x86_X64_DLINK_FLAGS = >> /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF >> *_VS2010x86_EBC_MAKE_FLAGS = /nologo >> >> *_VS2010x86_EBC_PP_FLAGS = /nologo /E /TC /FIAutoGen.h >> >> *_VS2010x86_EBC_CC_FLAGS = /nologo /c /WX /W3 >> /FIAutoGen.h /D$(MODULE_ENTRY_POINT)=$(ARCH_ENTRY_POINT) >> >> -*_VS2010x86_EBC_VFRPP_FLAGS = /nologo /E /TC >> /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h >> >> +*_VS2010x86_EBC_VFRPP_FLAGS = /nologo /E /TC >> /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h /we4668 >> >> *_VS2010x86_EBC_SLINK_FLAGS = /lib /NOLOGO >> /MACHINE:EBC >> >> *_VS2010x86_EBC_DLINK_FLAGS = "C:\Program Files >> (x86)\Intel\EBC\Lib\EbcLib.lib" /NOLOGO /NODEFAULTLIB /MACHINE:EBC >> /OPT:REF /ENTRY:$(IMAGE_ENTRY_POINT) >> /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /MAP /ALIGN:32 /DRIVER >> >> >> >> @@ -890,7 +890,7 @@ NOOPT_VS2010x86_X64_DLINK_FLAGS = >> /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF >> *_VS2012_*_SLINK_FLAGS = /NOLOGO /LTCG >> >> *_VS2012_*_APP_FLAGS = /nologo /E /TC >> >> *_VS2012_*_PP_FLAGS = /nologo /E /TC /FIAutoGen.h >> >> -*_VS2012_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h >> >> +*_VS2012_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h /we4668 >> >> *_VS2012_*_DEPS_FLAGS = DEF(MSFT_DEPS_FLAGS) >> >> *_VS2012_*_ASM16_PATH = DEF(VS2012_BIN)\ml.exe >> >> >> >> @@ -986,7 +986,7 @@ NOOPT_VS2012_X64_DLINK_FLAGS = /NOLOGO >> /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT >> *_VS2012_EBC_MAKE_FLAGS = /nologo >> >> *_VS2012_EBC_PP_FLAGS = /nologo /E /TC /FIAutoGen.h >> >> *_VS2012_EBC_CC_FLAGS = /nologo /c /WX /W3 >> /FIAutoGen.h /D$(MODULE_ENTRY_POINT)=$(ARCH_ENTRY_POINT) >> >> -*_VS2012_EBC_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h >> >> +*_VS2012_EBC_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h /we4668 >> >> *_VS2012_EBC_SLINK_FLAGS = /lib /NOLOGO /MACHINE:EBC >> >> *_VS2012_EBC_DLINK_FLAGS = "C:\Program >> Files\Intel\EBC\Lib\EbcLib.lib" /NOLOGO /NODEFAULTLIB /MACHINE:EBC >> /OPT:REF /ENTRY:$(IMAGE_ENTRY_POINT) >> /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /MAP /ALIGN:32 /DRIVER >> >> >> >> @@ -1006,7 +1006,7 @@ NOOPT_VS2012_X64_DLINK_FLAGS = /NOLOGO >> /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT >> *_VS2012x86_*_SLINK_FLAGS = /NOLOGO /LTCG >> >> *_VS2012x86_*_APP_FLAGS = /nologo /E /TC >> >> *_VS2012x86_*_PP_FLAGS = /nologo /E /TC /FIAutoGen.h >> >> -*_VS2012x86_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h >> >> +*_VS2012x86_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h /we4668 >> >> *_VS2012x86_*_DEPS_FLAGS = DEF(MSFT_DEPS_FLAGS) >> >> *_VS2012x86_*_ASM16_PATH = DEF(VS2012x86_BIN)\ml.exe >> >> >> >> @@ -1102,7 +1102,7 @@ NOOPT_VS2012x86_X64_DLINK_FLAGS = >> /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF >> *_VS2012x86_EBC_MAKE_FLAGS = /nologo >> >> *_VS2012x86_EBC_PP_FLAGS = /nologo /E /TC /FIAutoGen.h >> >> *_VS2012x86_EBC_CC_FLAGS = /nologo /c /WX /W3 >> /FIAutoGen.h /D$(MODULE_ENTRY_POINT)=$(ARCH_ENTRY_POINT) >> >> -*_VS2012x86_EBC_VFRPP_FLAGS = /nologo /E /TC >> /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h >> >> +*_VS2012x86_EBC_VFRPP_FLAGS = /nologo /E /TC >> /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h /we4668 >> >> *_VS2012x86_EBC_SLINK_FLAGS = /lib /NOLOGO >> /MACHINE:EBC >> >> *_VS2012x86_EBC_DLINK_FLAGS = "C:\Program Files >> (x86)\Intel\EBC\Lib\EbcLib.lib" /NOLOGO /NODEFAULTLIB /MACHINE:EBC >> /OPT:REF /ENTRY:$(IMAGE_ENTRY_POINT) >> /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /MAP /ALIGN:32 /DRIVER >> >> >> >> @@ -1124,7 +1124,7 @@ NOOPT_VS2012x86_X64_DLINK_FLAGS = >> /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF >> *_VS2013_*_SLINK_FLAGS = /NOLOGO /LTCG >> >> *_VS2013_*_APP_FLAGS = /nologo /E /TC >> >> *_VS2013_*_PP_FLAGS = /nologo /E /TC /FIAutoGen.h >> >> -*_VS2013_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h >> >> +*_VS2013_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h /we4668 >> >> *_VS2013_*_DEPS_FLAGS = DEF(MSFT_DEPS_FLAGS) >> >> *_VS2013_*_ASM16_PATH = DEF(VS2013_BIN)\ml.exe >> >> >> >> @@ -1220,7 +1220,7 @@ NOOPT_VS2013_X64_DLINK_FLAGS = /NOLOGO >> /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT >> *_VS2013_EBC_MAKE_FLAGS = /nologo >> >> *_VS2013_EBC_PP_FLAGS = /nologo /E /TC /FIAutoGen.h >> >> *_VS2013_EBC_CC_FLAGS = /nologo /c /WX /W3 >> /FIAutoGen.h /D$(MODULE_ENTRY_POINT)=$(ARCH_ENTRY_POINT) >> >> -*_VS2013_EBC_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h >> >> +*_VS2013_EBC_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h /we4668 >> >> *_VS2013_EBC_SLINK_FLAGS = /lib /NOLOGO /MACHINE:EBC >> >> *_VS2013_EBC_DLINK_FLAGS = "C:\Program >> Files\Intel\EBC\Lib\EbcLib.lib" /NOLOGO /NODEFAULTLIB /MACHINE:EBC >> /OPT:REF /ENTRY:$(IMAGE_ENTRY_POINT) >> /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /MAP /ALIGN:32 /DRIVER >> >> >> >> @@ -1240,7 +1240,7 @@ NOOPT_VS2013_X64_DLINK_FLAGS = /NOLOGO >> /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT >> *_VS2013x86_*_SLINK_FLAGS = /NOLOGO /LTCG >> >> *_VS2013x86_*_APP_FLAGS = /nologo /E /TC >> >> *_VS2013x86_*_PP_FLAGS = /nologo /E /TC /FIAutoGen.h >> >> -*_VS2013x86_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h >> >> +*_VS2013x86_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h /we4668 >> >> *_VS2013x86_*_DEPS_FLAGS = DEF(MSFT_DEPS_FLAGS) >> >> *_VS2013x86_*_ASM16_PATH = DEF(VS2013x86_BIN)\ml.exe >> >> >> >> @@ -1336,7 +1336,7 @@ NOOPT_VS2013x86_X64_DLINK_FLAGS = >> /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF >> *_VS2013x86_EBC_MAKE_FLAGS = /nologo >> >> *_VS2013x86_EBC_PP_FLAGS = /nologo /E /TC /FIAutoGen.h >> >> *_VS2013x86_EBC_CC_FLAGS = /nologo /c /WX /W3 >> /FIAutoGen.h /D$(MODULE_ENTRY_POINT)=$(ARCH_ENTRY_POINT) >> >> -*_VS2013x86_EBC_VFRPP_FLAGS = /nologo /E /TC >> /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h >> >> +*_VS2013x86_EBC_VFRPP_FLAGS = /nologo /E /TC >> /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h /we4668 >> >> *_VS2013x86_EBC_SLINK_FLAGS = /lib /NOLOGO >> /MACHINE:EBC >> >> *_VS2013x86_EBC_DLINK_FLAGS = "C:\Program Files >> (x86)\Intel\EBC\Lib\EbcLib.lib" /NOLOGO /NODEFAULTLIB /MACHINE:EBC >> /OPT:REF /ENTRY:$(IMAGE_ENTRY_POINT) >> /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /MAP /ALIGN:32 /DRIVER >> >> >> >> @@ -1358,7 +1358,7 @@ NOOPT_VS2013x86_X64_DLINK_FLAGS = >> /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF >> *_VS2015_*_SLINK_FLAGS = /NOLOGO /LTCG >> >> *_VS2015_*_APP_FLAGS = /nologo /E /TC >> >> *_VS2015_*_PP_FLAGS = /nologo /E /TC /FIAutoGen.h >> >> -*_VS2015_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h >> >> +*_VS2015_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h /we4668 >> >> *_VS2015_*_DLINK2_FLAGS = >> >> *_VS2015_*_DEPS_FLAGS = DEF(MSFT_DEPS_FLAGS) >> >> *_VS2015_*_ASM16_PATH = DEF(VS2015_BIN)\ml.exe >> >> @@ -1455,7 +1455,7 @@ NOOPT_VS2015_X64_DLINK_FLAGS = /NOLOGO >> /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT >> *_VS2015_EBC_MAKE_FLAGS = /nologo >> >> *_VS2015_EBC_PP_FLAGS = /nologo /E /TC /FIAutoGen.h >> >> *_VS2015_EBC_CC_FLAGS = /nologo /c /WX /W3 >> /FIAutoGen.h /D$(MODULE_ENTRY_POINT)=$(ARCH_ENTRY_POINT) >> >> -*_VS2015_EBC_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h >> >> +*_VS2015_EBC_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h /we4668 >> >> *_VS2015_EBC_SLINK_FLAGS = /lib /NOLOGO /MACHINE:EBC >> >> *_VS2015_EBC_DLINK_FLAGS = "C:\Program >> Files\Intel\EBC\Lib\EbcLib.lib" /NOLOGO /NODEFAULTLIB /MACHINE:EBC >> /OPT:REF /ENTRY:$(IMAGE_ENTRY_POINT) >> /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /MAP /ALIGN:32 /DRIVER >> >> >> >> @@ -1475,7 +1475,7 @@ NOOPT_VS2015_X64_DLINK_FLAGS = /NOLOGO >> /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT >> *_VS2015x86_*_SLINK_FLAGS = /NOLOGO /LTCG >> >> *_VS2015x86_*_APP_FLAGS = /nologo /E /TC >> >> *_VS2015x86_*_PP_FLAGS = /nologo /E /TC /FIAutoGen.h >> >> -*_VS2015x86_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h >> >> +*_VS2015x86_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h /we4668 >> >> *_VS2015x86_*_DLINK2_FLAGS = >> >> *_VS2015x86_*_DEPS_FLAGS = DEF(MSFT_DEPS_FLAGS) >> >> *_VS2015x86_*_ASM16_PATH = DEF(VS2015x86_BIN)\ml.exe >> >> @@ -1593,7 +1593,7 @@ NOOPT_VS2015x86_X64_DLINK_FLAGS = >> /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF >> *_VS2017_*_SLINK_FLAGS = /NOLOGO /LTCG >> >> *_VS2017_*_APP_FLAGS = /nologo /E /TC >> >> *_VS2017_*_PP_FLAGS = /nologo /E /TC /FIAutoGen.h >> >> -*_VS2017_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h >> >> +*_VS2017_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h /we4668 >> >> *_VS2017_*_DLINK2_FLAGS = /WHOLEARCHIVE >> >> *_VS2017_*_ASM16_PATH = DEF(VS2017_BIN_IA32)\ml.exe >> >> *_VS2017_*_DEPS_FLAGS = DEF(MSFT_DEPS_FLAGS) >> >> @@ -1736,7 +1736,7 @@ NOOPT_VS2017_AARCH64_DLINK_FLAGS = >> /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF >> *_VS2017_EBC_MAKE_FLAGS = /nologo >> >> *_VS2017_EBC_PP_FLAGS = /nologo /E /TC /FIAutoGen.h >> >> *_VS2017_EBC_CC_FLAGS = /nologo /c /WX /W3 >> /FIAutoGen.h /D$(MODULE_ENTRY_POINT)=$(ARCH_ENTRY_POINT) >> >> -*_VS2017_EBC_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h >> >> +*_VS2017_EBC_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h /we4668 >> >> *_VS2017_EBC_SLINK_FLAGS = /lib /NOLOGO /MACHINE:EBC >> >> *_VS2017_EBC_DLINK_FLAGS = "C:\Program Files >> (x86)\Intel\EBC\Lib\EbcLib.lib" /NOLOGO /NODEFAULTLIB /MACHINE:EBC >> /OPT:REF /ENTRY:$(IMAGE_ENTRY_POINT) >> /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /MAP /ALIGN:32 /DRIVER >> >> >> >> @@ -1756,7 +1756,7 @@ NOOPT_VS2017_AARCH64_DLINK_FLAGS = >> /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF >> *_VS2019_*_SLINK_FLAGS = /NOLOGO /LTCG >> >> *_VS2019_*_APP_FLAGS = /nologo /E /TC >> >> *_VS2019_*_PP_FLAGS = /nologo /E /TC /FIAutoGen.h >> >> -*_VS2019_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h >> >> +*_VS2019_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h /we4668 >> >> *_VS2019_*_DLINK2_FLAGS = /WHOLEARCHIVE >> >> *_VS2019_*_ASM16_PATH = DEF(VS2019_BIN_IA32)\ml.exe >> >> *_VS2019_*_DEPS_FLAGS = DEF(MSFT_DEPS_FLAGS) >> >> @@ -1899,7 +1899,7 @@ NOOPT_VS2019_AARCH64_DLINK_FLAGS = >> /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF >> *_VS2019_EBC_MAKE_FLAGS = /nologo >> >> *_VS2019_EBC_PP_FLAGS = /nologo /E /TC /FIAutoGen.h >> >> *_VS2019_EBC_CC_FLAGS = /nologo /c /WX /W3 >> /FIAutoGen.h /D$(MODULE_ENTRY_POINT)=$(ARCH_ENTRY_POINT) >> >> -*_VS2019_EBC_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h >> >> +*_VS2019_EBC_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE >> /FI$(MODULE_NAME)StrDefs.h /we4668 >> >> *_VS2019_EBC_SLINK_FLAGS = /lib /NOLOGO /MACHINE:EBC >> >> *_VS2019_EBC_DLINK_FLAGS = "C:\Program Files >> (x86)\Intel\EBC\Lib\EbcLib.lib" /NOLOGO /NODEFAULTLIB /MACHINE:EBC >> /OPT:REF /ENTRY:$(IMAGE_ENTRY_POINT) >> /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /MAP /ALIGN:32 /DRIVER >> >> >> >> -- >> 2.30.0 > > > [-- Attachment #2: Type: text/html, Size: 35390 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2021-04-23 8:23 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2021-03-02 8:21 [PATCH v1 0/2] BaseTools: Make undefined VFR macro an error Daniel Schaefer 2021-03-02 8:21 ` [PATCH v1 1/2] BaseTools: Make undefined VFR macro an error (GCC) Daniel Schaefer 2021-03-08 1:05 ` [edk2-devel] " Bob Feng 2021-03-08 3:44 ` Daniel Schaefer [not found] ` <166A41333DA0F959.3944@groups.io> 2021-04-23 8:22 ` Daniel Schaefer 2021-03-02 8:21 ` [PATCH v1 2/2] BaseTools: Make undefined VFR macro an error (MSVC) Daniel Schaefer 2021-03-04 2:12 ` 回复: " gaoliming 2021-03-04 2:46 ` Daniel Schaefer 2021-04-23 8:21 ` Daniel Schaefer
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox