From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mx.groups.io with SMTP id smtpd.web12.16662.1656133906234214561 for ; Fri, 24 Jun 2022 22:11:46 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=DATYqMS1; spf=pass (domain: intel.com, ip: 134.134.136.31, 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=1656133906; x=1687669906; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=Aut589AkoR85RNUQx2SNz8xmI/h2oyRfqmNqQDJ1ffA=; b=DATYqMS16svJAuuELoKR08eblL59rQTC7LfjMQkQrekmugizi1g3v/Jg En9/dfL7+NaK+84ycuPI58zK2tPmteCbDCVmvScWwgnFZLa3Mgf7dc5Dg 4N/QhbfeQ4uI/A9SQFjhjaj+7V5Ztd9DsTaWKW1y+MiVhza0n0q8S8+wG dvB7ncFV2pyhtR6vPZfnJdQyaFbIdEsXoQFWfGFz0vZwuCp+CncoOPNgy tjYFQ4avgNCcrgeYmwL+OFiDHhxDVrVWKTuCdUi+1z4OA309ZgCOqTPUj eKWcXqA0jxMnfxsGUF+zXu8R8+HEyM2i/sLTxZBRIrYmAsYcHggOfd2os w==; X-IronPort-AV: E=McAfee;i="6400,9594,10388"; a="342836554" X-IronPort-AV: E=Sophos;i="5.92,221,1650956400"; d="scan'208";a="342836554" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Jun 2022 22:11:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,221,1650956400"; d="scan'208";a="645582615" Received: from shwdepsi1121.ccr.corp.intel.com ([10.239.158.59]) by fmsmga008.fm.intel.com with ESMTP; 24 Jun 2022 22:11:44 -0700 From: "Bob Feng" To: devel@edk2.groups.io Cc: "Feng, Bob C" , Liming Gao , Yuwei Chen Subject: [Patch] BaseTools: Fix the GenMake bug for .cpp source file Date: Sat, 25 Jun 2022 13:11:40 +0800 Message-Id: <20220625051140.931-1-bob.c.feng@intel.com> X-Mailer: git-send-email 2.29.1.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: "Feng, Bob C" Build-rules.txt lists .cc and .cpp as supported file extensions. BaseTools commit 05217d210e introduce a regression issue that ignore the .cc and .cpp file type. This patch is to fix this bug. Signed-off-by: Bob Feng Cc: Liming Gao Cc: Yuwei Chen --- BaseTools/Source/Python/AutoGen/GenMake.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/BaseTools/Source/Python/AutoGen/GenMake.py b/BaseTools/Source/= Python/AutoGen/GenMake.py index da406e6ff4..92c7bf0cda 100755 --- a/BaseTools/Source/Python/AutoGen/GenMake.py +++ b/BaseTools/Source/Python/AutoGen/GenMake.py @@ -1108,11 +1108,12 @@ cleanlib: else:=0D # CmdTargetDict[CmdSign] =3D "%s %s" % (CmdTargetD= ict[CmdSign], SingleCommandList[-1])=0D CmdTargetDict[CmdSign].append(SingleCommandList[-1= ])=0D Index =3D CommandList.index(Item)=0D CommandList.pop(Index)=0D - if SingleCommandList[-1].endswith("%s%s.c" % (TAB_SLAS= H, CmdSumDict[CmdSign[3:].rsplit(TAB_SLASH, 1)[0]])):=0D + BaseName =3D SingleCommandList[-1].rsplit('.',1)[0]=0D + if BaseName.endswith("%s%s" % (TAB_SLASH, CmdSumDict[C= mdSign[3:].rsplit(TAB_SLASH, 1)[0]])):=0D Cpplist =3D CmdCppDict[T.Target.SubDir]=0D Cpplist.insert(0, '$(OBJLIST_%d): ' % list(self.Ob= jTargetDict.keys()).index(T.Target.SubDir))=0D source_files =3D CmdTargetDict[CmdSign][1:]=0D source_files.insert(0, " ")=0D if len(source_files)>2:=0D --=20 2.29.1.windows.1