[Scons-users] libraries which need associated flags

Mats Wichmann mats at wichmann.us
Tue Sep 12 10:38:17 EDT 2017


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.



More information about the Scons-users mailing list