diff options
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 |
