Skip to content

Commit 9e383bc

Browse files
authored
Merge pull request #1179 from mendix/moo/MOO-2251-Appcrash-fix-due-to-folly-for-release-17
[MOO-2251]: App crash fix for debug build due to folly
2 parents a945f9c + a56a512 commit 9e383bc

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

ios/Podfile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,22 @@ post_install do |installer|
111111
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] |= ['$(inherited)', "DEBUG=1"]
112112
end
113113
end
114+
115+
# Workaround for Folly F14 bug exposed by Xcode 26:
116+
# Folly's F14SetFallback.h uses reinterpret_cast to access the private
117+
# internals of std::unordered_set — an unsafe hack that relies on a
118+
# specific memory layout. Xcode 26's libc++ might have changed that layout,
119+
# causing the debug-only assertion (FOLLY_SAFE_DCHECK at line 234)
120+
# to fail with SIGABRT.
121+
# Since F14SetFallback.h is a header-only template compiled by any
122+
# target that includes it, we define NDEBUG for ALL targets to set
123+
# folly::kIsDebug=false, disabling the assertion. This matches the
124+
# behavior of Release/Production builds which already define NDEBUG.
125+
if config.name == 'Debug'
126+
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= []
127+
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] |= ['$(inherited)', 'NDEBUG=1']
128+
end
129+
114130
end
115131
end
116132
end

0 commit comments

Comments
 (0)