summaryrefslogtreecommitdiff
path: root/xmake/core/package/package.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/core/package/package.lua')
-rw-r--r--xmake/core/package/package.lua13
1 files changed, 13 insertions, 0 deletions
diff --git a/xmake/core/package/package.lua b/xmake/core/package/package.lua
index 95ee2a01b..81efad731 100644
--- a/xmake/core/package/package.lua
+++ b/xmake/core/package/package.lua
@@ -2679,6 +2679,19 @@ function _instance:check_sizeof(typename, opt)
return sandbox_module.import("lib.detect.check_sizeof", {anonymous = true})(typename, opt)
end
+-- check the aligment of type
+--
+-- @param typename the typename
+-- @param opt the argument options, e.g. {includes = "xxx.h", configs = {defines = ""}}
+--
+-- @return the type alignment
+--
+function _instance:check_alignof(typename, opt)
+ opt = opt or {}
+ opt.target = self
+ return sandbox_module.import("lib.detect.check_alignof", {anonymous = true})(typename, opt)
+end
+
-- check the given c snippets?
--
-- @param snippets the snippets