Boost logo

Boost-Build :

From: Andrei Melnikov (andy.melnikov_at_[hidden])
Date: 2006-07-09 14:28:29


On 12/06/06, Reece Dunn <msclrhd_at_[hidden]> wrote:
> I have an implementation for resource-only DLL support in msvc.jam. However,
> I am not happy with this, especially now that I am looking at adding support for
> monitoring PDB files.
>
> The problem is that I have a rule msvc.link.resource-dll that is *exactly* the
> same as msvc.link.dll, so that I can have the following generators:
>
> generators.register-linker msvc.link.dll :
> OBJ SEARCHED_LIB STATIC_LIB IMPORT_LIB : SHARED_LIB IMPORT_LIB :
> <toolset>msvc ;
> generators.register-linker msvc.link.resource-dll :
> OBJ SEARCHED_LIB STATIC_LIB IMPORT_LIB : SHARED_LIB :
> <toolset>msvc <resource-only>yes ;
> generators.override msvc.link.resource-dll : msvc.link.dll ;
>
> The difference being that a resource-only DLL does not produce a LIB
> file.
>
> The PDB situation is an extension of this, but is slightly more complex in
> that the PDB output is dependant on the <debug-store>database flag.
> NOTE: If we don't specify the PDB location (it will be in the same place
> as the DLL/EXE), we can get away with making PDB output optionally
> dependant. That is, the output is optional (so that it doesn't get copied
> by the install rule and won't generate an error), but dependant on a
> feature. So that would result in something like:
>
> generators.register-linker msvc.link.dll
> : OBJ SEARCHED_LIB STATIC_LIB IMPORT_LIB
> : SHARED_LIB
> IMPORT_LIB/<resource-only>no
> PDB_FILE/<debug-symbols>on/<debug-store>database
> : <toolset>msvc ;
>
> Thoughts?
>
Dlls with an entry point, but without any exported functions don't
produce an import library either.

I see the following problem: any dll that doesn't generate an import
library is linked every time, even if it wasn't updated and linking
isn't necessary.

With PDBs I see the following problems:
1) If you delete a PDB from build directory, it isn't rebuilt until
the corresponding exe/dll target is built
2) If you run --clean, they aren't deleted.

The same problems happen to rsp and manifest files. For manifests, (1)
doesn't cause any functional bugs, but if an exe fails to link, mt
tool is run. if exist "$(<[1]).manifest" in msvc.jam isn't enough,
and adding if exist "$(<[1])" or checking errorlevel there would be a
hack.

I think all these problems can be fixed by adding corresponding build
products to the dependency graph.

Andrei


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