From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mx.groups.io with SMTP id smtpd.web09.18367.1646041945856989392 for ; Mon, 28 Feb 2022 01:52:26 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=dfr+cseD; spf=pass (domain: intel.com, ip: 192.55.52.88, mailfrom: bob.c.feng@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1646041945; x=1677577945; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=fVx4WtY69TtyxSup4QKYdgkKcBsxXfFW6EhEx8RFRBE=; b=dfr+cseD3lv1FJ5uGGa1hy9vm67T+vNGcC2jZUY2t8MiuqrK0xMBKYPV BgPDqCtQPNVOB7tp2V6yi35eFtHGUe/UBFE4k05DTQeLEj6UQBB4xKNsh VxpS/Wt7KuXg7DCqtkHPPpNMAT/VUm2OFmqgtFzRY539W6htu0kCdShmK 0o4hUEHvpI/Aq3pjQIeLZXR+2jsGKWlPONRNAJoSIAIRccuzzMBsZqZUe tNbM/eTT3tFoIY/Qir7rXttJGfpG+80dTi7SdP+LJKgLHg9QziddQpfEC yyKn9C3HjZqEyBwKnRZZPJHHOpZdHSuJXHtHa+WVZU7LVNl8UzYxvPR8i g==; X-IronPort-AV: E=McAfee;i="6200,9189,10271"; a="277501201" X-IronPort-AV: E=Sophos;i="5.90,142,1643702400"; d="scan'208";a="277501201" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Feb 2022 01:52:25 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,142,1643702400"; d="scan'208";a="802049658" Received: from fmsmsx604.amr.corp.intel.com ([10.18.126.84]) by fmsmga005.fm.intel.com with ESMTP; 28 Feb 2022 01:52:25 -0800 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Mon, 28 Feb 2022 01:52:24 -0800 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21 via Frontend Transport; Mon, 28 Feb 2022 01:52:24 -0800 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.173) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.20; Mon, 28 Feb 2022 01:52:24 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DeVptTq0J8bavuzlAOp6CE7LO08V+FEuPrkk1+bi/1lQd6mEKXdSPfMet8HmA1FpHq3heNtQDVMHfBU7J9LpHnjTNhRbeLfJo4SW8um4kKUWwtCLycARln3djAuQI6tvEecMSMJg4aYIUqwvDf2Xx5mMidU+a3QEVjZD47f8dI6Y5jkGi+yxu45pAY1R/41lAhJbU+7JTi+BlQ1undI3vKpbBz2QL2sdFgRZJPnoedIdsqRdoW80LJpp/Kc51A4mVAlnE4cYHRlSblRsogFMSMpfRfFOSCnLo0Yb03V4LnfF1ps9W/Un3xICUih6Wskl7ctyBNrn3CUu+2e/CX3Dkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=1Hwke0HceFrbBZB3a2ygKTfJn2hnJNfUPWJadKXI3XY=; b=XnKdYS7Q07ypX/MP+VSrJZFNpuJ1M8x3kkcCWM6WSi8cFlqnkTiuVfUkXLyDr95CrSF8g5iTYzXtH5iYUjdeUnnP03BjgpDFkfkRRy6OiF4H0whR4TUjJjwmwi549me20Uri/ReRkKblTRvvxJbDEdcDvhckmJSlzpfT0UPL2R0XkO8JID1rvkzILyGBO8Vk9UYF+Vnh2c3gMAeBuWit2MvR5S0m/3UV3CUCcz/1amUAPKmtk/SLRp2M0OXX92pq4EX3oJi2KO7FEGdc9O2L+YNYKVQ2zcQP4rpqRxcX7M6SEuwyaH9XA9Y/wQhDM3/LO4wNlZaqgDUwzu9kNvPRjA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from PH7PR11MB5863.namprd11.prod.outlook.com (2603:10b6:510:135::11) by MWHPR1101MB2320.namprd11.prod.outlook.com (2603:10b6:301:53::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5017.22; Mon, 28 Feb 2022 09:52:22 +0000 Received: from PH7PR11MB5863.namprd11.prod.outlook.com ([fe80::e5:8ef1:3d8:874]) by PH7PR11MB5863.namprd11.prod.outlook.com ([fe80::e5:8ef1:3d8:874%9]) with mapi id 15.20.5017.026; Mon, 28 Feb 2022 09:52:22 +0000 From: "Bob Feng" To: "Jiang, Guomin" , "devel@edk2.groups.io" CC: "Gao, Liming" , "Chen, Christine" Subject: Re: [PATCH 1/2] BaseTools/Conf: Reduce the ASSERT patch to save the binary size Thread-Topic: [PATCH 1/2] BaseTools/Conf: Reduce the ASSERT patch to save the binary size Thread-Index: AQHYJG+giTf6OkgmkUqHfIfPee1/oqyoyKsA Date: Mon, 28 Feb 2022 09:52:22 +0000 Message-ID: References: <20220218023008.1347-1-guomin.jiang@intel.com> <20220218023008.1347-2-guomin.jiang@intel.com> In-Reply-To: <20220218023008.1347-2-guomin.jiang@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: f3eaa9dc-fa3c-414c-e669-08d9faa00427 x-ms-traffictypediagnostic: MWHPR1101MB2320:EE_ x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: a3+SmKYRgOwe+v2i8OyPinOGI0UghAUnfJSviIK3uQGL1ib6m/or7QIFr/XAjWi/Woz7zvWU648GkvyXLfKZq15oVfL0orOhsC7xknqQdqHSCfHPMqUod9t45LLVZ+RTnEac9lyVluPU9TS8VZRoIYlTu+qbPyOtVuor5lfrJwVASZ7Me5dgZjau/ilLkN2aZJoyPAtsEGwNmyvttMZEGpkeMmkVg15pc6TjLGLXd4rJUXNluAAQx5fRAlkgdZbpgNg8AI0+HyiyxSDOZo9UdCUKCVJqBHxUGlcYE4Zg+g7wH9uVhxmqZSvV5nwMEUyjqxdd5UZN2Pu9L8JvbYgUgNwACXmh6+TmzcXauwDmxU6ivop+QS+pKcZe4uh+grkKGfH73NprOLvKaXeKikjyMsS4mgkZz8BoIGppfk3iCCnz4PycntEqqTOnWXM/Zu+5jf9B7kI56HkGdPLu/uE8YNA4pd/U81AH2zIMeiXUSFEFj92K89mGxs5awS3XPYCSfN5vNQVPt7F/xA1x5BKWlAS3cgk0d8COcRtv6fzcctZrTSqOh3ps0o45yPNWjNnxceQLqZ3h0ivfw8RRbeCNE4iDr3d90MoAqdyS7UP0+j1x+V7f3/TH0eyhLswQywZ2L66WrOwpw+ljkMHgzNZtRbfwqURvvrCTjbHvL46tZEBZrC6lT/Nompf81lk4497jNXwRhbHXNVaaaMY4yhRDiAFGbFHGMozSfkXHabdJG/Y0ZdbE88SQy+KOMgzZkC86cB4yzncgJeyubGagpVC3Zhdl7rB4pXAl0io1G4clKbA= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH7PR11MB5863.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(366004)(8936002)(33656002)(55016003)(83380400001)(82960400001)(122000001)(52536014)(5660300002)(38100700002)(2906002)(966005)(508600001)(53546011)(107886003)(38070700005)(9686003)(71200400001)(6506007)(7696005)(4326008)(66946007)(186003)(26005)(76116006)(66476007)(66556008)(8676002)(64756008)(66446008)(316002)(86362001)(110136005)(54906003);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?gs3BbSY/SCIBr97AZrTEkhY0jH1sDDgY9dwUo/5lr38ErLWPrIpOz4DF7RSW?= =?us-ascii?Q?33wd6GGtMyOm8Ld3ZnK3i8typ/LXlzzfFTElBlAUltESRrU7H+TQEkU5pEfE?= =?us-ascii?Q?E8k9xgcr5bpYXrPIZExPGSsZZ3YOtajn3tXFRA5nfFBsh9XwtiTw2i2L5kuF?= =?us-ascii?Q?e6oIt4HHL9vBFdygQa8ISLZ487oux3+qySn2RMMdSbU0BomU/MloPRsdmVy/?= =?us-ascii?Q?V4F7t4gShJ8KCPocH+EU8H5/kW5AS2KEONLS7XhI2ectj87qDu4P/3aPOLbZ?= =?us-ascii?Q?Up74HwDK20Cf3vuX6Z+wnAZuco8eigiOhB1R9umlu+SMiFx/BZ8QgiKw9V7d?= =?us-ascii?Q?njja29dXUIcjzl5L9xzYswCjyr9vRoVRQbZuJCbC5GqANJoAWOCOdc0V9Ejg?= =?us-ascii?Q?moKFRzHAGYm1ObiX/Qd1FoRVBqtTum/6kWW5L5qqO+3hS09cyj/4UJ+a3cUh?= =?us-ascii?Q?dQkClnWNLE1bwVvSbnJseetGOTLSD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= =?us-ascii?Q?j+pRtwWZDsefWY4A/q2wDRRZaDcPyUMnQg6UiIK2ENyaq4wDD/9a8om3TDs8?= =?us-ascii?Q?ZXV/OeEvlLeQnZ8JvWVY027oV3odj8ZLzdRP/ocO5zzzPR2Hrn9QQh4H9UQa?= =?us-ascii?Q?LisNlvkM2gW1jMSzkpi5doLFq2aCEAwplYkqahj85alc2MenjXuk+6sO+TW4?= =?us-ascii?Q?v221aBUycjC8YTbr4WxMB0phgdc+hLg6AMTI9kDXPWQFZudKKpm82YYXNM35?= =?us-ascii?Q?3qU1yAfAC+GZfNinccUKGiQ=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH7PR11MB5863.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f3eaa9dc-fa3c-414c-e669-08d9faa00427 X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Feb 2022 09:52:22.0433 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: j1FmXOLPaa1LIKaz8yMQqubG5E9zrkuRz8Ygvd3M9Kw0IJ+O4hQ6yAFCl4fHkrRJxKXeBX7ZlmsIfHuQblfDrg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR1101MB2320 Return-Path: bob.c.feng@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Guomin, I think this patch should work.=20 I concern the case that there would be already DEBUG_FILE macro defined in = some existing platform. Could you add the 2 patches' review link to the Bugzilla? And I'd like to see the other associated patch review comments also. Thanks, Bob -----Original Message----- From: Jiang, Guomin =20 Sent: Friday, February 18, 2022 10:30 AM To: devel@edk2.groups.io Cc: Feng, Bob C ; Gao, Liming ; Chen, Christine Subject: [PATCH 1/2] BaseTools/Conf: Reduce the ASSERT patch to save the bi= nary size 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=20 +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\""= =20 + $(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\""=20 + $(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\""=20 + $(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)=20 + $(CC_XIPFLAGS) -c -o ${dst} $(INC) ${src} =20 [C-Header-File] -- 2.35.1.windows.2