Fix the Redefinition of 'NativeXXXSpecJSI' error with Frameworks#44005
Closed
cipolleschi wants to merge 1 commit intofacebook:mainfrom
Closed
Fix the Redefinition of 'NativeXXXSpecJSI' error with Frameworks#44005cipolleschi wants to merge 1 commit intofacebook:mainfrom
cipolleschi wants to merge 1 commit intofacebook:mainfrom
Conversation
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D55925605 |
Base commit: 27ef6cd |
dbcb2fe to
3c42edb
Compare
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D55925605 |
3c42edb to
a1a4ca6
Compare
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D55925605 |
…ebook#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: facebook#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
a1a4ca6 to
a763a69
Compare
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D55925605 |
Contributor
|
This pull request has been merged in 46b6453. |
|
This pull request was successfully merged by @cipolleschi in 46b6453. When will my fix make it into a release? | How to file a pick request? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 guardsin 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 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