[Scons-users] Surprising change in behaviour of createSharedLibBuilder

Mats Wichmann mats at wichmann.us
Tue Sep 21 10:49:36 EDT 2021


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?


More information about the Scons-users mailing list