summaryrefslogtreecommitdiff
path: root/xmake/scripts/platform/mingw
diff options
context:
space:
mode:
authorruki <[email protected]>2015-06-12 14:39:38 +0800
committerruki <[email protected]>2015-06-12 14:39:38 +0800
commiteb0e6fe79d8e49d82bb600529028fcf28767a2d8 (patch)
tree47d565fb521efebf5919ddaef495e026517a1179 /xmake/scripts/platform/mingw
parent3c4c1616be193d5146e2ddd9f8dcc706baf1f8f5 (diff)
modify arch name
Diffstat (limited to 'xmake/scripts/platform/mingw')
-rw-r--r--xmake/scripts/platform/mingw/mingw.lua7
-rw-r--r--xmake/scripts/platform/mingw/prober.lua8
2 files changed, 8 insertions, 7 deletions
diff --git a/xmake/scripts/platform/mingw/mingw.lua b/xmake/scripts/platform/mingw/mingw.lua
index d4ae010bb..466305753 100644
--- a/xmake/scripts/platform/mingw/mingw.lua
+++ b/xmake/scripts/platform/mingw/mingw.lua
@@ -30,7 +30,7 @@ local config = require("base/config")
mingw._HOST = xmake._HOST
-- init architectures
-mingw._ARCHS = {"x86", "x64"}
+mingw._ARCHS = {"i386", "x86_64"}
-- make configure
function mingw.make(configs)
@@ -55,8 +55,9 @@ function mingw.make(configs)
local archflags = nil
local arch = config.get("arch")
if arch then
- if arch == "x64" then archflags = "-m64"
- elseif arch == "x86" then archflags = "-m32"
+ if arch == "x86_64" then archflags = "-m64"
+ elseif arch == "i386" then archflags = "-m32"
+ else archflags = "-arch " .. arch
end
end
configs.cxflags = { archflags }
diff --git a/xmake/scripts/platform/mingw/prober.lua b/xmake/scripts/platform/mingw/prober.lua
index 51074d9a3..86fca46ab 100644
--- a/xmake/scripts/platform/mingw/prober.lua
+++ b/xmake/scripts/platform/mingw/prober.lua
@@ -42,7 +42,7 @@ function prober._probe_arch(configs)
if arch then return true end
-- init the default architecture
- configs.set("arch", "x86")
+ configs.set("arch", "i386")
-- trace
utils.verbose("checking for the architecture ... %s", configs.get("arch"))
@@ -145,11 +145,11 @@ function prober._probe_toolchains(configs)
local cross = ""
local arch = configs.get("arch")
if arch then
- if xmake._HOST == "macosx" and arch == "x86" then
+ if xmake._HOST == "macosx" and arch == "i386" then
cross = "i386-mingw32-"
- elseif arch == "x86" then
+ elseif arch == "i386" then
cross = "i686-w64-mingw32-"
- elseif arch == "x64" then
+ elseif arch == "x86_64" then
cross = "x86_64-w64-mingw32-"
end
end