[Scons-users] libraries which need associated flags
Bill Deegan
bill at baddogconsulting.com
Tue Sep 12 10:52:07 EDT 2017
If you don't list mpmcommon in LIBS and just add it to the LINKFLAGS, SCons
will not be aware of the dependency unless you explicitly add it using
Depends().
You could probably use '$BUILD_DIR/libmpmcommon.a' instead of env.get(...
For now there is no supported way to do what you've accomplished with
LINKFLAGS.
That said, this problem has been raised many times and you can likely find
the discussion in the users mailing list archives.
Certainly this is some functionality which needs to be added. (As always
pull requests are welcome, but for now hold off until the switch to github)
Hope that helps!
-Bill
On Tue, Sep 12, 2017 at 10:38 AM, Mats Wichmann <mats at wichmann.us> wrote:
>
> If a library needs some flags to go with it, and those flags have to
> stay together with the library, it can't go into LIBS which is "smart"
> so we end up with stuff like this:
>
> env.AppendUnique(LINKFLAGS=[
> '-Wl,--whole-archive',
> env.get('BUILD_DIR') + 'libmpmcommon.a',
> '-Wl,-no-whole-archive',
> ])
>
> Is that the best way to handle this? (please ignore the local oddity of
> this project of fiddling with BUILD_DIR instead of setting LIBPATH).
> This seems to not be tracking dependencies correctly... scons doesn't
> seem to know the target depends on the library, although I may be
> reading that wrong.
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20170912/9d70a146/attachment.html>
More information about the Scons-users
mailing list