From e166a97779ea093d6a92008373f68aaee6883d68 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Wed, 26 Apr 2006 09:35:48 +0000 Subject: [PATCH] Merge from trunk. [SVN r33826] --- src/tools/como-win.jam | 21 ++++++++------------- src/tools/cw.jam | 19 +++++++++++++++++++ src/tools/msvc.jam | 6 ++++-- 3 files changed, 31 insertions(+), 15 deletions(-) diff --git a/src/tools/como-win.jam b/src/tools/como-win.jam index 73060dfd7..e1d309133 100644 --- a/src/tools/como-win.jam +++ b/src/tools/como-win.jam @@ -46,7 +46,7 @@ generators.register-linker como-win.link : como win ; # Note that status of shared libraries support is not clear, so we don't # define the link.dll generator. -generators.register-archiver como-winc.archive +generators.register-archiver como-win.archive : OBJ : STATIC_LIB : como win ; @@ -84,19 +84,14 @@ flags como-win FINDLIBS ; flags como-win FINDLIBS ; RM = [ common.rm-command ] ; +nl = " +" ; -#### Link #### - -rule link ( targets + : sources * : properties * ) -{ - common.response-file $(targets) : $(sources) : $(targets[2]) - : $(properties) ; -} # for como, we repeat all libraries so that dependencies are always resolved -actions link bind LIBRARIES RSP +actions link bind LIBRARIES { - $(CONFIG_COMMAND) --no_version --no_prelink_verbose $(LINKFLAGS) -o "$(<[1]:S=)" @"$(RSP:W)" "$(LIBRARIES)" "$(FINDLIBS:S=.lib)" && $(RM) "$(RSP)" + $(CONFIG_COMMAND) --no_version --no_prelink_verbose $(LINKFLAGS) -o "$(<[1]:S=)" @"@($(<[1]:W).rsp:E=$(nl)"$(>)")" "$(LIBRARIES)" "$(FINDLIBS:S=.lib)" } actions compile.c @@ -116,9 +111,9 @@ rule archive ( targets + : sources * : properties * ) common.response-file $(targets) : $(sources) : $(targets[2]) : $(properties) ; } -actions updated together piecemeal archive bind RSP +actions updated together piecemeal archive { - $(CONFIG_COMMAND) --no_version --no_prelink_verbose --prelink_object @"$(RSP:W)" - lib $(ARFLAGS) /nologo /out:"$(<:S=.lib)" @"$(RSP:W)" && $(RM) "$(RSP)" + $(CONFIG_COMMAND) --no_version --no_prelink_verbose --prelink_object "$(LIBRARIES)" + lib $(ARFLAGS) /nologo /out:"$(<:S=.lib)" "$(LIBRARIES)" } diff --git a/src/tools/cw.jam b/src/tools/cw.jam index 3b0a4ba71..f9048ee88 100644 --- a/src/tools/cw.jam +++ b/src/tools/cw.jam @@ -78,6 +78,22 @@ rule init ( version ? : command * : options * ) flags cw.compile .CC $(condition) : $(prefix)$(compiler) ; flags cw.link .LD $(condition) : $(prefix)$(linker) ; flags cw.archive .LD $(condition) : $(prefix)$(linker) ; + + if [ MATCH ^([89]\\.) : $(version) ] + { + if [ os.name ] = NT + { + # The runtime libraries + flags cw.compile CFLAGS static/single/off : -runtime ss ; + flags cw.compile CFLAGS static/single/on : -runtime ssd ; + + flags cw.compile CFLAGS static/multi/off : -runtime sm ; + flags cw.compile CFLAGS static/multi/on : -runtime smd ; + + flags cw.compile CFLAGS shared/off : -runtime dm ; + flags cw.compile CFLAGS shared/on : -runtime dmd ; + } + } } rule default-paths ( version ? ) # FIXME @@ -100,6 +116,9 @@ rule default-paths ( version ? ) # FIXME return $(possible-paths) ; } + + + ## declare generators generators.register-c-compiler cw.compile.c++ : CPP : OBJ : cw ; diff --git a/src/tools/msvc.jam b/src/tools/msvc.jam index a963957b4..19d296ede 100644 --- a/src/tools/msvc.jam +++ b/src/tools/msvc.jam @@ -660,6 +660,8 @@ flags msvc.link FINDLIBS_SA ; flags msvc.link LIBRARY_OPTION msvc : "" : unchecked ; flags msvc.link LIBRARIES_MENTIONED_BY_FILE : ; +flags msvc.archive AROPTIONS ; + rule link.dll ( targets + : sources * : properties * ) { @@ -677,7 +679,7 @@ if [ os.name ] in NT actions archive { if exist "$(<[1])" DEL "$(<[1])" - $(.LD) /lib /NOLOGO /out:"$(<[1])" @"@($(<[1]:W).rsp:E=$(nl)"$(>)" $(nl)$(LIBRARIES_MENTIONED_BY_FILE) $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_ST:S=.lib)" $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_SA:S=.lib)")" + $(.LD) /lib /NOLOGO $(AROPTIONS) /out:"$(<[1])" @"@($(<[1]:W).rsp:E=$(nl)"$(>)" $(nl)$(LIBRARIES_MENTIONED_BY_FILE) $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_ST:S=.lib)" $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_SA:S=.lib)")" } } else @@ -685,7 +687,7 @@ else actions archive { $(RM) "$(<[1])" - $(.LD) /lib /NOLOGO /out:"$(<[1])" @"@($(<[1]:W).rsp:E=$(nl)"$(>)" $(nl)$(LIBRARIES_MENTIONED_BY_FILE) $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_ST:S=.lib)" $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_SA:S=.lib)")" + $(.LD) /lib /NOLOGO $(AROPTIONS) /out:"$(<[1])" @"@($(<[1]:W).rsp:E=$(nl)"$(>)" $(nl)$(LIBRARIES_MENTIONED_BY_FILE) $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_ST:S=.lib)" $(nl)"$(LIBRARY_OPTION)$(FINDLIBS_SA:S=.lib)")" } }