From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.24, mailfrom: zhijux.fan@intel.com) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by groups.io with SMTP; Thu, 18 Apr 2019 04:20:50 -0700 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Apr 2019 04:20:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,365,1549958400"; d="dat'59?scan'59,208,59";a="316992365" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga005.jf.intel.com with ESMTP; 18 Apr 2019 04:20:49 -0700 Received: from FMSMSX110.amr.corp.intel.com (10.18.116.10) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 18 Apr 2019 04:20:49 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by fmsmsx110.amr.corp.intel.com (10.18.116.10) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 18 Apr 2019 04:20:49 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.164]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.92]) with mapi id 14.03.0415.000; Thu, 18 Apr 2019 19:20:47 +0800 From: "Fan, ZhijuX" To: "devel@edk2.groups.io" CC: "Gao, Liming" , "Feng, Bob C" Subject: [PATCH V3] BaseTools:fixed the incorrect autogen makefile which cause build failure. Thread-Topic: [PATCH V3] BaseTools:fixed the incorrect autogen makefile which cause build failure. Thread-Index: AdT11vtgSR+pVv6iRAKqVeGZ6oBvPg== Date: Thu, 18 Apr 2019 11:20:46 +0000 Message-ID: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: zhijux.fan@intel.com X-Groupsio-MsgNum: 39298 Content-Type: multipart/mixed; boundary="_000_FAD0D7E0AE0FA54D987F6E72435CAFD50AF4C106SHSMSX101ccrcor_" Content-Language: en-US --_000_FAD0D7E0AE0FA54D987F6E72435CAFD50AF4C106SHSMSX101ccrcor_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=3D1729 On some build environment, build fails but on the other build machines,=20 build success. This is the regression issue introduced by commit=20 05217d210e8da37b47d0be58ec363f7af2fa1c18 As Dict is unordered, an error occurs when extract the index of the Dict in the order of the keys after the creation of a new item. Keys are indexed inconsistently before and after adding a new item. The logic of the program is to store the key's corresponding index as reference data in the MakeFile and use it as part of the macro. The data model is: $(LIST_%d) % Dict.keys().index(Key) So for now, use OrdereDict instead of Dict. Cc: Bob Feng Cc: Liming Gao Signed-off-by: Zhiju.Fan --- BaseTools/Source/Python/AutoGen/GenMake.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/BaseTools/Source/Python/AutoGen/GenMake.py b/BaseTools/Source/= Python/AutoGen/GenMake.py index 7562dc68b3..3e770ad7c4 100644 --- a/BaseTools/Source/Python/AutoGen/GenMake.py +++ b/BaseTools/Source/Python/AutoGen/GenMake.py @@ -429,7 +429,7 @@ cleanlib: self.CommonFileDependency =3D [] self.FileListMacros =3D {} self.ListFileMacros =3D {} - self.ObjTargetDict =3D {} + self.ObjTargetDict =3D OrderedDict() self.FileCache =3D {} self.LibraryBuildCommandList =3D [] self.LibraryFileList =3D [] @@ -943,6 +943,12 @@ cleanlib: DependencyDict[File] =3D list(NewDepSet) =20 # Convert target description object to target string in makefile + if self._AutoGenObject.BuildRuleFamily =3D=3D TAB_COMPILER_MSFT an= d TAB_C_CODE_FILE in self._AutoGenObject.Targets: + for T in self._AutoGenObject.Targets[TAB_C_CODE_FILE]: + NewFile =3D self.PlaceMacro(str(T), self.Macros) + if not self.ObjTargetDict.get(T.Target.SubDir): + self.ObjTargetDict[T.Target.SubDir] =3D set() + self.ObjTargetDict[T.Target.SubDir].add(NewFile) for Type in self._AutoGenObject.Targets: for T in self._AutoGenObject.Targets[Type]: # Generate related macros if needed @@ -952,13 +958,6 @@ cleanlib: self.ListFileMacros[T.ListFileMacro] =3D [] if T.GenIncListFile and T.IncListFileMacro not in self.Lis= tFileMacros: self.ListFileMacros[T.IncListFileMacro] =3D [] - if self._AutoGenObject.BuildRuleFamily =3D=3D TAB_COMPILER= _MSFT and Type =3D=3D TAB_C_CODE_FILE: - NewFile =3D self.PlaceMacro(str(T), self.Macros) - if self.ObjTargetDict.get(T.Target.SubDir): - self.ObjTargetDict[T.Target.SubDir].add(NewFile) - else: - self.ObjTargetDict[T.Target.SubDir] =3D set() - self.ObjTargetDict[T.Target.SubDir].add(NewFile) =20 Deps =3D [] CCodeDeps =3D [] --=20 2.14.1.windows.1 --_000_FAD0D7E0AE0FA54D987F6E72435CAFD50AF4C106SHSMSX101ccrcor_ Content-Disposition: attachment; filename="winmail.dat" Content-Transfer-Encoding: base64 Content-Type: application/ms-tnef; name="winmail.dat" eJ8+IttHAQaQCAAEAAAAAAABAAEAAQeQBgAIAAAA5AQAAAAAAADoAAEJgAEAIQAAAEYzMUQzNTNE QUYzNzhENEFBMDgxRTY3OTVEQUYwRjkyAFUHAQ2ABAACAAAAAgACAAEFgAMADgAAAOMHBAASAAsA FAAuAAQAUQEBIIADAA4AAADjBwQAEgALABQALgAEAFEBAQiABwAYAAAASVBNLk1pY3Jvc29mdCBN YWlsLk5vdGUAMQgBBIABAFUAAABbUEFUQ0ggVjNdIEJhc2VUb29sczpmaXhlZCB0aGUgaW5jb3Jy ZWN0IGF1dG9nZW4gbWFrZWZpbGUgd2hpY2ggY2F1c2UgYnVpbGQgZmFpbHVyZS4ATB4BC4ABACEA AABGMzFEMzUzREFGMzc4RDRBQTA4MUU2Nzk1RE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