From aa470a9aefb790fa6c2286e5ed8e86250deda79c Mon Sep 17 00:00:00 2001 From: Cory Wilhite Date: Thu, 25 Jul 2019 16:38:46 -0700 Subject: [PATCH] Compile out objc_msgSend_stret on 64 bit machines Summary: objc_msgSend_stret isn't available when building for 64 bit devices so this line breaks. objc_msgSend is the correct function to call in 64 bit, but Flipper doesn't run for devices so its fine either way. Reviewed By: jasonhotsauce Differential Revision: D16502377 fbshipit-source-id: cfc20880bcccd086dc34fad74a6eef2c9a17cb17 --- .../FlipperKitLayoutComponentKitSupport/CKComponent+Sonar.mm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutComponentKitSupport/CKComponent+Sonar.mm b/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutComponentKitSupport/CKComponent+Sonar.mm index 8648204e9..9e9c8f12e 100644 --- a/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutComponentKitSupport/CKComponent+Sonar.mm +++ b/iOS/Plugins/FlipperKitLayoutPlugin/FlipperKitLayoutComponentKitSupport/CKComponent+Sonar.mm @@ -245,7 +245,11 @@ static CK::StaticMutex _mutex = CK_MUTEX_INITIALIZER; - (std::vector)sonar_renderChildren:(id)state { [self setMutableDataFromStorage]; SEL resultSelector = NSSelectorFromString([[self class] swizzledMethodNameForRender]); +#if defined(__aarch64__) + return ((std::vector(*)(CKComponent *, SEL, id))objc_msgSend)(self, resultSelector, state); +#else return ((std::vector(*)(CKComponent *, SEL, id))objc_msgSend_stret)(self, resultSelector, state); +#endif } - (NSDictionary *)sonar_getDataMutationsChanged {