diff options
| author | ruki <[email protected]> | 2025-12-07 21:31:25 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-12-07 21:31:25 +0800 |
| commit | 4e4b28eb4cad79cc4df5fca887b4f4b709f2b211 (patch) | |
| tree | 8e9d3cf29071bf65d3b0a097deadabe25245cacf /xmake/core/sandbox/modules/utils.lua | |
| parent | 40d790cf416c8677c51a8e969d421e85c25a019b (diff) | |
| parent | 8e3cc0092d8e356c6387aee941825cf66615541c (diff) | |
Merge pull request #7103 from xmake-io/bin2obj
Add bin2obj rule, will be faster than bin2c
Diffstat (limited to 'xmake/core/sandbox/modules/utils.lua')
| -rw-r--r-- | xmake/core/sandbox/modules/utils.lua | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/xmake/core/sandbox/modules/utils.lua b/xmake/core/sandbox/modules/utils.lua index 88ccd6bac..df90492be 100644 --- a/xmake/core/sandbox/modules/utils.lua +++ b/xmake/core/sandbox/modules/utils.lua @@ -26,6 +26,7 @@ local colors = require("base/colors") local option = require("base/option") local log = require("base/log") local deprecated = require("base/deprecated") +local binutils = require("base/binutils") local try = require("sandbox/modules/try") local catch = require("sandbox/modules/catch") local vformat = require("sandbox/modules/vformat") @@ -148,14 +149,10 @@ function sandbox_utils.assert(value, format, ...) return value end --- generate c/c++ code from the binary file -if utils._bin2c then - function sandbox_utils.bin2c(binaryfile, outputfile, opt) - local ok, errors = utils.bin2c(binaryfile, outputfile, opt) - if not ok then - os.raise(errors) - end - end +-- generate c/c++ code from the binary file (deprecated, use binutils.bin2c instead) +function sandbox_utils.bin2c(binaryfile, outputfile, opt) + deprecated.add("binutils.bin2c", "utils.bin2c") + return binutils.bin2c(binaryfile, outputfile, opt) end -- return module |
