From 3a8972b42f75e10e9a833bba58d65009e7bed7f3 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 24 Aug 2016 15:41:54 +0200 Subject: Handle *.export.libs, distinguish interface and implementation dependencies A library dependency on another libraries is either "interface" or "implementation". If it is interface, then everyone who links to this library should also link to the interface dependency, explicitly. A good example of an interface dependency is a library API that is called in inline functions. Interface dependencies of a library should be explicitly listed in the *.export.libs (where we can also list target names). So the typical usage will be along these lines: import int_libs = libfoo%lib{foo} import int_libs += ... import imp_libs = libbar%lib{bar} import imp_libs += ... lib{baz}: ... $int_libs $imp_libs lib{baz}: cxx.export.libs = $int_libs --- build2/c/init.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'build2/c') diff --git a/build2/c/init.cxx b/build2/c/init.cxx index fa17227..4eab8a6 100644 --- a/build2/c/init.cxx +++ b/build2/c/init.cxx @@ -141,7 +141,7 @@ namespace build2 v.insert ("c.export.poptions"), v.insert ("c.export.coptions"), v.insert ("c.export.loptions"), - v.insert ("c.export.libs"), + v.insert ("c.export.libs"), v["cc.export.poptions"], v["cc.export.coptions"], -- cgit v1.1