|
Boost-Build : |
From: Reece Dunn (msclrhd_at_[hidden])
Date: 2005-09-18 09:49:39
Alexey Pakhunov wrote:
> Reece Dunn wrote:
>
>>"An optional feature is a feature that is not required to appear in a
> [skip]
>>....so something is in there!
>
> Sorry for the confusion. The optional features themselves are in for
> long time. What is not in - the ability to use valueless features in the
> conditions when one defines flags via toolset.flags.
I have applied your patch and have this working now! :)
>>You declare a SEH as safe (using the assembler .SAFESEH) so the liker
>>can place your handler in the correct order. If I have this correct,
>>SEH's must be sequentially placed on the stack.
>
> OK. So the feature should be 'incidental'. Good!
I read the definitions of the feature types to see which was appropriate
:). I have made it propagated as well.
>>Yes, you are right. It would be useful to define these at the top of
>>msvc.jam, or in your msplatformsdk.jam, so you'd have:
>>
>> local i386 = ... ;
>> local ia64 = ... ;
>> local amd64 = ... ;
>
> In msvc.jam most likely.
I have added this in the msvc-asm.diff patch as well as moving the
safe-asynch-exceptions feature to this patch. I also fixed a few things
like adding .ASM in init ( ... ).
The dependancies are now:
1. empty-optional.diff (from Alexey Pakhunov)
2. alignment.diff
3. msvc-asm.diff
- Reece
--------------040302090908010803090801 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 18 Sep 2005 10:54:45 -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> : -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 18 Sep 2005 10:54:46 -0000
@@ -58,6 +58,10 @@
feature archiveflags : : free ;
feature version : : free ;
+feature alignment :
+ 4 1 2 8 16 # align structures to n byte boundaries
+ : propagated link-incompatible optional ;
+
feature.feature location-prefix : : free ;
Index: cw.jam
===================================================================
RCS file: /cvsroot/boost/boost/tools/build/v2/tools/cw.jam,v
retrieving revision 1.5
diff -u -r1.5 cw.jam
--- cw.jam 28 Jun 2005 09:35:45 -0000 1.5
+++ cw.jam 18 Sep 2005 10:54:46 -0000
@@ -133,6 +133,12 @@
flags cw.compile CFLAGS <exception-handling>off : -Cpp_exceptions off ;
flags cw.compile CFLAGS <rtti>off : -RTTI off ;
+flags cw.compile CFLAGS <alignment>1 : -align 1 ;
+flags cw.compile CFLAGS <alignment>2 : -align 2 ;
+flags cw.compile CFLAGS <alignment>4 : -align 4 ;
+flags cw.compile CFLAGS <alignment>8 : -align 8 ;
+flags cw.compile CFLAGS <alignment>16 : -align 16 ;
+
flags cw.compile USER_CFLAGS <cflags> : ;
flags cw.compile.c++ USER_CFLAGS <cxxflags> : ;
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 18 Sep 2005 14:02:01 -0000
@@ -277,6 +277,12 @@
flags msvc.compile CFLAGS <runtime-debugging>off/<runtime-link>shared : /MD ;
flags msvc.compile CFLAGS <runtime-debugging>on/<runtime-link>shared : /MDd ;
+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 CFLAGS <runtime-debugging>off/<runtime-link>static/<threading>single : /ML ;
flags msvc.compile CFLAGS <runtime-debugging>on/<runtime-link>static/<threading>single : /MLd ;
flags msvc.compile CFLAGS <runtime-debugging>off/<runtime-link>static/<threading>multi : /MT ;
--------------040302090908010803090801 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 18 Sep 2005 14:16:18 -0000
@@ -30,6 +30,31 @@
# to be seen, though ;-)
;
+feature safe-asynch-exceptions :
+ off # disable "safe" structured exception handling
+ on # enable "safe" structured exception handling
+ : propagated incidental ;
+
+local i386 =
+ <architecture>/<address-model>
+ <architecture>/<address-model>32
+ <architecture>x86/<address-model>
+ <architecture>x86/<address-model>32
+ ;
+
+local ia64 =
+ <architecture>/<address-model>64
+ <architecture>ia64/<address-model>
+ <architecture>ia64/<address-model>64
+ ;
+
+local amd64 =
+ <architecture>/<instruction-set>athalon64/<address-model>
+ <architecture>/<instruction-set>athalon64/<address-model>64
+ <architecture>ia64/<instruction-set>athalon64/<address-model>
+ <architecture>ia64/<instruction-set>athalon64/<address-model>64
+ ;
+
RM = [ common.rm-command ] ;
# Initialize the toolset for a specific version. As the result, path to
@@ -65,7 +90,7 @@
#
# - if compiler is not found in default locations, PATH will be searched.
: options *
- # options can include <setup>, <compiler>, <linker> and <resource-compiler>
+ # options can include <setup>, <compiler>, <linker>, <assembler> and <resource-compiler>
)
{
# setup will be used if a path has been specified. If setup is
@@ -78,6 +103,8 @@
linker ?= link ;
resource-compiler = [ get-values <resource-compiler> : $(options) ] ;
resource-compiler ?= rc ;
+ assembler = [ get-values <assembler> : $(options) ] ;
+ assembler ?= ml ;
local condition = [ common.check-init-parameters msvc :
version $(version) ] ;
@@ -115,6 +142,7 @@
flags msvc.compile .CC $(condition) : $(prefix)$(compiler) ;
flags msvc.compile .RC $(condition) : $(prefix)$(resource-compiler) ;
+ flags msvc.compile .ASM $(condition) : $(prefix)$(assembler) ;
flags msvc.link .LD $(condition) : $(prefix)$(linker) ;
flags msvc.archive .LD $(condition) : $(prefix)$(linker) ;
@@ -308,6 +336,27 @@
$(.RC) -l 0x409 -U$(UNDEFS) -D$(DEFINES) -I"$(INCLUDES)" -fo "$(<:W)" "$(>:W)"
}
+# Declare flags and action for the assembler
+
+flags msvc.asm ASMFLAGS $(i386)/<asynch-exceptions>on/<safe-asynch-exceptions>on : /safeseh ;
+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 ;
@@ -322,6 +371,9 @@
flags msvc LINKFLAGS <user-interface>native : /subsystem:native ;
flags msvc LINKFLAGS <user-interface>auto : /subsystem:posix ;
+flags msvc LINKFLAGS $(i386)/<asynch-exceptions>on/<safe-asynch-exceptions>on : /safeseh ;
+flags msvc LINKFLAGS $(i386)/<asynch-exceptions>on/<safe-asynch-exceptions>off : /safeseh:no ;
+
flags msvc LINKFLAGS <main-target-type>LIB/<link>shared : /DLL ;
flags msvc.link USER_LINKFLAGS <linkflags> ;
--------------040302090908010803090801--
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