summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/modules/detect/sdks/find_mingw.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/xmake/modules/detect/sdks/find_mingw.lua b/xmake/modules/detect/sdks/find_mingw.lua
index 06723859c..6aa5e3f2a 100644
--- a/xmake/modules/detect/sdks/find_mingw.lua
+++ b/xmake/modules/detect/sdks/find_mingw.lua
@@ -33,6 +33,8 @@ function _find_mingwdir(sdkdir)
if not sdkdir then
if is_host("macosx") then
sdkdir = "/usr/local/opt/mingw-w64"
+ elseif is_host("linux") then
+ sdkdir = "/usr"
end
end
@@ -58,7 +60,7 @@ function _find_mingw(sdkdir, bindir, cross)
end
-- select cross on macos, e.g x86_64-w64-mingw32- or i686-w64-mingw32-
- if is_host("macosx") and not cross then
+ if is_host("macosx", "linux") and not cross then
local arch = config.get("arch")
if not arch or arch == "i386" then
cross = "i686-*-"