[Scons-dev] Subst API...

Kenny, Jason L jason.l.kenny at intel.com
Mon Oct 1 18:32:12 EDT 2012


I am looking at how we can clean up the subst API. Part of this was pushed that Subst API has a few issues.

1) we can't do a ${xyz(${ABC}}
2) the subst code does not in general handle the subst calls that return lists of items. Ie I want to say env.append("$POSTLIBS") where post list is equal to a list of libraries
a) this leads to an issue in Parts where I am trying to do some basic lib (topological) sorting between dependent components. This really gets messed up for some prototype tools being worked on. Fixing this seems to be a need to expand the items with a subst_list before the basic logic takes over to do what it does, however I trying to see what can be done to allow for a more efficient lazy eval of these values.

I am under the belief still that the subst API can be cleaned up a bit.. with changes to the scanners to use the api better. However I hitting a number of road blocks that seem to be a result of fine tuning of the subst code for a gcc toolchain. Before I can fix these issues I need to understand why they exist. As you are helping me getting my head around certain details it will be much easier for me to propose an alternative that I would hope is transparent to most users.


>>

SCons isn't just about building portable binaries. We get asked all the time how to make sure the linker uses a static or dynamic lib; it's not really possible in SCons (in general) without passing Nodes through unmodified.

>>


I am a bit surprised by this statement.. it seems that making code build in a cross platform ways is the point of using SCons vs Make or some other build system. I admit we had talked about some tweaks to make it easier to say link with this lib statically vs dynamically. This work has not been done yet, and I don't think it prevent common cases from working well which on a gnu tool chain is to have a lib and libpath setup. I have products here mixing some combination 50 to 100 .a or .so files. Yes I have a feature request as well for better control over how a given library can be linked. However we are doing it today with Scons and Parts.. so I don't see this as not being possible in SCons.. it currently is just harder than it should be.

Jason


More information about the Scons-dev mailing list