From 5ec65b3fc5e4e81c48a55d15f2a77b772e588f4c Mon Sep 17 00:00:00 2001 From: Simon Marlow Date: Wed, 4 Sep 2024 04:41:25 -0700 Subject: [PATCH] Add -fcoroutines Reviewed By: malanka Differential Revision: D62176041 fbshipit-source-id: 771cffbf7b4358c8dd5ee6055199c049b35eca1b --- common/util/fb-util.cabal | 2 +- cpp-channel/thrift-cpp-channel.cabal | 2 +- server/thrift-server.cabal | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/common/util/fb-util.cabal b/common/util/fb-util.cabal index 1b4818e7..aa225dbd 100644 --- a/common/util/fb-util.cabal +++ b/common/util/fb-util.cabal @@ -60,7 +60,7 @@ common fb-haskell ghc-options: -O2 common fb-cpp - cxx-options: -std=c++17 + cxx-options: -std=c++17 -fcoroutines if arch(x86_64) cxx-options: -march=haswell if flag(opt) diff --git a/cpp-channel/thrift-cpp-channel.cabal b/cpp-channel/thrift-cpp-channel.cabal index b127585a..11624ba6 100644 --- a/cpp-channel/thrift-cpp-channel.cabal +++ b/cpp-channel/thrift-cpp-channel.cabal @@ -66,7 +66,7 @@ common fb-haskell ghc-options: -O2 common fb-cpp - cxx-options: -std=c++17 + cxx-options: -std=c++17 -fcoroutines if arch(x86_64) cxx-options: -march=haswell if flag(opt) diff --git a/server/thrift-server.cabal b/server/thrift-server.cabal index f40c10e1..f4ebff65 100644 --- a/server/thrift-server.cabal +++ b/server/thrift-server.cabal @@ -61,7 +61,10 @@ common fb-haskell ghc-options: -O2 common fb-cpp - cxx-options: -std=c++17 + cxx-options: -std=c++17 -fcoroutines + -- very important to use -fcoroutines here, because there are + -- #ifdefs in the fbthrift code (e.g. ThriftServer.h) that must + -- be consistent with the fbthrift build. if arch(x86_64) cxx-options: -march=haswell if flag(opt)