diff options
| author | ruki <[email protected]> | 2015-12-09 10:33:37 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2015-12-09 10:33:37 +0800 |
| commit | 2890ded4a7baa898fd5dc5f5b478f7cf41ab1f1d (patch) | |
| tree | 63fccecd8f6218dfe93527233b7283fc15c36622 /xmake/scripts | |
| parent | caeedfebaed4de91afb0c66ef1706164dad79da6 (diff) | |
add swift for linux and android
Diffstat (limited to 'xmake/scripts')
| -rw-r--r-- | xmake/scripts/action/_config.lua | 4 | ||||
| -rw-r--r-- | xmake/scripts/platform/android/android.lua | 1 | ||||
| -rw-r--r-- | xmake/scripts/platform/android/prober.lua | 1 | ||||
| -rw-r--r-- | xmake/scripts/platform/iphoneos/iphoneos.lua | 3 | ||||
| -rw-r--r-- | xmake/scripts/platform/iphonesimulator/iphonesimulator.lua | 3 | ||||
| -rw-r--r-- | xmake/scripts/platform/linux/linux.lua | 1 | ||||
| -rw-r--r-- | xmake/scripts/platform/linux/prober.lua | 1 | ||||
| -rw-r--r-- | xmake/scripts/platform/macosx/macosx.lua | 3 | ||||
| -rw-r--r-- | xmake/scripts/platform/mingw/mingw.lua | 1 | ||||
| -rw-r--r-- | xmake/scripts/platform/mingw/prober.lua | 1 | ||||
| -rw-r--r-- | xmake/scripts/platform/watchos/watchos.lua | 3 | ||||
| -rw-r--r-- | xmake/scripts/platform/watchsimulator/watchsimulator.lua | 3 |
12 files changed, 10 insertions, 15 deletions
diff --git a/xmake/scripts/action/_config.lua b/xmake/scripts/action/_config.lua index 25525748f..970cc2b64 100644 --- a/xmake/scripts/action/_config.lua +++ b/xmake/scripts/action/_config.lua @@ -168,6 +168,10 @@ function _config.menu() , {nil, "asflags", "kv", nil, "The Assembler Flags" } , {} + , {nil, "sc", "kv", nil, "The Swift Compiler" } + , {nil, "scflags", "kv", nil, "The Swift Compiler Flags" } + + , {} , {nil, "ld", "kv", nil, "The Linker" } , {nil, "ldflags", "kv", nil, "The Binary Linker Flags" } diff --git a/xmake/scripts/platform/android/android.lua b/xmake/scripts/platform/android/android.lua index 456aceaca..15e3c33a2 100644 --- a/xmake/scripts/platform/android/android.lua +++ b/xmake/scripts/platform/android/android.lua @@ -55,6 +55,7 @@ function android.make(configs) configs.tools.ar = config.get("ar") configs.tools.sh = config.get("sh") configs.tools.ex = config.get("ar") + configs.tools.sc = config.get("sc") -- init flags local arch = config.get("arch") diff --git a/xmake/scripts/platform/android/prober.lua b/xmake/scripts/platform/android/prober.lua index bb4abe023..a90c6bf43 100644 --- a/xmake/scripts/platform/android/prober.lua +++ b/xmake/scripts/platform/android/prober.lua @@ -234,6 +234,7 @@ function prober._probe_toolchains(configs) if not prober._probe_toolpath(configs, "ld", prefix, "g++", "the linker") then return false end if not prober._probe_toolpath(configs, "ar", prefix, "ar", "the static library linker") then return false end if not prober._probe_toolpath(configs, "sh", prefix, "g++", "the shared library linker") then return false end + if not prober._probe_toolpath(configs, "sc", prefix, "swiftc", "the swift compiler") then return false end -- ok return true diff --git a/xmake/scripts/platform/iphoneos/iphoneos.lua b/xmake/scripts/platform/iphoneos/iphoneos.lua index cc085d66d..f9147945c 100644 --- a/xmake/scripts/platform/iphoneos/iphoneos.lua +++ b/xmake/scripts/platform/iphoneos/iphoneos.lua @@ -109,9 +109,6 @@ function iphoneos.menu(action) , {nil, "mxflags", "kv", nil, "The Objc/c++ Compiler Flags" } , {nil, "mxxflags", "kv", nil, "The Objc++ Compiler Flags" } , {} - , {nil, "sc", "kv", nil, "The Swift Compiler" } - , {nil, "scflags", "kv", nil, "The Swift Compiler Flags" } - , {} , {nil, "xcode_dir", "kv", "auto", "The Xcode Application Directory" } , {nil, "xcode_sdkver", "kv", "auto", "The SDK Version for Xcode" } , {nil, "target_minver", "kv", "auto", "The Target Minimal Version" } diff --git a/xmake/scripts/platform/iphonesimulator/iphonesimulator.lua b/xmake/scripts/platform/iphonesimulator/iphonesimulator.lua index 64e6dbdc8..4ceeb3eca 100644 --- a/xmake/scripts/platform/iphonesimulator/iphonesimulator.lua +++ b/xmake/scripts/platform/iphonesimulator/iphonesimulator.lua @@ -106,9 +106,6 @@ function iphonesimulator.menu(action) , {nil, "mxflags", "kv", nil, "The Objc/c++ Compiler Flags" } , {nil, "mxxflags", "kv", nil, "The Objc++ Compiler Flags" } , {} - , {nil, "sc", "kv", nil, "The Swift Compiler" } - , {nil, "scflags", "kv", nil, "The Swift Compiler Flags" } - , {} , {nil, "xcode_dir", "kv", "auto", "The Xcode Application Directory" } , {nil, "xcode_sdkver", "kv", "auto", "The SDK Version for Xcode" } , {nil, "target_minver", "kv", "auto", "The Target Minimal Version" } diff --git a/xmake/scripts/platform/linux/linux.lua b/xmake/scripts/platform/linux/linux.lua index dc8c9cb27..3e3c0b063 100644 --- a/xmake/scripts/platform/linux/linux.lua +++ b/xmake/scripts/platform/linux/linux.lua @@ -56,6 +56,7 @@ function linux.make(configs) configs.tools.ar = config.get("ar") configs.tools.sh = config.get("sh") configs.tools.ex = config.get("ar") + configs.tools.sc = config.get("sc") -- init flags for architecture local archflags = nil diff --git a/xmake/scripts/platform/linux/prober.lua b/xmake/scripts/platform/linux/prober.lua index 5e5eec9b1..b476b0b8a 100644 --- a/xmake/scripts/platform/linux/prober.lua +++ b/xmake/scripts/platform/linux/prober.lua @@ -148,6 +148,7 @@ function prober._probe_toolchains(configs) if not prober._probe_toolpath(configs, "ld", "", "g++", "the linker") then return false end if not prober._probe_toolpath(configs, "ar", "", "ar", "the static library linker") then return false end if not prober._probe_toolpath(configs, "sh", "", "g++", "the shared library linker") then return false end + if not prober._probe_toolpath(configs, "sc", "", "swiftc", "the swift compiler") then return false end return true end diff --git a/xmake/scripts/platform/macosx/macosx.lua b/xmake/scripts/platform/macosx/macosx.lua index f270e0305..088a01c18 100644 --- a/xmake/scripts/platform/macosx/macosx.lua +++ b/xmake/scripts/platform/macosx/macosx.lua @@ -117,9 +117,6 @@ function macosx.menu(action) , {nil, "mxflags", "kv", nil, "The Objc/c++ Compiler Flags" } , {nil, "mxxflags", "kv", nil, "The Objc++ Compiler Flags" } , {} - , {nil, "sc", "kv", nil, "The Swift Compiler" } - , {nil, "scflags", "kv", nil, "The Swift Compiler Flags" } - , {} , {nil, "xcode_dir", "kv", "auto", "The Xcode Application Directory" } , {nil, "xcode_sdkver", "kv", "auto", "The SDK Version for Xcode" } , {nil, "target_minver", "kv", "auto", "The Target Minimal Version" } diff --git a/xmake/scripts/platform/mingw/mingw.lua b/xmake/scripts/platform/mingw/mingw.lua index f40e76480..7264489b2 100644 --- a/xmake/scripts/platform/mingw/mingw.lua +++ b/xmake/scripts/platform/mingw/mingw.lua @@ -54,6 +54,7 @@ function mingw.make(configs) configs.tools.ar = config.get("ar") configs.tools.sh = config.get("sh") configs.tools.ex = config.get("ar") + configs.tools.sc = config.get("sc") -- init flags for architecture local archflags = nil diff --git a/xmake/scripts/platform/mingw/prober.lua b/xmake/scripts/platform/mingw/prober.lua index 0134c0509..f70449697 100644 --- a/xmake/scripts/platform/mingw/prober.lua +++ b/xmake/scripts/platform/mingw/prober.lua @@ -161,6 +161,7 @@ function prober._probe_toolchains(configs) if not prober._probe_toolpath(configs, "ld", cross, "g++", "the linker") then return false end if not prober._probe_toolpath(configs, "ar", cross, "ar", "the static library linker") then return false end if not prober._probe_toolpath(configs, "sh", cross, "g++", "the shared library linker") then return false end + if not prober._probe_toolpath(configs, "sc", cross, "swiftc", "the swift compiler") then return false end return true end diff --git a/xmake/scripts/platform/watchos/watchos.lua b/xmake/scripts/platform/watchos/watchos.lua index 9a5f61d45..9551084f8 100644 --- a/xmake/scripts/platform/watchos/watchos.lua +++ b/xmake/scripts/platform/watchos/watchos.lua @@ -109,9 +109,6 @@ function watchos.menu(action) , {nil, "mxflags", "kv", nil, "The Objc/c++ Compiler Flags" } , {nil, "mxxflags", "kv", nil, "The Objc++ Compiler Flags" } , {} - , {nil, "sc", "kv", nil, "The Swift Compiler" } - , {nil, "scflags", "kv", nil, "The Swift Compiler Flags" } - , {} , {nil, "xcode_dir", "kv", "auto", "The Xcode Application Directory" } , {nil, "xcode_sdkver", "kv", "auto", "The SDK Version for Xcode" } , {nil, "target_minver", "kv", "auto", "The Target Minimal Version" } diff --git a/xmake/scripts/platform/watchsimulator/watchsimulator.lua b/xmake/scripts/platform/watchsimulator/watchsimulator.lua index a216e811e..a13bfde1e 100644 --- a/xmake/scripts/platform/watchsimulator/watchsimulator.lua +++ b/xmake/scripts/platform/watchsimulator/watchsimulator.lua @@ -106,9 +106,6 @@ function watchsimulator.menu(action) , {nil, "mxflags", "kv", nil, "The Objc/c++ Compiler Flags" } , {nil, "mxxflags", "kv", nil, "The Objc++ Compiler Flags" } , {} - , {nil, "sc", "kv", nil, "The Swift Compiler" } - , {nil, "scflags", "kv", nil, "The Swift Compiler Flags" } - , {} , {nil, "xcode_dir", "kv", "auto", "The Xcode Application Directory" } , {nil, "xcode_sdkver", "kv", "auto", "The SDK Version for Xcode" } , {nil, "target_minver", "kv", "auto", "The Target Minimal Version" } |
