From 3a8aab03b9e615cd0a40a1ed21e9ab4490f6f1c5 Mon Sep 17 00:00:00 2001 From: ruki Date: Wed, 22 Sep 2021 22:53:20 +0800 Subject: [PATCH] Update find_mingw.lua --- xmake/modules/detect/sdks/find_mingw.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xmake/modules/detect/sdks/find_mingw.lua b/xmake/modules/detect/sdks/find_mingw.lua index 7be315a9ca1..e5276834b98 100644 --- a/xmake/modules/detect/sdks/find_mingw.lua +++ b/xmake/modules/detect/sdks/find_mingw.lua @@ -94,6 +94,9 @@ function _find_mingw(sdkdir, bindir, cross) -- find cross toolchain local toolchain = find_cross_toolchain(sdkdir or bindir, {bindir = bindir, cross = cross}) + if not toolchain then -- fallback, e.g. gcc.exe without cross + toolchain = find_cross_toolchain(sdkdir or bindir, {bindir = bindir}) + end if toolchain then return {sdkdir = toolchain.sdkdir, bindir = toolchain.bindir, cross = toolchain.cross} end