From 6be7ff595009179fc46c2a22289cea8bf11e3feb Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 14 May 2019 07:42:51 +0200 Subject: Fix pdb{} target clash --- build2/cc/link-rule.cxx | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'build2') diff --git a/build2/cc/link-rule.cxx b/build2/cc/link-rule.cxx index e333dd0..dd34d95 100644 --- a/build2/cc/link-rule.cxx +++ b/build2/cc/link-rule.cxx @@ -714,7 +714,10 @@ namespace build2 // the DLL and we add libi{} import library as its member. // if (tclass == "windows") + { libi = add_adhoc_member (a, t); + e = "dll"; + } md.libs_data = derive_libs_paths (t, p, s); } @@ -731,11 +734,15 @@ namespace build2 if (find_option ("/DEBUG", t, c_loptions, true) || find_option ("/DEBUG", t, x_loptions, true)) { + // We call the target foo.{exe,dll}.pdb rather than just foo.pdb + // because we can have both foo.exe and foo.dll in the same + // directory. + // target_lock pdb ( - add_adhoc_member (a, t, *bs.find_target_type ("pdb"))); + add_adhoc_member (a, t, *bs.find_target_type ("pdb"), e)); - // We call it foo.{exe,dll}.pdb rather than just foo.pdb because - // we can have both foo.exe and foo.dll in the same directory. + // Note that the path is derived from the exe/dll path (so it + // will include the version in case of a dll). // pdb.target->as ().derive_path (t.path (), "pdb"); } -- cgit v1.1