[Scons-dev] Patch to add support for intel c compiler

Kenny, Jason L jason.l.kenny at intel.com
Wed Apr 16 10:17:44 EDT 2014


The way the tool setting stuff work is to get the environment information needed to run the tool. The logic for the tool itself is largely unchanged.

For example a tool such as the intelc tool looks like:

def generate(env):
parts.tools.IntelCommon.Intelc.MergeShellEnv(env)
… all the other variable setup

Or in the case of gcc it looks like:

def generate(env):
"""Add Builders and construction variables for gcc to an Environment."""
parts.tools.cc.generate(env)

# set up shell env for running compiler
parts.tools.GnuCommon.gcc.MergeShellEnv(env)
env['CC'] = parts.tools.Common.toolvar(env['GCC']['TOOL'],('gcc','gnu'), env = env)


So as long as the support code is there it should work. It is not a 100% drop in that Parts provides a reporting/printing API for all text that is outputted. This is part of what I wrote a document to a month or two ago for Anatoly for to look at the streaming issues. There is also use of a version object which would be needed ( this should be a safe drop in to Scons) Given that I don’t think it should be that big of a deal. The messages I do have in the code can be removed to not use the part.api.output api stuff. Certain features such as --toolchain in Parts would not work in Scons without extra code to map this logic, but the variable I define should work fine. Oh I think the only issue would be that I have a SystemPlatform object to control host and target platforms for cross builds. This is a general improvement over what SCons has, and sort of got added for the MSVC tool with the HOST_OS/ARCH and TARGET_OS/ARCH stuff many years ago. If anything this would be the main problem I would see to fix in SCons first to make it easy to get add the toolsetting and related objects into SCons from Parts.

Jason


From: scons-dev-bounces at scons.org [mailto:scons-dev-bounces at scons.org] On Behalf Of Gary Oberbrunner
Sent: Wednesday, April 16, 2014 8:49 AM
To: SCons developer list
Subject: Re: [Scons-dev] Patch to add support for intel c compiler



On Wed, Apr 16, 2014 at 9:36 AM, Kenny, Jason L <jason.l.kenny at intel.com<mailto:jason.l.kenny at intel.com>> wrote:
FYI,

If we could get code I have in Parts for toolsetting added to Scons it would help make this easier. Parts supports Intelc to 14 officially ( 15 beta should still work) and supports Phi card cross builds as well as support of which gcc version or cl version to use. Last time I looked at Scons version it was a complex file that hard to maintain.

That's for sure. Intel has changed where the files are installed and how the registry is used to find them quite frequently. I basically gave up after a while; we use the Intel compiler at work but we just have a tool that hard-codes everything for the version(s) we use.

Last time I looked at the tool stuff from parts, though, it was also quite complex and didn't seem like it could be dropped in without changing SCons behavior. Is that still true?


Still I can look at the patch.

Thanks!

--
Gary
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://two.pairlist.net/pipermail/scons-dev/attachments/20140416/c2af4539/attachment.htm>


More information about the Scons-dev mailing list