Skip to content

Commit

Permalink
Move several libs from default App CMake setup to static linking (#43909
Browse files Browse the repository at this point in the history
)

Summary:
Pull Request resolved: #43909

As we're moving towards a single `libreactnative.so` file, we need to remove several of our prefab targets. Here I'm cleaning up those that are not having an OnLoad.cpp file which needs to be loaded from SoLoader.

This is breaking for libraries using native dependencies via Prefab (i.e. search for `ReactAndroid::` in CMakeLists.txt files for your project).

If so, the CMakeLists.txt files should be updated as follows:

```diff
- ReactAndroid::react_render_debug
+ ReactAndroid::reactnative
```

This applies to every prefab dependencies (the example is just for `react_render_debug`

Changelog:
[General] [Breaking] - Remove several libs from default App CMake setup

Reviewed By: cipolleschi

Differential Revision: D55751683

fbshipit-source-id: 3aca7897852b5f323d60ede3c5036cae2f81e6c3
  • Loading branch information
cortinico authored and facebook-github-bot committed Jul 26, 2024
1 parent 68453a1 commit 52de8c7
Show file tree
Hide file tree
Showing 40 changed files with 155 additions and 358 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,21 +85,9 @@ target_include_directories(react_codegen_${libraryName} PUBLIC . react/renderer/
target_link_libraries(
react_codegen_${libraryName}
fbjni
folly_runtime
glog
jsi
${libraryName !== 'rncore' ? 'react_codegen_rncore' : ''}
react_debug
react_nativemodule_core
react_render_componentregistry
react_render_core
react_render_debug
react_render_graphics
react_render_imagemanager
react_render_mapbuffer
react_utils
rrc_image
rrc_view
reactnative
turbomodulejsijni
yoga
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,21 +55,9 @@ target_include_directories(react_codegen_SampleWithUppercaseName PUBLIC . react/
target_link_libraries(
react_codegen_SampleWithUppercaseName
fbjni
folly_runtime
glog
jsi
react_codegen_rncore
react_debug
react_nativemodule_core
react_render_componentregistry
react_render_core
react_render_debug
react_render_graphics
react_render_imagemanager
react_render_mapbuffer
react_utils
rrc_image
rrc_view
reactnative
turbomodulejsijni
yoga
)
Expand Down Expand Up @@ -142,21 +130,9 @@ target_include_directories(react_codegen_complex_objects PUBLIC . react/renderer
target_link_libraries(
react_codegen_complex_objects
fbjni
folly_runtime
glog
jsi
react_codegen_rncore
react_debug
react_nativemodule_core
react_render_componentregistry
react_render_core
react_render_debug
react_render_graphics
react_render_imagemanager
react_render_mapbuffer
react_utils
rrc_image
rrc_view
reactnative
turbomodulejsijni
yoga
)
Expand Down Expand Up @@ -222,21 +198,9 @@ target_include_directories(react_codegen_cxx_only_native_modules PUBLIC . react/
target_link_libraries(
react_codegen_cxx_only_native_modules
fbjni
folly_runtime
glog
jsi
react_codegen_rncore
react_debug
react_nativemodule_core
react_render_componentregistry
react_render_core
react_render_debug
react_render_graphics
react_render_imagemanager
react_render_mapbuffer
react_utils
rrc_image
rrc_view
reactnative
turbomodulejsijni
yoga
)
Expand Down Expand Up @@ -309,21 +273,9 @@ target_include_directories(react_codegen_empty_native_modules PUBLIC . react/ren
target_link_libraries(
react_codegen_empty_native_modules
fbjni
folly_runtime
glog
jsi
react_codegen_rncore
react_debug
react_nativemodule_core
react_render_componentregistry
react_render_core
react_render_debug
react_render_graphics
react_render_imagemanager
react_render_mapbuffer
react_utils
rrc_image
rrc_view
reactnative
turbomodulejsijni
yoga
)
Expand Down Expand Up @@ -396,21 +348,9 @@ target_include_directories(react_codegen_event_emitter_module PUBLIC . react/ren
target_link_libraries(
react_codegen_event_emitter_module
fbjni
folly_runtime
glog
jsi
react_codegen_rncore
react_debug
react_nativemodule_core
react_render_componentregistry
react_render_core
react_render_debug
react_render_graphics
react_render_imagemanager
react_render_mapbuffer
react_utils
rrc_image
rrc_view
reactnative
turbomodulejsijni
yoga
)
Expand Down Expand Up @@ -483,21 +423,9 @@ target_include_directories(react_codegen_native_modules_with_type_aliases PUBLIC
target_link_libraries(
react_codegen_native_modules_with_type_aliases
fbjni
folly_runtime
glog
jsi
react_codegen_rncore
react_debug
react_nativemodule_core
react_render_componentregistry
react_render_core
react_render_debug
react_render_graphics
react_render_imagemanager
react_render_mapbuffer
react_utils
rrc_image
rrc_view
reactnative
turbomodulejsijni
yoga
)
Expand Down Expand Up @@ -578,21 +506,9 @@ target_include_directories(react_codegen_real_module_example PUBLIC . react/rend
target_link_libraries(
react_codegen_real_module_example
fbjni
folly_runtime
glog
jsi
react_codegen_rncore
react_debug
react_nativemodule_core
react_render_componentregistry
react_render_core
react_render_debug
react_render_graphics
react_render_imagemanager
react_render_mapbuffer
react_utils
rrc_image
rrc_view
reactnative
turbomodulejsijni
yoga
)
Expand Down Expand Up @@ -665,21 +581,9 @@ target_include_directories(react_codegen_simple_native_modules PUBLIC . react/re
target_link_libraries(
react_codegen_simple_native_modules
fbjni
folly_runtime
glog
jsi
react_codegen_rncore
react_debug
react_nativemodule_core
react_render_componentregistry
react_render_core
react_render_debug
react_render_graphics
react_render_imagemanager
react_render_mapbuffer
react_utils
rrc_image
rrc_view
reactnative
turbomodulejsijni
yoga
)
Expand Down Expand Up @@ -760,21 +664,9 @@ target_include_directories(react_codegen_two_modules_different_files PUBLIC . re
target_link_libraries(
react_codegen_two_modules_different_files
fbjni
folly_runtime
glog
jsi
react_codegen_rncore
react_debug
react_nativemodule_core
react_render_componentregistry
react_render_core
react_render_debug
react_render_graphics
react_render_imagemanager
react_render_mapbuffer
react_utils
rrc_image
rrc_view
reactnative
turbomodulejsijni
yoga
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,8 @@ target_include_directories(react_codegen_ReactPopupMenuAndroidSpecs PUBLIC . rea
target_link_libraries(
react_codegen_ReactPopupMenuAndroidSpecs
fbjni
folly_runtime
glog
jsi
react_codegen_rncore
react_debug
react_nativemodule_core
react_render_componentregistry
react_render_core
react_render_debug
react_render_graphics
react_render_imagemanager
react_render_mapbuffer
react_utils
rrc_image
rrc_view
turbomodulejsijni
reactnative
yoga
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,8 @@ target_include_directories(react_codegen_OSSLibraryExampleSpec PUBLIC . react/re
target_link_libraries(
react_codegen_OSSLibraryExampleSpec
fbjni
folly_runtime
glog
jsi
react_codegen_rncore
react_debug
react_nativemodule_core
react_render_componentregistry
react_render_core
react_render_debug
react_render_graphics
react_render_imagemanager
react_render_mapbuffer
react_utils
rrc_image
rrc_view
turbomodulejsijni
reactnative
yoga
)

Expand Down
Loading

0 comments on commit 52de8c7

Please sign in to comment.