diff options
| author | ruki <[email protected]> | 2025-05-09 10:23:17 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-05-09 10:23:17 +0800 |
| commit | accf9cdc27b899d8cbece2987408986c1e0d2378 (patch) | |
| tree | 5ef3e52d23d0e931523e58d513477fc7a74f1f74 /xmake/modules/detect | |
| parent | 0d2657c847d01fda61cac80c5a26d02ebe70cab2 (diff) | |
| parent | 9c61177d07db0b9740833d334b80d08aac1c6e2c (diff) | |
Merge pull request #6410 from star-hengxing/llvm-dlltool
Add llvm-dlltool support
Diffstat (limited to 'xmake/modules/detect')
| -rw-r--r-- | xmake/modules/detect/tools/find_llvm_dlltool.lua | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/xmake/modules/detect/tools/find_llvm_dlltool.lua b/xmake/modules/detect/tools/find_llvm_dlltool.lua new file mode 100644 index 000000000..2933844a9 --- /dev/null +++ b/xmake/modules/detect/tools/find_llvm_dlltool.lua @@ -0,0 +1,50 @@ +--!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 find_llvm_dlltool.lua +-- + +import("lib.detect.find_program") +import("lib.detect.find_programver") + +-- find llvm-dlltool +-- +-- @param opt the argument options, e.g. {version = true} +-- +-- @return program, version +-- +-- @code +-- +-- local dlltool = find_llvm_dlltool() +-- +-- @endcode +-- +function main(opt) + opt = opt or {} + -- return with non-zero code + opt.norun = true + + -- find program + local program = find_program(opt.program or "llvm-dlltool", opt) + + -- find program version + local version = nil + if program and opt.version then + version = find_programver(program, opt) + end + return program, version +end |
