diff options
| author | Karuro Chari <[email protected]> | 2026-05-22 11:47:53 +0100 |
|---|---|---|
| committer | Karuro Chari <[email protected]> | 2026-05-22 11:47:53 +0100 |
| commit | aff68423976e2c8a4feb97f19edf6716d271f0f0 (patch) | |
| tree | e54ebc32e6e35d2d6cccc20a5474c67a4b98489d /xmake/core/project/target.lua | |
| parent | 1abc5af91f5c4eed1fadd7ad758bfd82a4a8be77 (diff) | |
Introduced alignof support like the one for check_sizeof
Diffstat (limited to 'xmake/core/project/target.lua')
| -rw-r--r-- | xmake/core/project/target.lua | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/xmake/core/project/target.lua b/xmake/core/project/target.lua index 6861ba2e6..03891563b 100644 --- a/xmake/core/project/target.lua +++ b/xmake/core/project/target.lua @@ -2994,6 +2994,19 @@ function _instance:check_sizeof(typename, opt) return sandbox_module.import("lib.detect.check_sizeof", {anonymous = true})(typename, opt) end +-- check the alignment 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:_checked_target() + return sandbox_module.import("lib.detect.check_alignof", {anonymous = true})(typename, opt) +end + -- check the endianness of compiler -- -- @param opt the argument options, e.g. {includes = "xxx.h", configs = {defines = ""}} |
