summaryrefslogtreecommitdiff
path: root/xmake
diff options
context:
space:
mode:
authorruki <[email protected]>2022-02-03 00:37:47 +0800
committerruki <[email protected]>2022-02-03 00:37:47 +0800
commitbfac9c2bbd90824765c3ef3da2d3ebd0ce414d46 (patch)
tree68692543d06046da94d9bd2aa76d37ab22d35b45 /xmake
parent33b6eee18c98ea099a69bcf526c0391808fe99d4 (diff)
update changelog
Diffstat (limited to 'xmake')
-rw-r--r--xmake/platforms/linux/xmake.lua2
-rw-r--r--xmake/platforms/windows/xmake.lua2
-rw-r--r--xmake/toolchains/swift/xmake.lua37
3 files changed, 39 insertions, 2 deletions
diff --git a/xmake/platforms/linux/xmake.lua b/xmake/platforms/linux/xmake.lua
index ab7c71f75..ea70ed8e2 100644
--- a/xmake/platforms/linux/xmake.lua
+++ b/xmake/platforms/linux/xmake.lua
@@ -40,7 +40,7 @@ platform("linux")
set_installdir("/usr/local")
-- set toolchains
- set_toolchains("envs", "cross", "gcc", "clang", "yasm", "nasm", "fasm", "cuda", "dlang", "go", "rust", "gfortran", "zig", "fpc", "nim")
+ set_toolchains("envs", "cross", "gcc", "clang", "yasm", "nasm", "fasm", "cuda", "dlang", "go", "rust", "swift", "gfortran", "zig", "fpc", "nim")
-- set menu
set_menu {
diff --git a/xmake/platforms/windows/xmake.lua b/xmake/platforms/windows/xmake.lua
index f7687f44b..6f25ef914 100644
--- a/xmake/platforms/windows/xmake.lua
+++ b/xmake/platforms/windows/xmake.lua
@@ -38,7 +38,7 @@ platform("windows")
set_formats("symbol", "$(name).pdb")
-- set toolchains
- set_toolchains("msvc", "clang", "yasm", "nasm", "cuda", "dlang", "rust", "go", "gfortran", "zig", "fpc", "nim")
+ set_toolchains("msvc", "clang", "yasm", "nasm", "cuda", "dlang", "rust", "swift", "go", "gfortran", "zig", "fpc", "nim")
-- set menu
set_menu {
diff --git a/xmake/toolchains/swift/xmake.lua b/xmake/toolchains/swift/xmake.lua
new file mode 100644
index 000000000..1d9d1279b
--- /dev/null
+++ b/xmake/toolchains/swift/xmake.lua
@@ -0,0 +1,37 @@
+--!A cross-platform build utility based on Lua
+--
+-- Licensed under the Apache License, Version 2.0 (the "License");
+-- you may not use this file except in compliance with the License.
+-- You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
+-- Copyright (C) 2015-present, TBOOX Open Sousce Group.
+--
+-- @author ruki
+-- @file xmake.lua
+--
+
+-- define toolchain
+toolchain("swift")
+
+ -- set homepage
+ set_homepage("https://swift.org/")
+ set_description("Swift Programming Language Compiler")
+
+ -- set toolset
+ set_toolset("sc", "$(env SC)", "swiftc")
+ set_toolset("scld", "$(env SC)", "swiftc")
+ set_toolset("scsh", "$(env SC)", "swiftc")
+
+ -- on load
+ on_load(function (toolchain)
+ toolchain:set("scshflags", "")
+ toolchain:set("scldflags", "")
+ end)