From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id C6266D80A15 for ; Tue, 26 Sep 2023 00:47:43 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=tK1FgxzqVeZ/ifZdakfXcrrr+JIgJ3ys84MNBUO0Bc0=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1695689262; v=1; b=BeU3PzTE91Ky3vCQnCh3CINVq/eOrJedWyk7UBrRYLVVGg9m7wfdpkfHpnlwBZQpnLASZaN9 5uWZulaJHrKUIMHwYCPwuCrJU7A67jCo4nJk63kWAIsxxhLyUTLHCirddnF3/mseApnibMafjFn c6zezP/24hNgXQmey9zcGKHA= X-Received: by 127.0.0.2 with SMTP id bTf3YY7687511xFELdlbZCOM; Mon, 25 Sep 2023 17:47:42 -0700 X-Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.24]) by mx.groups.io with SMTP id smtpd.web10.8609.1695689261442538894 for ; Mon, 25 Sep 2023 17:47:42 -0700 X-IronPort-AV: E=McAfee;i="6600,9927,10843"; a="384225471" X-IronPort-AV: E=Sophos;i="6.03,176,1694761200"; d="scan'208";a="384225471" X-Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Sep 2023 17:47:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10843"; a="1079495283" X-IronPort-AV: E=Sophos;i="6.03,176,1694761200"; d="scan'208";a="1079495283" X-Received: from nldesimo-desk.amr.corp.intel.com ([10.241.240.72]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Sep 2023 17:47:40 -0700 From: "Nate DeSimone" To: devel@edk2.groups.io Cc: Chasel Chiu , Isaac Oram , Liming Gao , Eric Dong Subject: [edk2-devel] [PATCH v1] MinPlatformPkg: If BaseTools doesn't build, try a clean build Date: Mon, 25 Sep 2023 17:47:19 -0700 Message-Id: <20230926004719.2706-1-nathaniel.l.desimone@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,nathaniel.l.desimone@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: M6pC1ehfoXPPyRxVPSSDH12Nx7686176AA= Content-Transfer-Encoding: 8bit X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=BeU3PzTE; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none) Cc: Chasel Chiu Cc: Isaac Oram Cc: Liming Gao Cc: Eric Dong Signed-off-by: Nate DeSimone --- Platform/Intel/build_bios.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/Platform/Intel/build_bios.py b/Platform/Intel/build_bios.py index 9c95cfff76..b396017c8c 100755 --- a/Platform/Intel/build_bios.py +++ b/Platform/Intel/build_bios.py @@ -207,7 +207,22 @@ def pre_build(build_config, build_type="DEBUG", silent=False, toolchain=None): _, _, result, return_code = execute_script(command, config, shell=shell) if return_code != 0: - build_failed(config) + # + # If the BaseTools build fails, then run a clean build and retry + # + clean_command = ["nmake", "-f", + os.path.join(config["BASE_TOOLS_PATH"], "Makefile"), + "clean"] + if os.name == "posix": + clean_command = ["make", "-C", + os.path.join(config["BASE_TOOLS_PATH"]), "clean"] + _, _, result, return_code = execute_script(clean_command, config, + shell=shell) + if return_code != 0: + build_failed(config) + _, _, result, return_code = execute_script(command, config, shell=shell) + if return_code != 0: + build_failed(config) # # build platform silicon tools -- 2.39.2.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#109055): https://edk2.groups.io/g/devel/message/109055 Mute This Topic: https://groups.io/mt/101587227/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-