diff options
| author | ruki <[email protected]> | 2023-07-10 23:04:10 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2023-07-10 23:04:10 +0800 |
| commit | 7bd90133902bc03bbc6b10f20a6aa7149f626caa (patch) | |
| tree | eb96182a1203e31151580778bd6962e451a5801a | |
| parent | 156be4bc270fe164e15693389c83277b4e49c195 (diff) | |
add has_flags for swift-frontend
| -rw-r--r-- | xmake/modules/detect/tools/swift_frontend/has_flags.lua | 22 | ||||
| -rw-r--r-- | xmake/modules/detect/tools/swiftc/has_flags.lua | 1 | ||||
| -rw-r--r-- | xmake/toolchains/swift/xmake.lua | 2 |
3 files changed, 23 insertions, 2 deletions
diff --git a/xmake/modules/detect/tools/swift_frontend/has_flags.lua b/xmake/modules/detect/tools/swift_frontend/has_flags.lua new file mode 100644 index 000000000..4af0d592f --- /dev/null +++ b/xmake/modules/detect/tools/swift_frontend/has_flags.lua @@ -0,0 +1,22 @@ +--!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 Source Group. +-- +-- @author ruki +-- @file has_flags.lua +-- + +-- imports +inherit("detect.tools.swiftc.has_flags") diff --git a/xmake/modules/detect/tools/swiftc/has_flags.lua b/xmake/modules/detect/tools/swiftc/has_flags.lua index fc4ff6540..99b36de75 100644 --- a/xmake/modules/detect/tools/swiftc/has_flags.lua +++ b/xmake/modules/detect/tools/swiftc/has_flags.lua @@ -23,7 +23,6 @@ import("core.cache.detectcache") -- try running function _try_running(...) - local argv = {...} local errors = nil return try { function () os.runv(table.unpack(argv)); return true end, catch { function (errs) errors = (errs or ""):trim() end }}, errors diff --git a/xmake/toolchains/swift/xmake.lua b/xmake/toolchains/swift/xmake.lua index 1d9d1279b..2dec302bf 100644 --- a/xmake/toolchains/swift/xmake.lua +++ b/xmake/toolchains/swift/xmake.lua @@ -26,7 +26,7 @@ toolchain("swift") set_description("Swift Programming Language Compiler") -- set toolset - set_toolset("sc", "$(env SC)", "swiftc") + set_toolset("sc", "$(env SC)", "swift-frontend", "swiftc") set_toolset("scld", "$(env SC)", "swiftc") set_toolset("scsh", "$(env SC)", "swiftc") |
