diff options
| author | ruki <[email protected]> | 2024-03-02 00:40:36 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2024-03-02 00:40:36 +0800 |
| commit | b3881c9439676dd72c88b62171ce2da7575e17f9 (patch) | |
| tree | 5d233aa7cb7b9a236f2358adb452951bbc2a3f9a | |
| parent | 6287c83ac103dda3b3b977f18dc21ac382580033 (diff) | |
add check_sizeof in package
| -rw-r--r-- | xmake/core/package/package.lua | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/xmake/core/package/package.lua b/xmake/core/package/package.lua index 9ef2abfe6..836bb22a5 100644 --- a/xmake/core/package/package.lua +++ b/xmake/core/package/package.lua @@ -2438,6 +2438,19 @@ function _instance:has_features(features, opt) return sandbox_module.import("core.tool.compiler", {anonymous = true}).has_features(features, opt) end +-- check the size of type +-- +-- @param typename the typename +-- @param opt the argument options, e.g. {includes = "xxx.h", configs = {defines = ""}} +-- +-- @return the type size +-- +function _instance:check_sizeof(typename, opt) + opt = opt or {} + opt.target = self + return sandbox_module.import("lib.detect.check_sizeof", {anonymous = true})(typename, opt) +end + -- check the given c snippets? -- -- @param snippets the snippets |
