diff options
| author | ruki <[email protected]> | 2020-12-16 23:46:19 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-12-16 23:46:19 +0800 |
| commit | c0aafd82e851cbdbba2292e02df4ac23d00f9ae6 (patch) | |
| tree | b7dea7f53c621ac4d1735782ec4032066d95c9cf | |
| parent | acb182fce388de57b6f7262087e1e27ae3d71b41 (diff) | |
improve to find default platform
| -rw-r--r-- | xmake/actions/config/xmake.lua | 15 | ||||
| -rw-r--r-- | xmake/modules/private/detect/find_platform.lua | 2 |
2 files changed, 2 insertions, 15 deletions
diff --git a/xmake/actions/config/xmake.lua b/xmake/actions/config/xmake.lua index b1da4ffa5..5745b0206 100644 --- a/xmake/actions/config/xmake.lua +++ b/xmake/actions/config/xmake.lua @@ -18,18 +18,6 @@ -- @file xmake.lua -- --- get the default platform -function get_default_plat() - local subhost = os.subhost() - if subhost == "msys" then - local msystem = os.getenv("MSYSTEM") - if msystem and msystem:lower():find("mingw", 1, true) then - return "mingw" - end - end - return subhost -end - -- define task task("config") @@ -56,8 +44,7 @@ task("config") {'c', "clean", "k", nil , "Clean the cached configure and configure all again." } , {nil, "menu", "k", nil , "Configure project with a menu-driven user interface." } , {category = "."} - , {'p', "plat", "kv", get_default_plat() - , "Compile for the given platform." + , {'p', "plat", "kv", "auto" , "Compile for the given platform." , values = function (complete, opt) -- imports diff --git a/xmake/modules/private/detect/find_platform.lua b/xmake/modules/private/detect/find_platform.lua index 26a09cc0e..d366260b6 100644 --- a/xmake/modules/private/detect/find_platform.lua +++ b/xmake/modules/private/detect/find_platform.lua @@ -139,7 +139,7 @@ function main(opt) end if not opt.arch and not config.get("arch") then config.set("arch", arch) - cprint("checking for architecture ... ${color.success}%s", plat) + cprint("checking for architecture ... ${color.success}%s", arch) end end return plat, arch |
