When make or nmake fails to build the basetools, Edk2ToolsBuild.py currently prints a generic error message "Failed to build." and raises an exception. This has two issues: The first is that it raises an exception, which leads people to believe it is a python issue, and not a build issue. The second is that users don't necessarily know to check the build log if this error occurs.
This has been reported many times through many different avenues: https://github.com/tianocore/edk2/discussions/4611 https://stackoverflow.com/questions/77421168/edkii-base-tools-fails-to-build https://github.com/tianocore/edk2-pytool-extensions/issues/180 https://github.com/tianocore/edk2-pytool-extensions/issues/207 This patch series changes the exception to a error log so that the invocable completes and returns a non-zero exit code and also logs a more descriptive error that informs the user to review the build log, and where to find it. Cc: Rebecca Cran <rebe...@bsdio.com> Cc: Liming Gao <gaolim...@byosoft.com.cn> Cc: Bob Feng <bob.c.f...@intel.com> Cc: Yuwei Chen <yuwei.c...@intel.com> Joey Vagedes (1): BaseTools: Edk2ToolsBuild.py: Clarify make error BaseTools/Edk2ToolsBuild.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) -- 2.34.1