Reviewed-by: Yuwei Chen<[email protected]>

> -----Original Message-----
> From: Feng, Bob C <[email protected]>
> Sent: Saturday, June 25, 2022 1:12 PM
> To: [email protected]
> Cc: Feng, Bob C <[email protected]>; Gao, Liming
> <[email protected]>; Chen, Christine <[email protected]>
> Subject: [Patch] BaseTools: Fix the GenMake bug for .cpp source file
> 
> From: "Feng, Bob C" <[email protected]>
> 
> 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 <[email protected]>
> Cc: Liming Gao <[email protected]>
> Cc: Yuwei Chen <[email protected]>
> ---
>  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:                         # CmdTargetDict[CmdSign] = 
> "%s %s" %
> (CmdTargetDict[CmdSign], SingleCommandList[-1])
> CmdTargetDict[CmdSign].append(SingleCommandList[-1])                     
> Index =
> CommandList.index(Item)                     CommandList.pop(Index)-           
>          if
> SingleCommandList[-1].endswith("%s%s.c" % (TAB_SLASH,
> CmdSumDict[CmdSign[3:].rsplit(TAB_SLASH, 1)[0]])):+                    
> BaseName =
> SingleCommandList[-1].rsplit('.',1)[0]+                    if
> BaseName.endswith("%s%s" % (TAB_SLASH,
> CmdSumDict[CmdSign[3:].rsplit(TAB_SLASH, 1)[0]])):                         
> Cpplist =
> CmdCppDict[T.Target.SubDir]                         Cpplist.insert(0, 
> '$(OBJLIST_%d): ' %
> list(self.ObjTargetDict.keys()).index(T.Target.SubDir))
> source_files = CmdTargetDict[CmdSign][1:]                         
> source_files.insert(0,
> " ")                         if len(source_files)>2:--
> 2.29.1.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#90762): https://edk2.groups.io/g/devel/message/90762
Mute This Topic: https://groups.io/mt/91979266/21656
Group Owner: [email protected]
Unsubscribe: https://edk2.groups.io/g/devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to