[Scons-users] Advice sought

Bill Deegan bill at baddogconsulting.com
Sun Feb 8 15:26:18 EST 2015


Dominic,

So to simpify
1) You need to build a tool only on the host
2) you need this tool to be run only on the host
3) This tool generates source files which need to be built on both host and
target
4) ? these files are compiled into tools on both host and target?

-Bill

On Sun, Feb 8, 2015 at 11:28 AM, Dominic Binks <dominic.binks at thebinkles.net
> wrote:

> Sure.
>
> The file builds probably 200 files.  We use a couple of third party
> libraries which contribute most of this count.  I estimate about half will
> go to target, approximately half to host, and probably 10% that will go to
> both.
>
> VariantDirs may solve my problem, but I've not yet had a feel for how to
> make them work for it.  I had thought to do something like that but from
> what I've read on the wiki, to use VariantDir you need to map the source
> files to the variant.
>
> To be a little more specific to help you understand the current problem
> I'm facing we have a tool to help us understand what our code is doing on
> device.  This involves a simpole serialization protocol to support the
> exchange of data of our own design which produces a .c and .h that needs to
> be compiled for both target and host.  The tool itself is compiled for the
> host.
>
> There are also data preparation tools that only run on the host.  And a
> tool which can be used for testing which, if the target supports
> executables, can be compiled for both host and target.
>
> Currently the introspection tool does not build for Android.  It's
> possible I could fix that but it doesn't actually need to run on Android,
> only on a windows or linux/x86 host so there's not really much point in
> fixing.
>
> If you think VariantDirs can support what I need to do, I wonder if you'd
> be able to provide some kind of example I can study (or recast my current
> solution) and I can then see if VariantDirs will solve the problem.
>
> I'm not resisting making big changes to the build system but I would like
> to develop it so that it's easy to understand and maintain for the other
> developers on the team, if that means more work me, that's fine so long as
> I can get to a clear solution.
>
> Thanks for your help.
> Dominic
>
>
> On 08/02/2015 13:26, Dirk Baechle wrote:
>
>> Hi Dominic,
>>
>> Am 07.02.2015 um 22:16 schrieb Dominic Binks:
>>
>>> Hi all,
>>>
>>> I'm looking for some expert advice on how to go about implementing
>>> (well technically modifying) a build system to achieve a
>>> separated host and target build output.
>>>
>>> [...]
>>>
>>> The Android build system which is based on make has quite a clean way
>>> of doing this.  I imagined that VariantDir() would help me out
>>> here but reading more about it, it doesn't really do what I need.
>>>
>>>  can you be a little bit more specific about why VariantDirs aren't a
>> valid solution for you? It would also be interesting to know about how
>> many targets and source files we are talking about here (in rough
>> numbers). Are all source files compileable for both targets, so could
>> one possibly use VariantDirs to compile the basic Objects...and then, in
>> a separate SConscript, collect them together into the final executables
>> as needed for each target system?
>>
>> My first impression is that a good answer can only be given in relation
>> to your current build structure, so a few more infos would be helpful.
>>
>> Best regards,
>>
>> Dirk
>>
>> _______________________________________________
>> Scons-users mailing list
>> Scons-users at scons.org
>> https://pairlist4.pair.net/mailman/listinfo/scons-users
>>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20150208/20b47077/attachment.html>


More information about the Scons-users mailing list