@@ -159,7 +159,7 @@ local import_filter = {}
159
159
end
160
160
161
161
local function recursiveLinkDependencies (ctx , deps )
162
- for name ,value in sortedpairs (deps ) do
162
+ for name , value in sortedpairs (deps ) do
163
163
local filter = nil
164
164
if type (value ) == ' table' then
165
165
filter = __createFilter (value )
@@ -209,8 +209,18 @@ local import_filter = {}
209
209
end
210
210
end
211
211
212
+ -- we don't want static libs with links.
213
+ if ctx .links and next (ctx .links ) and ctx .kind == p .STATICLIB then
214
+ local prjname = iif (ctx .project , ctx .project .name , ctx .name )
215
+ p .warnOnce (prjname .. ' l' , " The project '" .. prjname .. " ' is a static library, but uses 'links', for buildorder use 'dependson'." )
216
+ end
217
+
212
218
-- resolve package links.
213
- if ctx .linkdependencies then
219
+ if ctx .linkdependencies and next (ctx .linkdependencies ) then
220
+ if ctx .kind == p .STATICLIB then
221
+ local prjname = iif (ctx .project , ctx .project .name , ctx .name )
222
+ p .warnOnce (prjname .. ' d' , " The project '" .. prjname .. " ' is a static library, but uses 'use/linkdependencies'." )
223
+ end
214
224
recursiveLinkDependencies (ctx , ctx .linkdependencies )
215
225
end
216
226
0 commit comments