diff options
| author | ruki <[email protected]> | 2015-06-12 14:39:38 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2015-06-12 14:39:38 +0800 |
| commit | eb0e6fe79d8e49d82bb600529028fcf28767a2d8 (patch) | |
| tree | 47d565fb521efebf5919ddaef495e026517a1179 /xmake/scripts | |
| parent | 3c4c1616be193d5146e2ddd9f8dcc706baf1f8f5 (diff) | |
modify arch name
Diffstat (limited to 'xmake/scripts')
| -rw-r--r-- | xmake/scripts/platform/iphoneos/iphoneos.lua | 4 | ||||
| -rw-r--r-- | xmake/scripts/platform/iphonesimulator/iphonesimulator.lua | 7 | ||||
| -rw-r--r-- | xmake/scripts/platform/iphonesimulator/prober.lua | 2 | ||||
| -rw-r--r-- | xmake/scripts/platform/linux/linux.lua | 6 | ||||
| -rw-r--r-- | xmake/scripts/platform/macosx/macosx.lua | 16 | ||||
| -rw-r--r-- | xmake/scripts/platform/mingw/mingw.lua | 7 | ||||
| -rw-r--r-- | xmake/scripts/platform/mingw/prober.lua | 8 | ||||
| -rw-r--r-- | xmake/scripts/platform/windows/tools/link.lua | 4 | ||||
| -rw-r--r-- | xmake/scripts/platform/windows/windows.lua | 2 |
9 files changed, 26 insertions, 30 deletions
diff --git a/xmake/scripts/platform/iphoneos/iphoneos.lua b/xmake/scripts/platform/iphoneos/iphoneos.lua index 30d6f049e..c66119e15 100644 --- a/xmake/scripts/platform/iphoneos/iphoneos.lua +++ b/xmake/scripts/platform/iphoneos/iphoneos.lua @@ -60,8 +60,8 @@ function iphoneos.make(configs) configs.cxflags = { archflags } configs.mxflags = { archflags } configs.asflags = { archflags } - configs.ldflags = { archflags } - configs.shflags = { archflags } + configs.ldflags = { archflags, "-ObjC", "-lstdc++", "-fobjc-link-runtime", "-miphoneos-version-min=6.0" } + configs.shflags = { archflags, "-ObjC", "-lstdc++", "-fobjc-link-runtime", "-miphoneos-version-min=6.0" } -- init flags for the xcode sdk directory local xcode_sdkdir = config.get("__xcode_sdkdir") diff --git a/xmake/scripts/platform/iphonesimulator/iphonesimulator.lua b/xmake/scripts/platform/iphonesimulator/iphonesimulator.lua index 8cf3e4ea4..db3f1c8c7 100644 --- a/xmake/scripts/platform/iphonesimulator/iphonesimulator.lua +++ b/xmake/scripts/platform/iphonesimulator/iphonesimulator.lua @@ -30,7 +30,7 @@ local config = require("base/config") iphonesimulator._HOST = "macosx" -- init architectures -iphonesimulator._ARCHS = {"i386"} +iphonesimulator._ARCHS = {"i386", "x86_64"} -- make configure function iphonesimulator.make(configs) @@ -60,8 +60,8 @@ function iphonesimulator.make(configs) configs.cxflags = { archflags } configs.mxflags = { archflags } configs.asflags = { archflags } - configs.ldflags = { archflags } - configs.shflags = { archflags } + configs.ldflags = { archflags, "-Xlinker -objc_abi_version", "-Xlinker 2 -stdlib=libc++", "-Xlinker -no_implicit_dylibs", "-fobjc-link-runtime", "-mios-simulator-version-min=5.0" } + configs.shflags = { archflags, "-Xlinker -objc_abi_version", "-Xlinker 2 -stdlib=libc++", "-Xlinker -no_implicit_dylibs", "-fobjc-link-runtime", "-mios-simulator-version-min=5.0" } -- init flags for the xcode sdk directory local xcode_sdkdir = config.get("__xcode_sdkdir") @@ -72,7 +72,6 @@ function iphonesimulator.make(configs) table.insert(configs.ldflags, "-isysroot " .. xcode_sdkdir) table.insert(configs.shflags, "-isysroot " .. xcode_sdkdir) end - end -- get the option menu for action: xmake config or global diff --git a/xmake/scripts/platform/iphonesimulator/prober.lua b/xmake/scripts/platform/iphonesimulator/prober.lua index 7760f7fdb..5834486eb 100644 --- a/xmake/scripts/platform/iphonesimulator/prober.lua +++ b/xmake/scripts/platform/iphonesimulator/prober.lua @@ -42,7 +42,7 @@ function prober._probe_arch(configs) if arch then return true end -- init the default architecture - configs.set("arch", "i386") + configs.set("arch", "x86_64") -- trace utils.verbose("checking for the architecture ... %s", configs.get("arch")) diff --git a/xmake/scripts/platform/linux/linux.lua b/xmake/scripts/platform/linux/linux.lua index 40f9b5999..9ce5f447e 100644 --- a/xmake/scripts/platform/linux/linux.lua +++ b/xmake/scripts/platform/linux/linux.lua @@ -30,7 +30,7 @@ local config = require("base/config") linux._HOST = "linux" -- init architectures -linux._ARCHS = {"x86", "x64"} +linux._ARCHS = {"i386", "x86_64"} -- make configure function linux.make(configs) @@ -57,8 +57,8 @@ function linux.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 diff --git a/xmake/scripts/platform/macosx/macosx.lua b/xmake/scripts/platform/macosx/macosx.lua index 5adeb0e6a..f413fd759 100644 --- a/xmake/scripts/platform/macosx/macosx.lua +++ b/xmake/scripts/platform/macosx/macosx.lua @@ -30,7 +30,7 @@ local config = require("base/config") macosx._HOST = "macosx" -- init architectures -macosx._ARCHS = {"x86", "x64"} +macosx._ARCHS = {"i386", "x86_64"} -- make configure function macosx.make(configs) @@ -56,16 +56,12 @@ function macosx.make(configs) -- init flags for architecture local archflags = nil local arch = config.get("arch") - if arch then - if arch == "x64" then archflags = "-m64" - elseif arch == "x86" then archflags = "-m32" - end - end - configs.cxflags = { archflags } - configs.mxflags = { archflags } + if arch then archflags = "-arch " .. arch end + configs.cxflags = { archflags, "-fpascal-strings", "-fmessage-length=0" } + configs.mxflags = { archflags, "-fpascal-strings", "-fmessage-length=0" } configs.asflags = { archflags } - configs.ldflags = { archflags } - configs.shflags = { archflags } + configs.ldflags = { archflags, "-mmacosx-version-min=10.7", "-stdlib=libc++", "-lz" } + configs.shflags = { archflags, "-mmacosx-version-min=10.7", "-stdlib=libc++", "-lz" } -- init flags for the xcode sdk directory local xcode_sdkdir = config.get("__xcode_sdkdir") 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 diff --git a/xmake/scripts/platform/windows/tools/link.lua b/xmake/scripts/platform/windows/tools/link.lua index 4c8d59aaa..4a77c9908 100644 --- a/xmake/scripts/platform/windows/tools/link.lua +++ b/xmake/scripts/platform/windows/tools/link.lua @@ -41,8 +41,8 @@ function link.init(self, name) -- init flags for architecture local flags_arch = "" - if arch == "x86" then flags_arch = "-machine:x86" - elseif arch == "x64" then flags_arch = "-machine:x86_64" + if arch == "i386" then flags_arch = "-machine:x86" + elseif arch == "x86_64" then flags_arch = "-machine:x86_64" end -- init ldflags diff --git a/xmake/scripts/platform/windows/windows.lua b/xmake/scripts/platform/windows/windows.lua index 573699d9a..4c9d11e8f 100644 --- a/xmake/scripts/platform/windows/windows.lua +++ b/xmake/scripts/platform/windows/windows.lua @@ -31,7 +31,7 @@ local config = require("base/config") windows._HOST = "windows" -- init architectures -windows._ARCHS = {"x86", "x64"} +windows._ARCHS = {"i386", "x86_64"} -- enter the given environment function windows._enter(name) |
