|
Boost-Build : |
From: Reece Dunn (msclrhd_at_[hidden])
Date: 2005-09-17 15:18:46
The alignment.diff file adds an <alignment> feature to builtin.jam. It
also adds a <safe-async-exceptions> option specific to msvc.jam.
The msvc-asm.diff file adds assembler support for msvc. This is
dependant on the alignment/safe-async-exceptions support.
- Reece
--------------010106080406070902030706 Content-Type: text/plain;
name="alignment.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="alignment.diff"
Index: borland.jam
===================================================================
RCS file: /cvsroot/boost/boost/tools/build/v2/tools/borland.jam,v
retrieving revision 1.17
diff -u -r1.17 borland.jam
--- borland.jam 16 Jun 2005 09:38:45 -0000 1.17
+++ borland.jam 17 Sep 2005 20:07:04 -0000
@@ -67,6 +67,13 @@
flags borland CFLAGS <inlining>on : -vi -w-inl ;
flags borland CFLAGS <inlining>full : -vi -w-inl ;
+flags borland.compile OPTIONS <alignment>default : -a8 ; # IDE default
+flags borland.compile OPTIONS <alignment>1 : -a1 ;
+flags borland.compile OPTIONS <alignment>2 : -a2 ;
+flags borland.compile OPTIONS <alignment>4 : -a4 ;
+flags borland.compile OPTIONS <alignment>8 : -a8 ;
+flags borland.compile OPTIONS <alignment>16 : -a16 ;
+
# Deal with various runtime configs...
@@ -104,8 +111,6 @@
# and effects binary compatibility.
# -Vx zero sized empty members, this option is on in the IDE by default
# and effects binary compatibility.
-# -a8 8 byte alignment, this option is on in the IDE by default
-# and effects binary compatibility.
#
# -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) $(C++FLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -o"$(<)" "$(>)"
@@ -113,13 +118,13 @@
actions compile.c++
{
- "$(CONFIG_COMMAND)" -j5 -g255 -q -c -P -w -Ve -Vx -a8 -b- $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -I"$(STDHDRS)" -o"$(<)" "$(>)"
+ "$(CONFIG_COMMAND)" -j5 -g255 -q -c -P -w -Ve -Vx -b- $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -I"$(STDHDRS)" -o"$(<)" "$(>)"
}
# For C, we don't pass -P flag
actions compile.c
{
- "$(CONFIG_COMMAND)" -j5 -g255 -q -c -w -Ve -Vx -a8 -b- $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -I"$(STDHDRS)" -o"$(<)" "$(>)"
+ "$(CONFIG_COMMAND)" -j5 -g255 -q -c -w -Ve -Vx -b- $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -I"$(STDHDRS)" -o"$(<)" "$(>)"
}
Index: builtin.jam
===================================================================
RCS file: /cvsroot/boost/boost/tools/build/v2/tools/builtin.jam,v
retrieving revision 1.178
diff -u -r1.178 builtin.jam
--- builtin.jam 14 Sep 2005 09:54:14 -0000 1.178
+++ builtin.jam 17 Sep 2005 20:07:04 -0000
@@ -58,6 +58,11 @@
feature archiveflags : : free ;
feature version : : free ;
+feature alignment :
+ default # use the default structure alignment
+ 1 2 4 8 16 # align structures to n byte boundaries
+ : propagated link-incompatible ;
+
feature.feature location-prefix : : free ;
Index: msvc.jam
===================================================================
RCS file: /cvsroot/boost/boost/tools/build/v2/tools/msvc.jam,v
retrieving revision 1.50
diff -u -r1.50 msvc.jam
--- msvc.jam 2 Sep 2005 07:35:54 -0000 1.50
+++ msvc.jam 17 Sep 2005 20:07:04 -0000
@@ -268,6 +268,13 @@
flags msvc.compile CFLAGS <inlining>on : /Ob1 ;
flags msvc.compile CFLAGS <inlining>full : /Ob2 ;
+flags msvc.compile CFLAGS <alignment>default : ;
+flags msvc.compile CFLAGS <alignment>1 : /Zp1 ;
+flags msvc.compile CFLAGS <alignment>2 : /Zp2 ;
+flags msvc.compile CFLAGS <alignment>4 : /Zp4 ;
+flags msvc.compile CFLAGS <alignment>8 : /Zp8 ;
+flags msvc.compile CFLAGS <alignment>16 : /Zp16 ;
+
flags msvc.compile C++FLAGS <exception-handling>on/<asynch-exceptions>off/<extern-c-nothrow>off : /EHs ;
flags msvc.compile C++FLAGS <exception-handling>on/<asynch-exceptions>off/<extern-c-nothrow>on : /EHsc ;
flags msvc.compile C++FLAGS <exception-handling>on/<asynch-exceptions>on/<extern-c-nothrow>off : /EHa ;
@@ -322,6 +329,9 @@
flags msvc LINKFLAGS <user-interface>native : /subsystem:native ;
flags msvc LINKFLAGS <user-interface>auto : /subsystem:posix ;
+flags msvc LINKFLAGS <safe-async-exceptions>on : /safeseh ;
+flags msvc LINKFLAGS <safe-async-exceptions>off : /safeseh:no ;
+
flags msvc LINKFLAGS <main-target-type>LIB/<link>shared : /DLL ;
flags msvc.link USER_LINKFLAGS <linkflags> ;
--------------010106080406070902030706 Content-Type: text/plain;
name="msvc-asm.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="msvc-asm.diff"
Index: msvc.jam
===================================================================
RCS file: /cvsroot/boost/boost/tools/build/v2/tools/msvc.jam,v
retrieving revision 1.50
diff -u -r1.50 msvc.jam
--- msvc.jam 2 Sep 2005 07:35:54 -0000 1.50
+++ msvc.jam 17 Sep 2005 20:15:57 -0000
@@ -253,6 +253,8 @@
generators.register-standard msvc.compile.rc : RC : OBJ(%_res) : <toolset>msvc ;
generators.override msvc.compile.rc : rc.resource-compile ;
+generators.register-standard msvc.compile.asm : ASM : OBJ : <toolset>msvc ;
+
#
# Declare flags and action for compilation
#
@@ -308,6 +310,28 @@
$(.RC) -l 0x409 -U$(UNDEFS) -D$(DEFINES) -I"$(INCLUDES)" -fo "$(<:W)" "$(>:W)"
}
+# Declare flags and action for the assembler
+
+flags msvc.asm ASMFLAGS <safe-async-exceptions>on : /safeseh ;
+flags msvc.asm ASMFLAGS <alignment>default : /Zp4 ;
+flags msvc.asm ASMFLAGS <alignment>1 : /Zp1 ;
+flags msvc.asm ASMFLAGS <alignment>2 : /Zp2 ;
+flags msvc.asm ASMFLAGS <alignment>4 : /Zp4 ;
+flags msvc.asm ASMFLAGS <alignment>8 : /Zp8 ;
+flags msvc.asm ASMFLAGS <alignment>16 : /Zp16 ;
+
+#
+# for the assembler the following options are turned on by default:
+#
+# -coff generate COFF format object file (compatible with cl.exe output)
+# -Cp preserve case of user identifiers
+# -Cx preserve case in publics, externs
+
+actions compile.asm
+{
+ $(.ASM) -nologo -c -coff -Cp -Cx $(ASMFLAGS) -Fo "$(<:W)" "$(>:W)"
+}
+
# Declare flags and action for linking
flags msvc.link PDB_LINKFLAG <debug-symbols>on/<debug-store>database : /PDB: ; # not used yet
flags msvc.link LINKFLAGS <debug-symbols>on : /DEBUG ;
--------------010106080406070902030706--
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