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

Rob Boehne robb at datalogics.com
Sat Dec 17 15:29:56 EST 2016


Thanks!  This lets me delete about 30 lines of problematic code and replaced it with TARGET_ARCH=xyz

From: Scons-users <scons-users-bounces at scons.org<mailto:scons-users-bounces at scons.org>> on behalf of Bill Deegan <bill at baddogconsulting.com<mailto:bill at baddogconsulting.com>>
Reply-To: SCons users mailing list <scons-users at scons.org<mailto:scons-users at scons.org>>
Date: Friday, December 16, 2016 at 7:44 PM
To: SCons users mailing list <scons-users at scons.org<mailto:scons-users at scons.org>>
Subject: Re: [Scons-users] set Windows environment for 32 or 64 bit x86 builds

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<mailto: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<mailto: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/20161217/c035c149/attachment.html>


More information about the Scons-users mailing list