From 4b9de5c80934772dbc5503e65e265da452ca356a Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 2 May 2018 15:02:02 +0200 Subject: Add support for different backlinking modes, use for Windows DLL assembly --- build2/cc/link-rule.cxx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'build2/cc/link-rule.cxx') diff --git a/build2/cc/link-rule.cxx b/build2/cc/link-rule.cxx index 4d98e5f..358a835 100644 --- a/build2/cc/link-rule.cxx +++ b/build2/cc/link-rule.cxx @@ -503,6 +503,20 @@ namespace build2 t.out, string ())); + // By default our backlinking logic will try to symlink the + // directory and it can even be done on Windows using junctions. + // The problem is the Windows DLL assembly "logic" refuses to + // recognize a junction as a valid assembly for some reason. So we + // are going to resort to copy-link (i.e., a real directory with a + // bunch on links). + // + // Interestingly, the directory symlink works just fine under + // Wine. So we only resort to copy-link'ing if we are running + // on Windows. + // +#ifdef _WIN32 + dir.target->assign (var_backlink) = "copy"; +#endif match_recipe (dir, group_recipe); // Set recipe and unlock. } } -- cgit v1.1