aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/buildfile
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2019-08-28 17:36:59 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2019-08-28 17:36:59 +0200
commitdaee080865780378a6fb53b068f78c12ab95b3e4 (patch)
tree639e346522064c06c1da4d3ccae9bf5e6c511ed2 /libbuild2/buildfile
parent6efd6dc40d46f1fa2028a4259c8b2b56f866d6f7 (diff)
Export dependency on -lpthread
Diffstat (limited to 'libbuild2/buildfile')
-rw-r--r--libbuild2/buildfile6
1 files changed, 6 insertions, 0 deletions
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