Commit 82e4fd9e authored by Ruslan Sayfutdinov's avatar Ruslan Sayfutdinov Committed by Facebook GitHub Bot

support coroutines for clang on windows

Summary: `LLVM_COROUTINES` define indicates that LLVM compatible `<experimental/coroutine>` is available and we can enable coroutines for Clang on Windows.

Reviewed By: yfeldblum, WillerZ

Differential Revision: D26729942

fbshipit-source-id: 37999a9a727727aa9244e8d4d67f035fc311be50
parent 8aeb9ba9
...@@ -554,9 +554,12 @@ constexpr auto kCpplibVer = 0; ...@@ -554,9 +554,12 @@ constexpr auto kCpplibVer = 0;
#if __cplusplus >= 201703L #if __cplusplus >= 201703L
// folly::coro requires C++17 support // folly::coro requires C++17 support
#if defined(_WIN32) && defined(__clang__) #if defined(_WIN32) && defined(__clang__) && !defined(LLVM_COROUTINES)
// LLVM and MSVC coroutines are ABI incompatible and <experimental/coroutine> // LLVM and MSVC coroutines are ABI incompatible, so for the MSVC implementation
// is the MSVC implementation on windows, so we *don't* have coroutines. // of <experimental/coroutine> on Windows we *don't* have coroutines.
//
// LLVM_COROUTINES indicates that LLVM compatible header is added to include
// path and can be used.
// //
// Worse, if we define FOLLY_HAS_COROUTINES 1 we will include // Worse, if we define FOLLY_HAS_COROUTINES 1 we will include
// <experimental/coroutine> which will conflict with anyone who wants to load // <experimental/coroutine> which will conflict with anyone who wants to load
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment