Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r51013 - trunk/tools/build/v2/tools
From: juergen.hunold_at_[hidden]
Date: 2009-02-04 14:14:02


Author: jhunold
Date: 2009-02-04 14:14:01 EST (Wed, 04 Feb 2009)
New Revision: 51013
URL: http://svn.boost.org/trac/boost/changeset/51013

Log:
Apply patch from Alexey Pakhunov for improved msvc assembler support.
Fixes https://zigzag.lvk.cs.msu.su:7813/boost.build/ticket/214

Text files modified:
   trunk/tools/build/v2/tools/msvc.jam | 24 ++++++++++++++++++++----
   1 files changed, 20 insertions(+), 4 deletions(-)

Modified: trunk/tools/build/v2/tools/msvc.jam
==============================================================================
--- trunk/tools/build/v2/tools/msvc.jam (original)
+++ trunk/tools/build/v2/tools/msvc.jam 2009-02-04 14:14:01 EST (Wed, 04 Feb 2009)
@@ -296,14 +296,13 @@
 
 # For the assembler the following options are turned on by default:
 #
-# -coff generate COFF format object file (compatible with cl.exe output)
 # -Zp4 align structures to 4 bytes
 # -Cp preserve case of user identifiers
 # -Cx preserve case in publics, externs
 #
 actions compile.asm
 {
- $(.ASM) -nologo -c -coff -Zp4 -Cp -Cx $(USER_ASMFLAGS) -Fo "$(<:W)" "$(>:W)"
+ $(.ASM) -c -Zp4 -Cp -Cx -D$(DEFINES) $(ASMFLAGS) $(USER_ASMFLAGS) -Fo "$(<:W)" "$(>:W)"
 }
 
 
@@ -852,8 +851,13 @@
         resource-compiler = [ feature.get-values <resource-compiler> : $(options) ] ;
         resource-compiler ?= rc ;
 
+ # Turn on some options for i386 assembler
+ # -coff generate COFF format object file (compatible with cl.exe output)
+ local default-assembler-amd64 = ml64 ;
+ local default-assembler-i386 = "ml -coff" ;
+ local default-assembler-ia64 = ias ;
+
         assembler = [ feature.get-values <assembler> : $(options) ] ;
- assembler ?= ml ;
 
         idl-compiler = [ feature.get-values <idl-compiler> : $(options) ] ;
         idl-compiler ?= midl ;
@@ -880,9 +884,12 @@
                 }
             }
 
+ local cpu-assembler = $(assembler) ;
+ cpu-assembler ?= $(default-assembler-$(c)) ;
+
             toolset.flags msvc.compile .CC $(cpu-conditions) : $(setup-$(c))$(compiler) /Zm800 -nologo ;
             toolset.flags msvc.compile .RC $(cpu-conditions) : $(setup-$(c))$(resource-compiler) ;
- toolset.flags msvc.compile .ASM $(cpu-conditions) : $(setup-$(c))$(assembler) ;
+ toolset.flags msvc.compile .ASM $(cpu-conditions) : $(setup-$(c))$(cpu-assembler) -nologo ;
             toolset.flags msvc.link .LD $(cpu-conditions) : $(setup-$(c))$(linker) /NOLOGO /INCREMENTAL:NO ;
             toolset.flags msvc.archive .LD $(cpu-conditions) : $(setup-$(c))$(linker) /lib /NOLOGO ;
             toolset.flags msvc.compile .IDL $(cpu-conditions) : $(setup-$(c))$(idl-compiler) ;
@@ -1119,6 +1126,15 @@
     # Declare flags for the assembler.
     toolset.flags msvc.compile.asm USER_ASMFLAGS <asmflags> ;
 
+ toolset.flags msvc.compile.asm ASMFLAGS <debug-symbols>on : "/Zi /Zd" ;
+
+ toolset.flags msvc.compile.asm ASMFLAGS <warnings>on : /W3 ;
+ toolset.flags msvc.compile.asm ASMFLAGS <warnings>off : /W0 ;
+ toolset.flags msvc.compile.asm ASMFLAGS <warnings>all : /W4 ;
+ toolset.flags msvc.compile.asm ASMFLAGS <warnings-as-errors>on : /WX ;
+
+ toolset.flags msvc.compile.asm DEFINES <define> ;
+
     # Declare flags for linking.
     {
         toolset.flags msvc.link PDB_LINKFLAG <debug-symbols>on/<debug-store>database : /PDB: ; # not used yet


Boost-Commit 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