summaryrefslogtreecommitdiff
path: root/xmake/core/sandbox/modules/utils.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2024-10-25 11:57:02 +0800
committerGitHub <[email protected]>2024-10-25 11:57:02 +0800
commit7a95d412fee5a670737068869b811d295f954cfd (patch)
treee1fbe36e6d50d451ec71237cfa2f2069fd7dde28 /xmake/core/sandbox/modules/utils.lua
parentdeb55641c247a86ed0321075977d9a067f73b00d (diff)
parent9ab3585df20a4b59e75675d86eb488154c0449e9 (diff)
Merge pull request #5762 from xmake-io/bin2c
Use native implementation to improve bin2c speed
Diffstat (limited to 'xmake/core/sandbox/modules/utils.lua')
-rw-r--r--xmake/core/sandbox/modules/utils.lua10
1 files changed, 10 insertions, 0 deletions
diff --git a/xmake/core/sandbox/modules/utils.lua b/xmake/core/sandbox/modules/utils.lua
index 42660d36e..9614e544b 100644
--- a/xmake/core/sandbox/modules/utils.lua
+++ b/xmake/core/sandbox/modules/utils.lua
@@ -148,6 +148,16 @@ 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
+end
+
-- return module
return sandbox_utils