From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mx.groups.io with SMTP id smtpd.web09.10281.1667680544035683552 for ; Sat, 05 Nov 2022 13:35:44 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=eIZ897Tz; spf=pass (domain: intel.com, ip: 192.55.52.43, mailfrom: michael.d.kinney@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1667680544; x=1699216544; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=OVD/2vFMXD2rvcrj6nTci/2oCBAinPPjUiesbIhjaWI=; b=eIZ897TzOMNGPqiqqBWRUj8FTqoQIVDJlV2LVDwdgg21hJKHqxzHyU/L moHBw7djH2enPg96EDitfwLfzaPbdENQC3yWy9mvCn3XTIVovh5eQuN3a 311WdKoXKsu+qX9uGD/bkAIKqH3wy8P2ja2HXl043P7Y5kWmeqcLhTTjf kjuRv9cyb+6bo1fFt5eGtYJgF45ksp/g9PDLFBgv75SVY2fnJmcIakyuK s4uIDjCIl5FN4iF2Skh6uedCnQC1SORUSliWrDDTVGIpiQ3hKjYXnxO+p QnMjJ3KDeg0niFgrHrCJYpw39rSjmYHfzmFIr/Ex6LdeY9F+BlCLHLj7g g==; X-IronPort-AV: E=McAfee;i="6500,9779,10522"; a="396505377" X-IronPort-AV: E=Sophos;i="5.96,141,1665471600"; d="scan'208";a="396505377" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Nov 2022 13:35:43 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10522"; a="630087342" X-IronPort-AV: E=Sophos;i="5.96,141,1665471600"; d="scan'208";a="630087342" Received: from mdkinney-mobl2.amr.corp.intel.com ([10.209.75.160]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Nov 2022 13:35:42 -0700 From: "Michael D Kinney" To: devel@edk2.groups.io Cc: Bob Feng , Liming Gao , Yuwei Chen Subject: [Patch 1/1] BaseTools/Source/C: Use /Z7 instead of /Zi for host tools Date: Sat, 5 Nov 2022 13:35:36 -0700 Message-Id: <20221105203536.1559-1-michael.d.kinney@intel.com> X-Mailer: git-send-email 2.37.1.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Cc: Liming Gao Cc: Yuwei Chen Signed-off-by: Michael D Kinney --- 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