I think there are two points here:

The first one is that the scons mslink action is:

shlibLinkAction = SCons.Action.Action('${TEMPFILE("$SHLINK $SHLINKFLAGS 
$_SHLINK_TARGETS $_LIBDIRFLAGS $_LIBFLAGS $_PDB $_SHLINK_SOURCES", 
"$SHLINKCOMSTR")}', '$SHLINKCOMSTR')

I have to look, but the idea that the default link action should use $TEMPFILE 
I would think is a great idea. I don’t believe it is. We have this in Parts as 
when I was at Intel, Vtune had some long link lines, even in Linux  land. I 
could do this common command easier in Parts then can be done in SCons for 
another reason which is that SCons does not support PDB like files on 
non-windows system. We have actions to make a PDB like file for posix systems 
in Parts, so the user can separate the debug info from the binary. Given SCons 
does not have this, SCons cannot do the SCons.Action.Action('$SHLINKACTION') 
suggestion.

The second point is that a common theme I have seen with linking on all 
platforms is the need to have certain special libs at the end of the link line, 
after everything else. This patch is trying to suggest we add to the mslink 
case ( however I would push this globally myself) to allow normal $LIBS to be 
added as is, but for the special $POSTLIB like var that need to do the funky 
linking stuff to override functions in the other libs.

Given that I have had this issue a lot, and the “solution” on the web is to 
override the whole link actions with your own string. I think it would be 
useful for this to be a feature in the out of box tools. If you find this 
agreeable I would like input on the var name so we can have a common value for 
both SCons and Parts

Jason


From: Scons-dev [mailto:[email protected]] On Behalf Of Bill Deegan
Sent: Friday, February 24, 2017 12:15 PM
To: SCons developer list <[email protected]>
Subject: Re: [Scons-dev] I have a pull request Parts I think we might want to 
sync with SCons

Jason,
Interesting.
Seems like the patch could be avoided if the string provided

-shlibLinkAction = SCons.Action.Action('${TEMPFILE("$SHLINK $SHLINKFLAGS 
$_SHLINK_TARGETS $_LIBDIRFLAGS $_LIBFLAGS $_PDB $_SHLINK_SOURCES")}')

was something like:

-shlibLinkAction = SCons.Action.Action('$SHLINKACTION')


That would allow the user to do this independent of the tool's code?

_Bill

On Fri, Feb 24, 2017 at 8:41 AM, Jason Kenny 
<[email protected]<mailto:[email protected]>> wrote:

Hi guy,

I have a pull request for mslink.py tool in Parts that I think is an issue we 
would want as a general solution for linking on the tools that deal with 
linking in SCons

The request is here:
https://bitbucket.org/sconsparts/parts/pull-requests/17/introduced-sh-linktrailflags-to-mslinkpy/diff

I would like to your guys option on the matter. Given you think you like the 
idea in general, do you like the value being used? If we would like to sync 
this change, I think we would want to keep a common value between Parts and 
SCons to help the users.

Thanks
Jason

_______________________________________________
Scons-dev mailing list
[email protected]<mailto:[email protected]>
https://pairlist2.pair.net/mailman/listinfo/scons-dev

_______________________________________________
Scons-dev mailing list
[email protected]
https://pairlist2.pair.net/mailman/listinfo/scons-dev

Reply via email to