-
Notifications
You must be signed in to change notification settings - Fork 24.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prepare dummy hermes.xcframework before pod install
Summary: This diff adds prepare command to hermes-engine.podspec. That command creates dummy `universal/hermes.xcframework` and `maocosx/hermes.framework`. This allow us to utilise CocoaPods auto-linking, and remove manual linking/cleanup code. Also we now do not pollute user project with "Copy Hermes Framework" script phase. Which was quite bad on its own, and also caused annoying bugs on the CI. allow-large-files Changelog: [iOS][Changed] - Prepare dummy hermes.xcframework before pod install. Reviewed By: cipolleschi Differential Revision: D41533994 fbshipit-source-id: d7d098ba5e882ac2d036335c23d7cda447d75b8d
- Loading branch information
1 parent
65e0f79
commit 2344860
Showing
8 changed files
with
46 additions
and
98 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
30 changes: 30 additions & 0 deletions
30
sdks/hermes-engine/utils/create-dummy-hermes-xcframework.sh
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/bash | ||
# Copyright (c) Meta Platforms, Inc. and affiliates. | ||
# | ||
# This source code is licensed under the MIT license found in the | ||
# LICENSE file in the root directory of this source tree. | ||
|
||
set -x | ||
|
||
# CocoaPods requires vendored frameworks to exist before `pod install` is run, | ||
# and to be proper Moch-O binaries in order to auto-link them to the user's Xcode project. | ||
# This script creates dummy hermes.framework for macosx and ios. | ||
# They are then get rewritten by `build-hermes-xcode.sh` during Xcode build. | ||
|
||
rm -rf destroot | ||
|
||
mkdir -p destroot/Library/Frameworks | ||
|
||
pushd destroot/Library/Frameworks > /dev/null || exit 1 | ||
|
||
echo '' > dummy.c | ||
|
||
mkdir -p macosx/hermes.framework | ||
clang dummy.c -dynamiclib -o macosx/hermes.framework/hermes | ||
|
||
mkdir -p ios/hermes.framework | ||
clang dummy.c -dynamiclib -o ios/hermes.framework/hermes | ||
|
||
rm dummy.c | ||
|
||
popd > /dev/null || exit 1 |