-
-
Notifications
You must be signed in to change notification settings - Fork 422
Description
We have several variants of libcommon*.la binaries used by NUT programs that only care about string methods, or NUT client, or Windows specifics (or also version data/methods, if #2097 / #2583 approach follows through). Many of these overlap with the source files used.
Currently they are built from same code independently, to provide different profiles and quicker linkings, and to allow for smaller/quicker (re-)builds of partial NUT codebase.
This task is about revising if they all use same CFLAGS etc. (maybe the Windows one does not?) and if they can be built on top of each other instead of independent binaries (so a change of certain source files would not require compilation of 3-4 object files, but would suffice to build one .o, one .la, and relink other .la's on top of it).
It is also an option to produce independent .la collections of objects with non-overlapping sources and no dependency on each other (if possible), to list them as direct link dependencies for ultimate programs and shared/static object libraries. This should also constrain the rebuild avalanches to only the binaries that are impacted by some source code change, ultimately producing just one object/la file per change.
UPDATE: Following changes in #3251 a new idea came up along these lines - see if we can refactor common-nut_version.c to pre-calculate the strings we issue (release/dev/prerelease-since, etc.) as macro strings, so we do not link a lot of logic to do this at run-time and come up with predictable results into each program. That would minimize the footprint upon delivery, probably both for shared and static "libnutprivate" builds.