Skip to content

Commit

Permalink
add check_sizeof in package
Browse files Browse the repository at this point in the history
  • Loading branch information
waruqi committed Mar 1, 2024
1 parent 6287c83 commit b3881c9
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions xmake/core/package/package.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b3881c9

Please sign in to comment.