From daee080865780378a6fb53b068f78c12ab95b3e4 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 28 Aug 2019 17:36:59 +0200 Subject: Export dependency on -lpthread --- libbuild2/buildfile | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libbuild2/buildfile') diff --git a/libbuild2/buildfile b/libbuild2/buildfile index e838e8e..865bb91 100644 --- a/libbuild2/buildfile +++ b/libbuild2/buildfile @@ -117,6 +117,12 @@ lib{build2}: cxx.export.libs = $int_libs } +# While we don't call any pthread_*() functions in our API, this appears to be +# needed for some std::thread implementations (like libstdc++). +# +if ($cxx.target.class != 'windows') + lib{build2}: cxx.export.libs += -lpthread + liba{build2}: cxx.export.poptions += -DLIBBUILD2_STATIC libs{build2}: cxx.export.poptions += -DLIBBUILD2_SHARED -- cgit v1.1