Re: Surprising change in behaviour of createSharedLibBuilder

Mats Wichmann <[email protected]>
Newsgroups gmane.comp.programming.tools.scons.user
Message-ID <[email protected]>
On 9/20/21 02:55, Steve Hill (Wireless) via Scons-users wrote:
> Hi,
> 
> I’ve just started the process of upgrading from SCons 3.1.2 to 4.2.0 and 
> some of our Tools have been broken by a change that I find surprising.
> 
> Where we define a ShLib builder, we define $SHLIBPREFIX and 
> $SHLIBSUFFIX, amongst other things, before calling 
> createSharedLibBuilder(env).
> 
> Moving to 4.2.0, this resulted in the prefix still being honoured, while 
> the suffix was not. By default, the builder now takes $SHLIBPREFIX and 
> $_SHLIBSUFFIX. Could someone explain the reason for the new asymmetry?
> 
> Is the preferred solution to add the optional argument 
> (SCons.Tool.createSharedLibBuilder(env, "$SHLIBSUFFIX")) or to change 
> our Tools to define $_SHLIBSUFFIX instead of $SHLIBSUFFIX?

Well, this is Bill's area specifically, but you should at least be able 
to _try_ what you suggest - passing the suffix.  I'd probably do it as a 
kwarg for clarity:

SCons.Tool.createSharedLibBuilder(env, shlib_suffix="$SHLIBSUFFIX")

I recall when this change went in and I'm a little surprised that since 
the new construction variable is surfaced, it's not documented. Maybe we 
ought to add something for _SHLIBSUFFIX since it's added to the env by 
all the linker tools except mslink? Or maybe not... Bill?
_______________________________________________
Scons-users mailing list
[email protected]
https://pairlist4.pair.net/mailman/listinfo/scons-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.