From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.151, mailfrom: bob.c.feng@intel.com) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by groups.io with SMTP; Sun, 08 Sep 2019 18:14:32 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Sep 2019 18:14:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,483,1559545200"; d="scan'208";a="188874033" Received: from shwdepsi1121.ccr.corp.intel.com ([10.239.158.47]) by orsmga006.jf.intel.com with ESMTP; 08 Sep 2019 18:14:30 -0700 From: "Bob Feng" To: devel@edk2.groups.io Cc: Liming Gao , Steven Shi , Bob Feng Subject: [Patch 1/1] BaseTools: Fixed build clean regression issue Date: Mon, 9 Sep 2019 09:14:27 +0800 Message-Id: <20190909011427.30808-1-bob.c.feng@intel.com> X-Mailer: git-send-email 2.20.1.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2166 file_lock and cache_lock are used as global data, so move file_lock and cache_lock initialization in Build object __init__ function. Cc: Liming Gao Cc: Steven Shi Signed-off-by: Bob Feng --- BaseTools/Source/Python/build/build.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Python/build/build.py index 0406ac314b65..cf82c29b7eb9 100755 --- a/BaseTools/Source/Python/build/build.py +++ b/BaseTools/Source/Python/build/build.py @@ -810,27 +810,25 @@ class Build(): self.AutoGenMgr = None EdkLogger.info("") os.chdir(self.WorkspaceDir) GlobalData.gCacheIR = Manager().dict() self.log_q = log_q + GlobalData.file_lock = mp.Lock() + GlobalData.cache_lock = mp.Lock() def StartAutoGen(self,mqueue, DataPipe,SkipAutoGen,PcdMaList,share_data): try: if SkipAutoGen: return True,0 feedback_q = mp.Queue() - file_lock = mp.Lock() error_event = mp.Event() - GlobalData.file_lock = file_lock - cache_lock = mp.Lock() - GlobalData.cache_lock = cache_lock FfsCmd = DataPipe.Get("FfsCommand") if FfsCmd is None: FfsCmd = {} GlobalData.FfsCmd = FfsCmd GlobalData.libConstPcd = DataPipe.Get("LibConstPcd") GlobalData.Refes = DataPipe.Get("REFS") - auto_workers = [AutoGenWorkerInProcess(mqueue,DataPipe.dump_file,feedback_q,file_lock,cache_lock,share_data,self.log_q,error_event) for _ in range(self.ThreadNumber)] + auto_workers = [AutoGenWorkerInProcess(mqueue,DataPipe.dump_file,feedback_q,GlobalData.file_lock,GlobalData.cache_lock,share_data,self.log_q,error_event) for _ in range(self.ThreadNumber)] self.AutoGenMgr = AutoGenManager(auto_workers,feedback_q,error_event) self.AutoGenMgr.start() for w in auto_workers: w.start() if PcdMaList is not None: -- 2.20.1.windows.1