--- msvc.jam (revision 50869) +++ msvc.jam (patch msvc_asm level 1) @@ -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,11 @@ resource-compiler = [ feature.get-values : $(options) ] ; resource-compiler ?= rc ; + local default-assembler-amd64 = ml64 ; + local default-assembler-i386 = "ml -coff" ; + local default-assembler-ia64 = ias ; + assembler = [ feature.get-values : $(options) ] ; - assembler ?= ml ; idl-compiler = [ feature.get-values : $(options) ] ; idl-compiler ?= midl ; @@ -880,9 +882,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) ; @@ -1113,6 +1118,15 @@ # Declare flags for the assembler. toolset.flags msvc.compile.asm USER_ASMFLAGS ; + toolset.flags msvc.compile.asm ASMFLAGS on : "/Zi /Zd" ; + + toolset.flags msvc.compile.asm ASMFLAGS on : /W3 ; + toolset.flags msvc.compile.asm ASMFLAGS off : /W0 ; + toolset.flags msvc.compile.asm ASMFLAGS all : /W4 ; + toolset.flags msvc.compile.asm ASMFLAGS on : /WX ; + + toolset.flags msvc.compile.asm DEFINES ; + # Declare flags for linking. { toolset.flags msvc.link PDB_LINKFLAG on/database : /PDB: ; # not used yet