[Scons-users] Building mixed architectures with SCons on Windows with VisualStudio

Gary Oberbrunner garyo at oberbrunner.com
Tue Aug 4 11:34:10 EDT 2015


It's totally doable.  Just use separate Environments, something like this
(untested):

env_64 = Environment(tools=['default', 'msvc'],
                  TARGET_ARCH = 'amd64')
env_32 = Environment(tools=['default', 'msvc'],
                  TARGET_ARCH = 'x86')

and of course make sure to build into different Variant dirs to avoid
filename conflicts.


On Tue, Aug 4, 2015 at 11:22 AM, <mg at ncp-e.com> wrote:

> Hi,
>
> I'd like to build x86 and amd64 binaries in one build run with SCons
> under Windows using Visual Studio.
>
> I've done something similar under Linux to support a host and a target
> toolchain.  This was rather simple, just using a different Environment
> with some changed variables for CC and so on.
>
> On Windows things seem much more complicated. The MSVC detection in
> SCons seems to be a global thing that only runs once. Also the visual
> studio requires a bunch of environment variables and what not to
> working correctly.
>
> Building for both architectures is required partly due to limitations
> in third party products and because we want to ship combined installers
> that can install both x86 and amd64 versions of the software.
>
> Does anyone have suggestions on how to get this smartly done in SCons?
>
> Kind regards
>
> Matthias
>
> --
> Matthias Gerstner, Dipl.-Wirtsch.-Inf. (FH)
> Entwicklung
>
> NCP engineering GmbH
> Dombühler Straße 2, D-90449, Nürnberg
> Geschäftsführer Peter Söll, HRB-Nr: 77 86 Nürnberg
>
> Telefon: +49 911 9968-153, Fax: +49 911 9968-229
> E-Mail: Matthias.Gerstner at ncp-e.com
> Internet: http://www.ncp-e.com
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
>


-- 
Gary
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20150804/0bebcf44/attachment.html>


More information about the Scons-users mailing list