From 7c2e2d4f1a6fec4caeadc8295f1a7a21364e07ec Mon Sep 17 00:00:00 2001 From: Nate DeSimone Date: Tue, 8 Jul 2025 16:47:08 -0700 Subject: [PATCH] BaseTools/toolsetup.bat: Set IASL_PREFIX when using Mingw-w64 on Windows If IASL_PREFIX is not already defined, then edksetup.bat should set it. This unifies the behavior between Visual Studio and Mingw-w64. Signed-off-by: Nate DeSimone --- BaseTools/set_vsprefix_envs.bat | 7 ++++++- BaseTools/toolsetup.bat | 11 +++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/BaseTools/set_vsprefix_envs.bat b/BaseTools/set_vsprefix_envs.bat index df2c771951..5565f615f1 100644 --- a/BaseTools/set_vsprefix_envs.bat +++ b/BaseTools/set_vsprefix_envs.bat @@ -242,7 +242,12 @@ if not defined WINDDK3790_PREFIX ( ) if not defined IASL_PREFIX ( - set IASL_PREFIX=C:\ASL\ + if exist "C:\ASL\" ( + set IASL_PREFIX=C:\ASL\ + ) else ( + @echo. + @echo !!! WARNING !!! IASL_PREFIX environment variable is not set + ) ) popd diff --git a/BaseTools/toolsetup.bat b/BaseTools/toolsetup.bat index ac52f7a8ee..92eb6823a1 100755 --- a/BaseTools/toolsetup.bat +++ b/BaseTools/toolsetup.bat @@ -333,6 +333,17 @@ if defined VS2022 ( call %EDK_TOOLS_PATH%\set_vsprefix_envs.bat call %EDK_TOOLS_PATH%\get_vsvars.bat ) +if defined BASETOOLS_MINGW_BUILD ( + if not defined IASL_PREFIX ( + REM For VS builds this environment variable is set via set_vsprefix_envs.bat + if exist "C:\ASL\" ( + set IASL_PREFIX=C:\ASL\ + ) else ( + @echo. + @echo !!! WARNING !!! IASL_PREFIX environment variable is not set + ) + ) +) if %SCRIPT_ERROR% NEQ 0 ( @echo. @echo !!! ERROR !!! %VSTool% is not installed !!!