[Scons-users] set Windows environment for 32 or 64 bit x86 builds

Bill Deegan bill at baddogconsulting.com
Fri Dec 16 20:44:24 EST 2016


Rob,

Look at TARGET_ARCH and TARGET_HOST in the manpage.
In your case (Windows & msvc I'm assuming) TARGET_ARCH will set the
appropriate flags.

For other platforms/compilers you'll have to set the appropriate flags (see
Jason's response), if gcc it's basically -m32 -m64.
Though you may want to add other flags to set -march if you have a limited
set of target cpus.

-Bill
Co-Manager, SCons project

On Fri, Dec 16, 2016 at 1:19 PM, Rob Boehne <robb at datalogics.com> wrote:

> All,
>
> I’ve inherited a complicated cross-platform build in SCons, involving
> swig, C++, C# and Java.   On all platforms but windows, it uses a
> command-line argument to the compiler to generate code for 64-bit or
> 32-bit.  Under windows however, it runs the “vcvarsall.bat” with the
> appropriate argument, and then goes through some machinations to get the
> variables it sets into the scons environment.
>
> Is this even a little bit necessary?  What is the canonical method for
> specifying 32 or 64-bit code generation?
>
> Thanks
>
> Robert Boehne
>
> _______________________________________________
> 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/20161216/19230a67/attachment.html>


More information about the Scons-users mailing list