Skip to content

Commit

Permalink
Expose hermes-executor to be consumed via prefab (#35457)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #35457

This exposes `hermes-executor` to be consumed via prefab so that
libraries can depend on it and use its symbols if needed (Expo and Reanimated need it).

Changelog:
[Internal] [Changed] - Expose `hermes-executor` to be consumed via prefab

Reviewed By: cipolleschi

Differential Revision: D41520019

fbshipit-source-id: d590a043ea89fdd8ff41b0ed20900c9cf381a1e4
  • Loading branch information
cortinico committed Nov 29, 2022
1 parent b1bf8c5 commit b89efc8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
14 changes: 12 additions & 2 deletions ReactAndroid/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,13 @@ final def preparePrefab = tasks.register("preparePrefab", PreparePrefabHeadersTa
"rrc_image",
new Pair("../ReactCommon/react/renderer/components/image/", "react/renderer/components/image/")
),
// This prefab target is used by Expo & Reanimated to load a new instance of Hermes
new PrefabPreprocessingEntry(
"hermes-executor",
// "hermes-executor" is statically linking agaisnt "hermes-executor-common"
// and "hermes-inspector". Here we expose only the headers that we know are needed.
new Pair("../ReactCommon/hermes/inspector/", "hermes/inspector/")
),
]
)
it.outputDir.set(prefabHeadersDir)
Expand Down Expand Up @@ -404,7 +411,6 @@ android {

targets "reactnativejni",
"jscexecutor",
"hermes-executor",
"jsijniprofiler",
"reactnativeblob",
"reactperfloggerjni",
Expand All @@ -427,7 +433,8 @@ android {
"yoga",
"folly_runtime",
"react_nativemodule_core",
"react_render_imagemanager"
"react_render_imagemanager",
"hermes-executor"
}
}
ndk {
Expand Down Expand Up @@ -532,6 +539,9 @@ android {
react_render_imagemanager {
headers(new File(prefabHeadersDir, "react_render_imagemanager").absolutePath)
}
"hermes-executor" {
headers(new File(prefabHeadersDir, "hermes-executor").absolutePath)
}
}

publishing {
Expand Down
3 changes: 2 additions & 1 deletion ReactCommon/hermes/executor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ target_link_libraries(hermes-executor-common
jsireact
hermes-engine::libhermes
jsi
debug hermes-inspector
debug
hermes-inspector
)

if(${CMAKE_BUILD_TYPE} MATCHES Debug)
Expand Down

0 comments on commit b89efc8

Please sign in to comment.