Boost logo

Boost-Build :

From: Ilya Sokolov (fal_delivery_at_[hidden])
Date: 2006-05-15 12:18:01


Vladimir Prus wrote:
> If $(.versions) are pre-detected version, then maybe we should just change
>
> options = [ $(.versions).get $(version) : options ] ;
>
> line below to read:
>
> options = [ $(.versions).get $(version) : options ] $(options) ;
>
> and remove call the $(.version).set completely?

of course, yes

>>>>fixed processing of common toolset options (<cflags>, <cxxflags>,
>>>><compileflags> and <linkflags>)
>>>
>>>What was the bug with them?
>>
>><cflags>, <cxxflags>, <compileflags> and <linkflags> are handled with
>>handle-options rule in common.jam:
>>
>>rule handle-options ( toolset : condition * : command * : options * )
>>{
>> # The last parameter ('true') says it's OK to set flags for another
>> # module,
>> toolset.flags $(toolset) CONFIG_COMMAND $(condition) : $(command) :
>>unchecked ;
>> toolset.flags $(toolset).compile OPTIONS $(condition) :
>> [ feature.get-values <compileflags> : $(options) ] : unchecked ;
>> toolset.flags $(toolset).compile.c OPTIONS $(condition) :
>> [ feature.get-values <cflags> : $(options) ] : unchecked ;
>> toolset.flags $(toolset).compile.c++ OPTIONS $(condition) :
>> [ feature.get-values <cxxflags> : $(options) ] : unchecked ;
>> toolset.flags $(toolset).compile.fortran OPTIONS $(condition) :
>> [ feature.get-values <fflags> : $(options) ] : unchecked ;
>> toolset.flags $(toolset).link OPTIONS $(condition) :
>> [ feature.get-values <linkflags> : $(options) ] : unchecked ;
>>}
>
>
> Right, and what was the bug? Sorry for being dense today ;-)

for example,

>> toolset.flags $(toolset).compile.c++ OPTIONS $(condition) :
>> [ feature.get-values <cxxflags> : $(options) ] : unchecked ;

sets OPTIONS variable for compile.c++ action, but action
msvc.compile.c++ doesnt contain $(OPTIONS) anywhere, so cxxflags in the
`using' invokation will be ignored

>> >I see that your patch completely removes
>> >
>> > flags msvc.compiler USER_FLAGS <cflags> : ;
>> > line, and two other similar lines. What is the motivation for that?
>>
>>my mistake. see fixed patch ;-) in attachment
>
>
> The lines like
>
> flags msvc.compile USER_CFLAGS <cflags> : ;
> flags msvc.compile.c++ USER_CFLAGS <cxxflags> : ;
>
> are still remove, and it's still the context diff, not the unified diff
> format. Hmm, maybe you've attached the old version?

yeah, i have an unlucky day.

cvs -q diff -u -d -- msvc.jam (in directory J:\w\boost\boost\tools\build\v2\tools\)
Index: msvc.jam
===================================================================
RCS file: /cvsroot/boost/boost/tools/build/v2/tools/msvc.jam,v
retrieving revision 1.76
diff -u -d -r1.76 msvc.jam
--- msvc.jam 7 Mar 2006 12:59:37 -0000 1.76
+++ msvc.jam 15 May 2006 15:54:24 -0000
@@ -193,18 +193,12 @@
         # Register a new configuration
         $(.versions).register $(version) ;
 
- # Set new options if any
- if $(options)
- {
- $(.versions).set $(version) : options : $(options) ;
- }
+ # Add user-supplied to auto-detected options
+ options = [ $(.versions).get $(version) : options ] $(options) ;
 
         # Mark the configuration as 'used'.
         $(.versions).use $(version) ;
 
- # Get auto-detected or user-supplied options
- options = [ $(.versions).get $(version) : options ] ;
-
         # Generate condition and save it
         local condition = [ common.check-init-parameters msvc :
             version $(v) ] ;
@@ -469,16 +463,16 @@
 rule default-paths ( version ? )
 {
     local possible-paths ;
     
     if $(version)
     {
- default-path += [ default-path $(version) ] ;
+ possible-paths += [ default-path $(version) ] ;
     }
     else
     {
         for local i in $(.known-versions)
         {
- default-path += [ default-path $(i) ] ;
+ possible-paths += [ default-path $(i) ] ;
         }
     }
 
@@ -552,8 +546,8 @@
 flags msvc.compile CFLAGS <runtime-debugging>off/<runtime-link>static/<threading>multi : /MT ;
 flags msvc.compile CFLAGS <runtime-debugging>on/<runtime-link>static/<threading>multi : /MTd ;
 
-flags msvc.compile USER_CFLAGS <cflags> : ;
-flags msvc.compile.c++ USER_CFLAGS <cxxflags> : ;
+flags msvc.compile.c OPTIONS <cflags> : ;
+flags msvc.compile.c++ OPTIONS <cxxflags> : ;
 
 flags msvc.compile PDB_CFLAG <debug-symbols>on/<debug-store>database : /Fd ; # not used yet
 
@@ -586,17 +580,17 @@
 # The actions differ only by explicit selection of input language
 actions compile.c bind PCH_HEADER PCH_FILE
 {
- $(.CC) /Zm800 -nologo -TC -U$(UNDEFS) $(CFLAGS) $(USER_CFLAGS) @"@($(<[1]:W).rsp:E=$(nl)"$(>)" $(nl)-D$(DEFINES) $(nl)"-I$(INCLUDES)")" -c -Fo"$(<[1]:W)" -Yu"$(PCH_HEADER:D=)" -Fp"$(PCH_FILE:W)"
+ $(.CC) /Zm800 -nologo -TC -U$(UNDEFS) $(CFLAGS) $(OPTIONS) @"@($(<[1]:W).rsp:E=$(nl)"$(>)" $(nl)-D$(DEFINES) $(nl)"-I$(INCLUDES)")" -c -Fo"$(<[1]:W)" -Yu"$(PCH_HEADER:D=)" -Fp"$(PCH_FILE:W)"
 }
 
 actions compile.c++ bind PCH_HEADER PCH_FILE
 {
- $(.CC) /Zm800 -nologo -TP -U$(UNDEFS) $(CFLAGS) $(C++FLAGS) $(USER_CFLAGS) @"@($(<[1]:W).rsp:E=$(nl)"$(>)" $(nl)-D$(DEFINES) $(nl)"-I$(INCLUDES)")" -c -Fo"$(<[1]:W)" -Yu"$(PCH_HEADER:D=)" -Fp"$(PCH_FILE:W)"
+ $(.CC) /Zm800 -nologo -TP -U$(UNDEFS) $(CFLAGS) $(C++FLAGS) $(OPTIONS) @"@($(<[1]:W).rsp:E=$(nl)"$(>)" $(nl)-D$(DEFINES) $(nl)"-I$(INCLUDES)")" -c -Fo"$(<[1]:W)" -Yu"$(PCH_HEADER:D=)" -Fp"$(PCH_FILE:W)"
 }
 
 actions compile.pch bind PCH_SOURCE
 {
- $(.CC) /Zm800 -nologo -TP -U$(UNDEFS) $(CFLAGS) $(C++FLAGS) $(USER_CFLAGS) @"@($(<[1]:W).rsp:E=$(nl)"$(PCH_SOURCE:W)" $(nl)-D$(DEFINES) $(nl)"-I$(INCLUDES)")" -c -Fo"$(<[1]:W)" /Yc"$(>[1]:D=)" -Fp"$(<[2]:W)"
+ $(.CC) /Zm800 -nologo -TP -U$(UNDEFS) $(CFLAGS) $(C++FLAGS) $(OPTIONS) @"@($(<[1]:W).rsp:E=$(nl)"$(PCH_SOURCE:W)" $(nl)-D$(DEFINES) $(nl)"-I$(INCLUDES)")" -c -Fo"$(<[1]:W)" /Yc"$(>[1]:D=)" -Fp"$(<[2]:W)"
 }
 
 
@@ -646,7 +640,7 @@
 flags msvc LINKFLAGS <user-interface>native : /subsystem:native ;
 flags msvc LINKFLAGS <user-interface>auto : /subsystem:posix ;
 
-flags msvc.link USER_LINKFLAGS <linkflags> ;
+flags msvc.link OPTIONS <linkflags> ;
 flags msvc.link LINKPATH <library-path> ;
 
 
@@ -700,7 +694,7 @@
 {
     actions link bind DEF_FILE
     {
- $(.LD) /NOLOGO $(LINKFLAGS) /out:"$(<[1]:W)" /INCREMENTAL:NO /LIBPATH:"$(LINKPATH:W)" $(USER_LINKFLAGS) @"@($(<[1]:W).rsp:E=$(nl)"$(>)" $(nl)$(LIBRARIES_MENTIONED_BY_FILE) $(nl)$(LIBRARIES) $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_ST:S=.lib)" $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_SA:S=.lib)")"
+ $(.LD) /NOLOGO $(LINKFLAGS) /out:"$(<[1]:W)" /INCREMENTAL:NO /LIBPATH:"$(LINKPATH:W)" $(OPTIONS) @"@($(<[1]:W).rsp:E=$(nl)"$(>)" $(nl)$(LIBRARIES_MENTIONED_BY_FILE) $(nl)$(LIBRARIES) $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_ST:S=.lib)" $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_SA:S=.lib)")"
         if exist "$(<[1]).manifest" (
             mt -nologo -manifest "$(<[1]).manifest" "-outputresource:$(<[1]);1"
         )
@@ -708,7 +702,7 @@
 
     actions link.dll bind DEF_FILE
     {
- $(.LD) /NOLOGO /DLL $(LINKFLAGS) /out:"$(<[1]:W)" /INCREMENTAL:NO /IMPLIB:"$(<[2]:W)" /LIBPATH:"$(LINKPATH:W)" /def:$(DEF_FILE) $(USER_LINKFLAGS) @"@($(<[1]:W).rsp:E=$(nl)"$(>)" $(nl)$(LIBRARIES_MENTIONED_BY_FILE) $(nl)$(LIBRARIES) $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_ST:S=.lib)" $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_SA:S=.lib)")"
+ $(.LD) /NOLOGO /DLL $(LINKFLAGS) /out:"$(<[1]:W)" /INCREMENTAL:NO /IMPLIB:"$(<[2]:W)" /LIBPATH:"$(LINKPATH:W)" /def:$(DEF_FILE) $(OPTIONS) @"@($(<[1]:W).rsp:E=$(nl)"$(>)" $(nl)$(LIBRARIES_MENTIONED_BY_FILE) $(nl)$(LIBRARIES) $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_ST:S=.lib)" $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_SA:S=.lib)")"
         if exist "$(<[1]).manifest" (
             mt -nologo -manifest "$(<[1]).manifest" "-outputresource:$(<[1]);2"
         )
@@ -718,7 +712,7 @@
 {
     actions link bind DEF_FILE
     {
- $(.LD) /NOLOGO $(LINKFLAGS) /out:"$(<[1]:W)" /INCREMENTAL:NO /LIBPATH:"$(LINKPATH:W)" $(USER_LINKFLAGS) @"@($(<[1]:W).rsp:E=$(nl)"$(>)" $(nl)$(LIBRARIES_MENTIONED_BY_FILE) $(nl)$(LIBRARIES) $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_ST:S=.lib)" $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_SA:S=.lib)")"
+ $(.LD) /NOLOGO $(LINKFLAGS) /out:"$(<[1]:W)" /INCREMENTAL:NO /LIBPATH:"$(LINKPATH:W)" $(OPTIONS) @"@($(<[1]:W).rsp:E=$(nl)"$(>)" $(nl)$(LIBRARIES_MENTIONED_BY_FILE) $(nl)$(LIBRARIES) $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_ST:S=.lib)" $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_SA:S=.lib)")"
         if test -e "$(<[1]).manifest"; then
             $(.MT) -nologo -manifest "$(<[1]:W).manifest" "-outputresource:$(<[1]:W);1"
         fi
@@ -726,7 +720,7 @@
 
     actions link.dll bind DEF_FILE
     {
- $(.LD) /NOLOGO /DLL $(LINKFLAGS) /out:"$(<[1]:W)" /INCREMENTAL:NO /IMPLIB:"$(<[2]:W)" /LIBPATH:"$(LINKPATH:W)" /def:$(DEF_FILE) $(USER_LINKFLAGS) @"@($(<[1]:W).rsp:E=$(nl)"$(>)" $(nl)$(LIBRARIES_MENTIONED_BY_FILE) $(nl)$(LIBRARIES) $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_ST:S=.lib)" $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_SA:S=.lib)")"
+ $(.LD) /NOLOGO /DLL $(LINKFLAGS) /out:"$(<[1]:W)" /INCREMENTAL:NO /IMPLIB:"$(<[2]:W)" /LIBPATH:"$(LINKPATH:W)" /def:$(DEF_FILE) $(OPTIONS) @"@($(<[1]:W).rsp:E=$(nl)"$(>)" $(nl)$(LIBRARIES_MENTIONED_BY_FILE) $(nl)$(LIBRARIES) $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_ST:S=.lib)" $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_SA:S=.lib)")"
         if test -e "$(<[1]).manifest"; then
             $(.MT) -nologo -manifest "$(<[1]:W).manifest" "-outputresource:$(<[1]:W);2"
         fi


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