diff options
| author | ruki <[email protected]> | 2026-02-10 23:48:02 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2026-02-10 23:48:02 +0800 |
| commit | 83f17e9557c971690a276ff93a5b65d66eba709d (patch) | |
| tree | 2fd238f7864ea17b733749564aae46cd078c1888 /xmake/core/package/package.lua | |
| parent | ee98b61be7054e1b8b8e2668b67c662ba12e264b (diff) | |
keep package source
Diffstat (limited to 'xmake/core/package/package.lua')
| -rw-r--r-- | xmake/core/package/package.lua | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/xmake/core/package/package.lua b/xmake/core/package/package.lua index 692be9ae8..4ca402cdf 100644 --- a/xmake/core/package/package.lua +++ b/xmake/core/package/package.lua @@ -662,6 +662,24 @@ function _instance:is_debug() return self:config("debug") or self:config("asan") end +-- should keep package source code after installing? +function _instance:has_source() + if self:is_debug() then + return true + end + if self:is_source_embed() then + return true + end + local project = package._project() + if project and project.policy("package.keep_source") then + return true + end + if self:policy("package.keep_source") then + return true + end + return false +end + -- is the supported package? function _instance:is_supported() -- attempt to get the install script with the current plat/arch |
