premake / premake/premake-core

'links' doesn't follow dependency on static libs projects

Open
#627 17 comments 7 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
C
Stars
3.6k
Forks
654
Avg merge
1d 1h
Merged PRs (30d)
13

Description

project "A"
  kind "StaticLib"
...
project "B"
  kind "StaticLib"
  links {"A"}
...
project "C"
  kind "StaticLib"
  links {"B"}

project "App"
  kind "ConsoleApp
  links {"C"} --> not going to be built, since B and A are not included

When there is links dependency on another project, which is a static lib, premake should include all the static lib dependencies of that as well. Otherwise user has to include all of them explicitly in the resulting app or DLL. ( links {"C", "A", "B"} for the App in the example above) Which is troublesome, since the list of libs might be conditional (platform dependent, for example) and user will have to copy/paste the conditions several times over.
Note, this isn't a problem for dlls, only for static libraries. Since dll has all it's dependencies built in already.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the A→B→C→App static-library example in issue #627 and trace how project links are resolved. The payload names no files or tests; done means an App linking only C also includes the transitive static-library dependencies A and B, without requiring duplicate conditional link lists.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, lua
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.