[Scons-users] Cyclic references between lib archives
Ivan Kravets
me at ikravets.com
Wed Feb 4 17:38:48 EST 2015
> On Feb 5, 2015, at 00:33, Dirk Bächle <tshortik at gmx.de> wrote:
>
> On 04.02.2015 23:20, Ivan Kravets wrote:
>>
>>> [...]
>>>
>> Hm... I don't like to change "core logic" in the 3-rd party tool, like SCons. I prefer to use "PUBLIC" access, without modifying "PRIVATE" field.
>> If I will modify "LINCOM" variable, then the only one working solution is add "cyclic" libs before _LIBFLAGS:
>> src.Prepend(
>> _LIBFLAGS="-Wl,--start-group $STATIC_LIBS -Wl,--end-group "
>> )
>>
>> This works good!
>>
>> Tell me please, is it safe way?
>>
>
> SCons is setting up an Environment for you with default values, and you're always free to change the available env vars afterwards. As long as it works for you, it's allowed. ;)
> If you're concerned about overwriting your "base" environment, either Clone() it and work on a copy (e.g. staticLibEnv = env.Clone()), or use the feature of appending variable overrides to your Builder call:
>
> env.Program('myexe', Glob('*.c'), _LIBFLAGS = '-Wl,--start-group $STATIC_LIBS -Wl,--end-group ' + env.subst('$_LIBFLAGS'))
>
>
> Dirk
I got you! Thanks a lot for the excellent tool and support!!!
With best regards, Ivan Kravets
- "Creativity comes from talent and never from knowledge" (c)
________________________
http://www.ikravets.com
More information about the Scons-users
mailing list