summaryrefslogtreecommitdiff
path: root/xmake/core/package/package.lua
diff options
context:
space:
mode:
authorKaruro Chari <[email protected]>2026-05-22 11:47:53 +0100
committerKaruro Chari <[email protected]>2026-05-22 11:47:53 +0100
commitaff68423976e2c8a4feb97f19edf6716d271f0f0 (patch)
treee54ebc32e6e35d2d6cccc20a5474c67a4b98489d /xmake/core/package/package.lua
parent1abc5af91f5c4eed1fadd7ad758bfd82a4a8be77 (diff)
Introduced alignof support like the one for check_sizeof
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