From f9ef53759a6b02495fe8e3f26b6d9b9cc8da0e68 Mon Sep 17 00:00:00 2001 From: Sergey Kosarevsky Date: Mon, 9 Sep 2024 21:21:12 -0700 Subject: [PATCH] Mac compilation fix --- shell/renderSessions/TinyMeshBindGroupSession.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/shell/renderSessions/TinyMeshBindGroupSession.cpp b/shell/renderSessions/TinyMeshBindGroupSession.cpp index ac355b9aa4..a6c6322abb 100644 --- a/shell/renderSessions/TinyMeshBindGroupSession.cpp +++ b/shell/renderSessions/TinyMeshBindGroupSession.cpp @@ -40,6 +40,18 @@ namespace fs = std::filesystem; #include #define TINY_TEST_USE_DEPTH_BUFFER 1 +// libc++'s implementation of std::format has a large binary size impact +// (https://github.com/llvm/llvm-project/issues/64180), so avoid it on Android. +#if !defined(IGL_FORMAT) +#if defined(__cpp_lib_format) && !defined(__ANDROID__) +#include +#define IGL_FORMAT std::format +#else +#include +#define IGL_FORMAT fmt::format +#endif // __cpp_lib_format +#endif // !defined(IGL_FORMAT) + namespace { const uint32_t kDynamicBufferMask = 0b10;