Boost logo

Boost-Build :

From: Reece Dunn (msclrhd_at_[hidden])
Date: 2005-10-17 03:28:51


The IDE for msvc sets the /machine linker flag to the target machine
(X86, SH3, etc.) and also adds a define for the architecture being
compiled such as _AMD64_. This patch adds that support for BBv2.

- Reece
 --------------050901000200050204090508 Content-Type: text/plain;
name="msvc.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="msvc.diff"

Index: msvc.jam
===================================================================
RCS file: /cvsroot/boost/boost/tools/build/v2/tools/msvc.jam,v
retrieving revision 1.60
diff -u -r1.60 msvc.jam
--- msvc.jam 4 Oct 2005 14:32:05 -0000 1.60
+++ msvc.jam 17 Oct 2005 08:24:00 -0000
@@ -488,6 +488,11 @@

flags msvc.compile PDB_CFLAG <debug-symbols>on/<debug-store>database : /Fd ; # not used yet

+# CPU architecture:
+flags msvc.compile CFLAGS $(cpu-arch-i386) : /DX86 /D_X86_ ;
+flags msvc.compile CFLAGS $(cpu-arch-ia64) : /DIA64 /D_IA64_ ;
+flags msvc.compile CFLAGS $(cpu-arch-amd64) : /DAMD64 /D_AMD64_ ;
+
flags msvc.compile DEFINES <define> ;
flags msvc.compile UNDEFS <undef> ;
flags msvc.compile INCLUDES <include> ;
@@ -540,6 +545,11 @@

flags msvc LINKFLAGS <main-target-type>LIB/<link>shared : /DLL ;

+# CPU architecture:
+flags msvc LINKFLAGS $(cpu-arch-i386) : -machine:x86 ;
+flags msvc LINKFLAGS $(cpu-arch-ia64) : -machine:ia64 ;
+flags msvc LINKFLAGS $(cpu-arch-amd64) : -machine:amd64 ;
+
flags msvc.link USER_LINKFLAGS <linkflags> ;
flags msvc.link LINKPATH <library-path> ;

 --------------050901000200050204090508--


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk