summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorc8ef <[email protected]>2024-04-27 11:40:13 +0800
committerGitHub <[email protected]>2024-04-27 11:40:13 +0800
commiteeeb76b2d14cd942302231bdcdde04dc39cf9928 (patch)
treef8bd99f5c8409b5b4d6e9ae4500ea6274afe69c9
parent57a632aa1501799d5f199a2cf06e27b28ae686b1 (diff)
Update find_mingw.lua
-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