aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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