summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/modules/detect/sdks/find_mingw.lua6
1 files changed, 2 insertions, 4 deletions
diff --git a/xmake/modules/detect/sdks/find_mingw.lua b/xmake/modules/detect/sdks/find_mingw.lua
index b5eca3d5d..9a1f24253 100644
--- a/xmake/modules/detect/sdks/find_mingw.lua
+++ b/xmake/modules/detect/sdks/find_mingw.lua
@@ -28,17 +28,16 @@ import("detect.sdks.find_cross_toolchain")
-- find mingw directory
function _find_mingwdir(sdkdir)
- cprint("_find_mingwdir #1 %s", sdkdir)
-- get mingw directory
if not sdkdir then
if is_host("macosx", "linux") and os.isdir("/opt/llvm-mingw") then
sdkdir = "/opt/llvm-mingw"
elseif is_host("macosx") and os.isdir("/usr/local/opt/mingw-w64") then
+ -- for macOS Intel
sdkdir = "/usr/local/opt/mingw-w64"
- cprint("_find_mingwdir #2 %s", sdkdir)
elseif is_host("macosx") and os.isdir("/opt/homebrew/opt/mingw-w64") then
+ -- for Apple Silicon
sdkdir = "/opt/homebrew/opt/mingw-w64"
- cprint("_find_mingwdir #2 %s", sdkdir)
elseif is_host("linux") then
sdkdir = "/usr"
elseif is_subhost("msys") then
@@ -82,7 +81,6 @@ function _find_mingw(sdkdir, bindir, cross)
-- find mingw root directory
sdkdir = _find_mingwdir(sdkdir)
- cprint("_find_mingw #1 %s", sdkdir)
if not sdkdir then
return
end