Skip to content

Commit a763a69

Browse files
cipolleschifacebook-github-bot
authored andcommitted
Fix the Redefinition of 'NativeXXXSpecJSI' error with Frameworks (#44005)
Summary: When using frameworks on iOS, there is a possibility that modules import the Spec.h file twice and this might end up in a Redefinition of some symbols and duplication of symbols which ends up in build errors, as reported here: #42670. This change adds some [`#include guards`](https://en.wikipedia.org/wiki/Include_guard) in codegen to avoid the redefinition of those symbols if the header is imported/included multiple times. Note: I also experimented with `#pragma once`, but it looks like Apple is not happy with that directive. [It seems](https://forums.developer.apple.com/forums/thread/739964) that it started working flakely from Xcode 15. ## Changelog: [General][Fixed] - Make sure that we can't include Codegen symbols multiple times Differential Revision: D55925605
1 parent 403bbae commit a763a69

3 files changed

Lines changed: 166 additions & 18 deletions

File tree

0 commit comments

Comments
 (0)