From a3e20c8efdd85a18b29de839e38dfa3fc5cf46d3 Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Wed, 21 Nov 2001 03:02:23 +0000 Subject: [PATCH] turn off incremental linking of DLLs, which was a major disaster for dependency tracking. [SVN r11755] --- msvc-tools.jam | 12 +++++++++++- v1/msvc-tools.jam | 12 +++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/msvc-tools.jam b/msvc-tools.jam index d35bde2f5..7f352f289 100644 --- a/msvc-tools.jam +++ b/msvc-tools.jam @@ -56,11 +56,21 @@ flags msvc LINKFLAGS DLL : /DLL ; rule Link-action { with-command-file msvc-Link-action $(<) : $(>) $(NEEDLIBS) ; + if $(<[2]) + { + # incremental linking a DLL causes no end of problems: if the + # actual exports don't change, the import .lib file is never + # updated. Therefore, the .lib is always out-of-date and gets + # rebuilt every time. I'm not sure that incremental linking is + # such a great idea in general, but in this case I'm sure we + # don't want it. + NOINCREMENTAL on $(<) = /INCREMENTAL:NO ; + } } actions together msvc-Link-action bind NEEDLIBS { - $(MSVC_TOOL_PATH)link /nologo $(LINKFLAGS) /PDB:"$(<[1]:S=.pdb)" /out:"$(<[1])" /LIBPATH:$(LIBPATH) /LIBPATH:$(STDLIBPATH) "$(FINDLIBS)" @"$(>)" + $(MSVC_TOOL_PATH)link /nologo $(NOINCREMENTAL) $(LINKFLAGS) /PDB:"$(<[1]:S=.pdb)" /out:"$(<[1])" /LIBPATH:$(LIBPATH) /LIBPATH:$(STDLIBPATH) "$(FINDLIBS)" @"$(>)" } #### Cc ##### diff --git a/v1/msvc-tools.jam b/v1/msvc-tools.jam index d35bde2f5..7f352f289 100644 --- a/v1/msvc-tools.jam +++ b/v1/msvc-tools.jam @@ -56,11 +56,21 @@ flags msvc LINKFLAGS DLL : /DLL ; rule Link-action { with-command-file msvc-Link-action $(<) : $(>) $(NEEDLIBS) ; + if $(<[2]) + { + # incremental linking a DLL causes no end of problems: if the + # actual exports don't change, the import .lib file is never + # updated. Therefore, the .lib is always out-of-date and gets + # rebuilt every time. I'm not sure that incremental linking is + # such a great idea in general, but in this case I'm sure we + # don't want it. + NOINCREMENTAL on $(<) = /INCREMENTAL:NO ; + } } actions together msvc-Link-action bind NEEDLIBS { - $(MSVC_TOOL_PATH)link /nologo $(LINKFLAGS) /PDB:"$(<[1]:S=.pdb)" /out:"$(<[1])" /LIBPATH:$(LIBPATH) /LIBPATH:$(STDLIBPATH) "$(FINDLIBS)" @"$(>)" + $(MSVC_TOOL_PATH)link /nologo $(NOINCREMENTAL) $(LINKFLAGS) /PDB:"$(<[1]:S=.pdb)" /out:"$(<[1])" /LIBPATH:$(LIBPATH) /LIBPATH:$(STDLIBPATH) "$(FINDLIBS)" @"$(>)" } #### Cc #####