diff options
Diffstat (limited to 'xmake/modules/utils')
| -rw-r--r-- | xmake/modules/utils/symbols/depend.lua | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/xmake/modules/utils/symbols/depend.lua b/xmake/modules/utils/symbols/depend.lua new file mode 100644 index 000000000..33cc821e5 --- /dev/null +++ b/xmake/modules/utils/symbols/depend.lua @@ -0,0 +1,38 @@ +--!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 depend.lua +-- + +-- imports +import("core.base.option") +import("lib.detect.find_tool") + +function _get_all_depends_by_dumpbin(binaryfile, opt) + local dumpbin = find_tool("dumpbin") + if dumpbin then + local depends = try { function () return os.iorunv(dumpbin.program, {"/dependent", "/nologo", objectfile}) end } + end +end + +function main(binaryfile, opt) + local depends + if is_host("windows") then + depends = _get_all_depends_by_dumpbin(binaryfile, opt) + end + return depends +end |
