diff options
| -rw-r--r-- | xmake/core/package/package.lua | 8 |
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 |
