diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2019-05-14 07:42:51 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2019-05-14 10:43:29 +0200 |
commit | 6be7ff595009179fc46c2a22289cea8bf11e3feb (patch) | |
tree | fa05c9ef01adac2e884f9109713fe7244f4b44a3 | |
parent | 59692f8b9fa2b71711de78d07f031c4866024da4 (diff) |
Fix pdb{} target clash
-rw-r--r-- | build2/cc/link-rule.cxx | 13 |
1 files changed, 10 insertions, 3 deletions
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<bin::libi> (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<file> ().derive_path (t.path (), "pdb"); } |