From 9625351c8b8c45a8a5e6402b7f3c100f74a9647a Mon Sep 17 00:00:00 2001 From: Devajith Valaparambil Sreeramaswamy Date: Fri, 25 Apr 2025 14:51:29 +0200 Subject: [PATCH] [macOS] Include to fix `_FilesystemClock` build warning Including first forces the private clock module to be imported before transitively includes Fixes the warning: ``` [79/2727] Generating G__Core.cxx, ../lib/Core.pcm In module 'std' imported from input_line_1:1: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/usr/include/c++/v1/__chrono/time_point.h:33:52: error: definition of '_FilesystemClock' must be imported from module 'std.std_private_chrono_file_clock' before it is required template ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/usr/include/c++/v1/__chrono/time_point.h:33:1: note: in instantiation of default argument for 'time_point' required here template ^~~~~~~~ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/usr/include/c++/v1/__chrono/file_clock.h:49:8: note: definition here is not reachable struct _FilesystemClock { ``` --- core/base/inc/Riostream.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/base/inc/Riostream.h b/core/base/inc/Riostream.h index f3dde24587bc8..c0d673272951b 100644 --- a/core/base/inc/Riostream.h +++ b/core/base/inc/Riostream.h @@ -21,6 +21,12 @@ // // ////////////////////////////////////////////////////////////////////////// +#ifdef __APPLE__ +// Workaround for https://github.com/llvm/llvm-project/issues/138683 +// Include before to ensure _FilesystemClock is defined +// Can be removed once the upstream issue is fixed. +#include +#endif #include #include #include