From nobody Mon Feb 9 14:14:29 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+86747+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+86747+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1645151477010891.3169101966523; Thu, 17 Feb 2022 18:31:17 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id N01mYY1788612xq1Ux1iIz4F; Thu, 17 Feb 2022 18:31:18 -0800 X-Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mx.groups.io with SMTP id smtpd.web10.6112.1645151475685665381 for ; Thu, 17 Feb 2022 18:31:17 -0800 X-IronPort-AV: E=McAfee;i="6200,9189,10261"; a="250789692" X-IronPort-AV: E=Sophos;i="5.88,377,1635231600"; d="scan'208";a="250789692" X-Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Feb 2022 18:31:16 -0800 X-IronPort-AV: E=Sophos;i="5.88,377,1635231600"; d="scan'208";a="590004697" X-Received: from guominji-mobl1.ccr.corp.intel.com ([10.238.15.53]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Feb 2022 18:31:15 -0800 From: "Guomin Jiang" To: devel@edk2.groups.io Cc: Bob Feng , Liming Gao , Yuwei Chen Subject: [edk2-devel] [PATCH 1/2] BaseTools/Conf: Reduce the ASSERT patch to save the binary size Date: Fri, 18 Feb 2022 10:30:07 +0800 Message-Id: <20220218023008.1347-2-guomin.jiang@intel.com> In-Reply-To: <20220218023008.1347-1-guomin.jiang@intel.com> References: <20220218023008.1347-1-guomin.jiang@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,guomin.jiang@intel.com X-Gm-Message-State: qISwAXUpS5iYvhP7pPLuhGyWx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1645151478; bh=nBRbAha8YGCvxlBN7MfciIAdU3V3yriRrvRrUhFMWaQ=; h=Cc:Date:From:Reply-To:Subject:To; b=AUbTR0KZ9aRtKcN918BatLYCH5yRo1zB6t9VbBZuRI/UdIY6SZBviEGHZinG2apP/B0 7GefJrKFqD77+OXow3gkO7W+E4P5a09jmZ5g2iOMhbFM49I60XsV4z0gWEKnE6La1Iq1z I9IVdAJkAFdbTE6FKWp4qUpY/ayfSSq9kiw= X-ZohoMail-DKIM: fail (Signature date is -1 seconds in the future.) X-ZM-MESSAGEID: 1645151486780100001 Content-Type: text/plain; charset="utf-8" REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3840 Use DEBUG_FILE to control ASSERT path Motivation and Goal: 1. The path will occupy many size in DEBUG build when file path is long 2. We hope can reduce the size but not impact the debug capability 3. If only use filename, we can search the filename to locate file. It can save many size meanwhile. Cc: Bob Feng Cc: Liming Gao Cc: Yuwei Chen Signed-off-by: Guomin Jiang --- BaseTools/Conf/build_rule.template | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/BaseTools/Conf/build_rule.template b/BaseTools/Conf/build_rule= .template index f40118234471..ad0bae42be62 100755 --- a/BaseTools/Conf/build_rule.template +++ b/BaseTools/Conf/build_rule.template @@ -1,5 +1,5 @@ # -# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
+# Copyright (c) 2007 - 2022, Intel Corporation. All rights reserved.
# Portions copyright (c) 2008 - 2010, Apple Inc. All rights reserved.
# Copyright (c) 2020, ARM Ltd. All rights reserved.
# SPDX-License-Identifier: BSD-2-Clause-Patent @@ -126,14 +126,14 @@ $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj =20 - "$(CC)" /Fo${dst} $(DEPS_FLAGS) $(CC_FLAGS) $(INC) ${src} + "$(CC)" /Fo${dst} $(DEPS_FLAGS) /D DEBUG_FILE=3D"\"${s_base}.c\"" = $(CC_FLAGS) $(INC) ${src} =20 # For RVCTCYGWIN CC_FLAGS must be first to work around pathing iss= ues - "$(CC)" $(DEPS_FLAGS) $(CC_FLAGS) -c -o ${dst} $(INC) ${src} + "$(CC)" $(DEPS_FLAGS) -D DEBUG_FILE=3D"\"${s_base}.c\"" $(CC_FLAGS= ) -c -o ${dst} $(INC) ${src} =20 - "$(CC)" $(DEPS_FLAGS) $(CC_FLAGS) -o ${dst} $(INC) ${src} + "$(CC)" $(DEPS_FLAGS) -D DEBUG_FILE=3D"\"${s_base}.c\"" $(CC_FLAGS= ) -o ${dst} $(INC) ${src} =20 [C-Code-File.BASE.AARCH64,C-Code-File.SEC.AARCH64,C-Code-File.PEI_CORE.AAR= CH64,C-Code-File.PEIM.AARCH64,C-Code-File.BASE.ARM,C-Code-File.SEC.ARM,C-Co= de-File.PEI_CORE.ARM,C-Code-File.PEIM.ARM] @@ -146,7 +146,7 @@ $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj =20 - "$(CC)" $(CC_FLAGS) $(CC_XIPFLAGS) -c -o ${dst} $(INC) ${src} + "$(CC)" -D DEBUG_FILE=3D"\"${s_base}.c\"" $(CC_FLAGS) $(CC_XIPFLAG= S) -c -o ${dst} $(INC) ${src} =20 [C-Header-File] --=20 2.35.1.windows.2 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#86747): https://edk2.groups.io/g/devel/message/86747 Mute This Topic: https://groups.io/mt/89225321/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-