diff options
| author | ruki <[email protected]> | 2020-10-05 23:12:52 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-10-05 13:17:45 +0800 |
| commit | 5fb2bcc38583f830e064082024212c061f055b99 (patch) | |
| tree | 24198cdd2d4c7a6093584074933a4ae08d651225 /xmake/platforms/mingw/xmake.lua | |
| parent | 8e6f673fe1eb57a5f5535d9bac663868a3922caf (diff) | |
improve find_mingw
Diffstat (limited to 'xmake/platforms/mingw/xmake.lua')
| -rw-r--r-- | xmake/platforms/mingw/xmake.lua | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/xmake/platforms/mingw/xmake.lua b/xmake/platforms/mingw/xmake.lua index e0624500a..6fd1eaa58 100644 --- a/xmake/platforms/mingw/xmake.lua +++ b/xmake/platforms/mingw/xmake.lua @@ -42,7 +42,16 @@ platform("mingw") import("core.project.config") local arch = config.get("arch") if not arch then - config.set("arch", "x86_64") + local mingw_chost = nil + if is_subhost("msys") then + mingw_chost = os.getenv("MINGW_CHOST") + end + if mingw_chost == "i686-w64-mingw32" then + arch = "i386" + else + arch = "x86_64" + end + config.set("arch", arch) cprint("checking for architecture ... ${color.success}%s", config.get("arch")) end end) |
