summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2024-07-11 00:57:48 +0800
committerruki <[email protected]>2024-07-11 00:57:48 +0800
commitff1692e1c69914ad794e793dfbee97e369cdfb55 (patch)
tree85cb76582f8dbb4fc39a3851335fb51da3d8c062
parent46952b01a1f8b8e0dc8b68f4b5228ed2f466aa39 (diff)
check links for package library
-rw-r--r--xmake/core/package/package.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/xmake/core/package/package.lua b/xmake/core/package/package.lua
index 092ba3477..31b402174 100644
--- a/xmake/core/package/package.lua
+++ b/xmake/core/package/package.lua
@@ -2397,6 +2397,14 @@ function _instance:_generate_build_configs(configs, opt)
configs.ldflags = nil
configs.shflags = nil
end
+
+ -- check links for library
+ if self:is_library() and not self:is_headeronly() then
+ local links = table.wrap(configs.links)
+ if #links == 0 then
+ os.raise("package(%s): links not found!", self:name())
+ end
+ end
return configs
end