Commit 41a9dc8f authored by Pavel Dubovitsky's avatar Pavel Dubovitsky Committed by Facebook GitHub Bot

Workaround a wasm dependency issue

Summary: This is a quick and dirty hack that works around a wasm dependency issue. The issue manifests itself in a compile error when including fmt headers during a wasm build.

Reviewed By: shodoco

Differential Revision: D24516599

fbshipit-source-id: 578dd8981922a97702992a8c30b88b47fef1706e
parent af863048
...@@ -41,7 +41,9 @@ ...@@ -41,7 +41,9 @@
#include <string_view> // @manual #include <string_view> // @manual
#endif #endif
#ifndef __wasm__
#include <fmt/format.h> #include <fmt/format.h>
#endif
#include <folly/CpuId.h> #include <folly/CpuId.h>
#include <folly/Likely.h> #include <folly/Likely.h>
...@@ -1527,7 +1529,7 @@ constexpr Range<wchar_t const*> operator"" _sp( ...@@ -1527,7 +1529,7 @@ constexpr Range<wchar_t const*> operator"" _sp(
} // namespace folly } // namespace folly
// Avoid ambiguity in older fmt versions due to StringPiece's conversions. // Avoid ambiguity in older fmt versions due to StringPiece's conversions.
#if FMT_VERSION >= 70000 #if FMT_VERSION >= 70000 && !defined(__wasm__)
FMT_BEGIN_NAMESPACE FMT_BEGIN_NAMESPACE
template <> template <>
struct formatter<folly::StringPiece> : private formatter<string_view> { struct formatter<folly::StringPiece> : private formatter<string_view> {
......
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