From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 508CB802B8 for ; Sun, 5 Mar 2017 18:27:21 -0800 (PST) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Mar 2017 18:27:19 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,251,1484035200"; d="scan'208";a="71952435" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga005.jf.intel.com with ESMTP; 05 Mar 2017 18:27:19 -0800 Received: from fmsmsx116.amr.corp.intel.com (10.18.116.20) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.248.2; Sun, 5 Mar 2017 18:27:18 -0800 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by fmsmsx116.amr.corp.intel.com (10.18.116.20) with Microsoft SMTP Server (TLS) id 14.3.248.2; Sun, 5 Mar 2017 18:27:18 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.88]) by SHSMSX104.ccr.corp.intel.com ([10.239.4.70]) with mapi id 14.03.0248.002; Mon, 6 Mar 2017 10:27:16 +0800 From: "Gao, Liming" To: "Marvin.Haeuser@outlook.com" , "edk2-devel@lists.01.org" Thread-Topic: [PATCH] BaseTools/CLANG: set -Wno-unused-but-set-variable on RELEASE builds Thread-Index: AQHSlVyVt77oHRQkW0u6YHIqXbpoqKGHF5pg Date: Mon, 6 Mar 2017 02:27:15 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14D6E8472@shsmsx102.ccr.corp.intel.com> References: In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH] BaseTools/CLANG: set -Wno-unused-but-set-variable on RELEASE builds X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Mar 2017 02:27:21 -0000 Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Reviewed-by: Liming Gao >-----Original Message----- >From: Marvin H=E4user [mailto:Marvin.Haeuser@outlook.com] >Sent: Sunday, March 05, 2017 11:00 AM >To: edk2-devel@lists.01.org >Cc: Gao, Liming ; Zhu, Yonghong > >Subject: [PATCH] BaseTools/CLANG: set -Wno-unused-but-set-variable on >RELEASE builds > >Set -Wno-unused-but-set-variable on RELEASE builds so variables only >verified in DEBUG code (e.g. ASSERT()) do not trigger build errors. >This is done to align with GCC compilation: >https://github.com/tianocore/edk2/commit/20d00edf21d2f2144921622891d8 >b59a1553cd83 > >Contributed-under: TianoCore Contribution Agreement 1.0 >Signed-off-by: Marvin Haeuser >--- > BaseTools/Conf/tools_def.template | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > >diff --git a/BaseTools/Conf/tools_def.template >b/BaseTools/Conf/tools_def.template >index ab4f936e7a8b..b9a063215354 100755 >--- a/BaseTools/Conf/tools_def.template >+++ b/BaseTools/Conf/tools_def.template >@@ -5467,7 +5467,7 @@ DEFINE CLANG35_AARCH64_CC_FLAGS =3D >DEF(GCC_AARCH64_CC_FLAGS) DEF(CLANG35_AARCH64 > *_CLANG35_ARM_CC_XIPFLAGS =3D DEF(GCC_ARM_CC_XIPFLAGS) > > DEBUG_CLANG35_ARM_CC_FLAGS =3D DEF(CLANG35_ARM_CC_FLAGS) >$(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -O0 >-RELEASE_CLANG35_ARM_CC_FLAGS =3D DEF(CLANG35_ARM_CC_FLAGS) >$(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -Oz >+RELEASE_CLANG35_ARM_CC_FLAGS =3D DEF(CLANG35_ARM_CC_FLAGS) >$(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -Oz -Wno-unused-but-set-variable > > ################## > # CLANG35 AARCH64 definitions >@@ -5489,7 +5489,7 @@ RELEASE_CLANG35_ARM_CC_FLAGS =3D >DEF(CLANG35_ARM_CC_FLAGS) $(ARCHCC_FLAGS) $(P > *_CLANG35_AARCH64_CC_XIPFLAGS =3D DEF(GCC_AARCH64_CC_XIPFLAGS) > > DEBUG_CLANG35_AARCH64_CC_FLAGS =3D >DEF(CLANG35_AARCH64_CC_FLAGS) $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) >-O0 >-RELEASE_CLANG35_AARCH64_CC_FLAGS =3D >DEF(CLANG35_AARCH64_CC_FLAGS) $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) >-Oz -fomit-frame-pointer >+RELEASE_CLANG35_AARCH64_CC_FLAGS =3D >DEF(CLANG35_AARCH64_CC_FLAGS) $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) >-Oz -fomit-frame-pointer -Wno-unused-but-set-variable > > >########################################################### >######################### > # >@@ -5543,7 +5543,7 @@ DEBUG_CLANG38_IA32_CC_FLAGS =3D >DEF(CLANG38_ALL_CC_FLAGS) -m32 -Oz -flto - > DEBUG_CLANG38_IA32_DLINK_FLAGS =3D >DEF(GCC5_IA32_X64_DLINK_FLAGS) -flto -Wl,-Oz -Wl,-melf_i386 -Wl,-- >oformat=3Delf32-i386 > DEBUG_CLANG38_IA32_DLINK2_FLAGS =3D DEF(GCC5_IA32_DLINK2_FLAGS) >-O3 > >-RELEASE_CLANG38_IA32_CC_FLAGS =3D DEF(CLANG38_ALL_CC_FLAGS) - >m32 -Oz -flto -march=3Di586 DEF(CLANG38_IA32_TARGET) >+RELEASE_CLANG38_IA32_CC_FLAGS =3D DEF(CLANG38_ALL_CC_FLAGS) - >m32 -Oz -flto -march=3Di586 DEF(CLANG38_IA32_TARGET) -Wno-unused-but- >set-variable > RELEASE_CLANG38_IA32_DLINK_FLAGS =3D >DEF(GCC5_IA32_X64_DLINK_FLAGS) -flto -Wl,-Oz -Wl,-melf_i386 -Wl,-- >oformat=3Delf32-i386 > RELEASE_CLANG38_IA32_DLINK2_FLAGS =3D DEF(GCC5_IA32_DLINK2_FLAGS) >-O3 > >@@ -5580,7 +5580,7 @@ DEBUG_CLANG38_X64_CC_FLAGS =3D >DEF(CLANG38_ALL_CC_FLAGS) -m64 "-DEFIAPI=3D__ > DEBUG_CLANG38_X64_DLINK_FLAGS =3D >DEF(GCC5_IA32_X64_DLINK_FLAGS) -flto -Wl,-Oz -Wl,-melf_x86_64 -Wl,-- >oformat=3Delf64-x86-64 -Wl,-pie -mcmodel=3Dsmall > DEBUG_CLANG38_X64_DLINK2_FLAGS =3D DEF(GCC5_X64_DLINK2_FLAGS) - >O3 > >-RELEASE_CLANG38_X64_CC_FLAGS =3D DEF(CLANG38_ALL_CC_FLAGS) - >m64 "-DEFIAPI=3D__attribute__((ms_abi))" -mno-red-zone -mcmodel=3Dsmall - >fpie -Oz -flto DEF(CLANG38_X64_TARGET) >+RELEASE_CLANG38_X64_CC_FLAGS =3D DEF(CLANG38_ALL_CC_FLAGS) - >m64 "-DEFIAPI=3D__attribute__((ms_abi))" -mno-red-zone -mcmodel=3Dsmall - >fpie -Oz -flto DEF(CLANG38_X64_TARGET) -Wno-unused-but-set-variable > RELEASE_CLANG38_X64_DLINK_FLAGS =3D >DEF(GCC5_IA32_X64_DLINK_FLAGS) -flto -Wl,-Oz -Wl,-melf_x86_64 -Wl,-- >oformat=3Delf64-x86-64 -Wl,-pie -mcmodel=3Dsmall > RELEASE_CLANG38_X64_DLINK2_FLAGS =3D DEF(GCC5_X64_DLINK2_FLAGS) - >O3 > >-- >2.11.1.windows.1