|
Boost-Build : |
From: Jürgen Hunold (hunold+lists.Boost_at_[hidden])
Date: 2003-11-13 05:52:30
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi !
The attached patch ports the V1 linking semantics to V2.
Short description: Instead of "updating" an existing lib, throw it away
and do a clean rebuild.
Rationale:
msvc link.exe hardcodes the path to the object files into the .lib file.
This is necessary for resolving paths to .obj and .cpp files when
debugging, I think. This itself is a Good Thing, because I don't
need .vcproj files for debugging anymore. Cool.
Problems occur when the path to the object file changes.
Most of my projects have the folling layout:
build
src/lib1
src/lib2
src/app
where src/Jamfile contains "default-build ../build ;"
When I do some editing in src/lib1 and rebuild lib1from this directory,
I get a canonical Path of ../../build/lib1/bin/<generated>. Hardcoded
into lib1.
Everything works fine, except I get (simply annoying)
"replacing file xyz.obj" when linking. This makes it difficult to follow
the build process.
When I build from src/Jamfile, all paths start with
../build/lib1/bin/<generated>.
link.exe now thinks that ../build and ../../build are different and all
hell breaks loose. This can lead to object files not being replaced and
therefore to an inconsistent library.
I think it's best to follow V1 and simply do a "delete and rebuild from
scratch".
Oh, the patch removes some extra whitespace, too. Feel free to skip
this. ;-))
Yours,
Jürgen
- --
* Dipl.-Math. Jürgen Hunold ! Institut für Verkehrswesen, Eisenbahnbau
* voice: ++49 511 762-2529 ! und -betrieb, Universität Hannover
* fax : ++49 511 762-3001 ! Appelstrasse 9a, D-30167 Hannover
* hunold_at_[hidden] ! www.ive.uni-hannover.de
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)
iD8DBQE/s2JuljbJ/LLrxrYRAjjuAKDYtkbiD7+06mGQfWPN5DKKbyBtdgCgihK0
zPvA15GUWXIJ8THkiM7HYzo=
=Iheq
-----END PGP SIGNATURE-----
--Boundary-00=_uJ2s/uj1J+R5kZg Content-Type: text/x-diff;
charset="iso-8859-15";
name="msvc.jam.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="msvc.jam.diff"
Index: tools/build/v2/tools/msvc.jam
=================================RCS file: /cvsroot/boost/boost/tools/build/v2/tools/msvc.jam,v
retrieving revision 1.16
diff -u -3 -p -r1.16 msvc.jam
--- tools/build/v2/tools/msvc.jam 8 Nov 2003 09:34:36 -0000 1.16
+++ tools/build/v2/tools/msvc.jam 12 Nov 2003 17:30:37 -0000
@@ -348,13 +348,13 @@ if [ os.name ] in NT
rule archive ( targets + : sources * : properties * )
{
- common.response-file $(targets) : $(sources) : $(targets[2]) : $(properties) ;
+ common.response-file $(targets) : $(sources) : $(targets[2]) : $(properties) ;
}
actions archive
{
- if exist "$(<[1])" set _$(<[1]:B)_="$(<[1])"
- $(.LD) /lib /NOLOGO /out:"$(<[1])" %_$(<[1]:B)_% @"$(<[2])"
+ if exist "$(<[1])" DEL "$(<[1])"
+ $(.LD) /lib /NOLOGO /out:"$(<[1])" @"$(<[2])"
}
}
else # CYGWIN
--Boundary-00=_uJ2s/uj1J+R5kZg--
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