summaryrefslogtreecommitdiff
path: root/src/thread.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/thread.cpp')
-rw-r--r--src/thread.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/thread.cpp b/src/thread.cpp
index 241cfee23c5b..39bb9e9bac63 100644
--- a/src/thread.cpp
+++ b/src/thread.cpp
@@ -1,9 +1,8 @@
//===------------------------- thread.cpp----------------------------------===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is dual licensed under the MIT and the University of Illinois Open
-// Source Licenses. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -24,9 +23,9 @@
# endif
#endif // defined(__unix__) || (defined(__APPLE__) && defined(__MACH__))
-#if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__)) || defined(__CloudABI__) || defined(__Fuchsia__)
+#if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__)) || defined(__CloudABI__) || defined(__Fuchsia__) || defined(__wasi__)
# include <unistd.h>
-#endif // defined(__unix__) || (defined(__APPLE__) && defined(__MACH__)) || defined(__CloudABI__) || defined(__Fuchsia__)
+#endif // defined(__unix__) || (defined(__APPLE__) && defined(__MACH__)) || defined(__CloudABI__) || defined(__Fuchsia__) || defined(__wasi__)
#if defined(__NetBSD__)
#pragma weak pthread_create // Do not create libpthread dependency
@@ -36,6 +35,10 @@
#include <windows.h>
#endif
+#if defined(__unix__) && defined(__ELF__) && defined(_LIBCPP_HAS_COMMENT_LIB_PRAGMA)
+#pragma comment(lib, "pthread")
+#endif
+
_LIBCPP_BEGIN_NAMESPACE_STD
thread::~thread()