From d33558b7335a469942e204f73de6faed81f8041f Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 15 Aug 2019 09:57:42 +0200 Subject: Add support for bin.lib.load_suffix This allow the creation of yet another symlink to the shared library that is meant to be used for dynamic loading. For example, we may want to embed the main program interface number into its plugins to make sure that we only load compatible versions. --- build2/cc/link-rule.hxx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'build2/cc/link-rule.hxx') diff --git a/build2/cc/link-rule.hxx b/build2/cc/link-rule.hxx index 14c6fa1..3c51121 100644 --- a/build2/cc/link-rule.hxx +++ b/build2/cc/link-rule.hxx @@ -57,13 +57,18 @@ namespace build2 struct libs_paths { // If any (except real) is empty, then it is the same as the next - // one. Except for intermediate, for which empty indicates that it is - // not used. + // one. Except for load and intermediate, for which empty indicates + // that it is not used. + // + // Note that the paths must form a "hierarchy" with subsequent paths + // adding extra information as suffixes. This is relied upon by the + // clean pattern (see below). // // The libs{} path is always the real path. On Windows what we link // to is the import library and the link path is empty. // path link; // What we link: libfoo.so + path load; // What we load (with dlopen() or similar) path soname; // SONAME: libfoo-1.so, libfoo.so.1 path interm; // Intermediate: libfoo.so.1.2 const path* real; // Real: libfoo.so.1.2.3 -- cgit v1.1