diff options
| author | ruki <[email protected]> | 2024-10-25 22:51:06 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2024-10-25 22:51:06 +0800 |
| commit | 82c5c02fdf20a93ef3073f475b6c449dd7cba24b (patch) | |
| tree | b63d25b677e5e95285960f99dec1b7652ff732da | |
| parent | 1386ddfe46cce6d32c77eddd7faae6d7dfb182c8 (diff) | |
detect native bin2c
| -rw-r--r-- | xmake/core/sandbox/modules/utils.lua | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/xmake/core/sandbox/modules/utils.lua b/xmake/core/sandbox/modules/utils.lua index 220d95ec5..9614e544b 100644 --- a/xmake/core/sandbox/modules/utils.lua +++ b/xmake/core/sandbox/modules/utils.lua @@ -149,10 +149,12 @@ function sandbox_utils.assert(value, format, ...) end -- generate c/c++ code from the binary file -function sandbox_utils.bin2c(binaryfile, outputfile, opt) - local ok, errors = utils.bin2c(binaryfile, outputfile, opt) - if not ok then - os.raise(errors) +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 |
