From 04304b3e063b65d1e3e0ac3f40aa99d36f06e4a3 Mon Sep 17 00:00:00 2001 From: iFarbod Date: Sat, 30 Nov 2024 23:08:02 +0330 Subject: Obtain MinGW's path from LLVM_MINGW_DIR/ROOT If either of LLVM_MINGW_DIR or LLVM_MINGW_ROOT are present as environment variables, MinGW's path will be filled automatically by them. --- xmake/modules/detect/sdks/find_mingw.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xmake/modules/detect/sdks/find_mingw.lua b/xmake/modules/detect/sdks/find_mingw.lua index 4085a6cb8..ac1f9802a 100644 --- a/xmake/modules/detect/sdks/find_mingw.lua +++ b/xmake/modules/detect/sdks/find_mingw.lua @@ -41,8 +41,8 @@ function _find_mingwdir(sdkdir) sdkdir = "/opt/homebrew/opt/mingw-w64" elseif is_host("linux") then sdkdir = "/usr" - elseif is_subhost("msys") then - local mingw_prefix = os.getenv("MINGW_PREFIX") + else + local mingw_prefix = is_subhost("msys") and os.getenv("MINGW_PREFIX") or os.getenv("LLVM_MINGW_DIR") or os.getenv("LLVM_MINGW_ROOT") if mingw_prefix and os.isdir(mingw_prefix) then sdkdir = mingw_prefix end -- cgit v1.3.1