Skip to content

Commit 2da062f

Browse files
cortinicofacebook-github-bot
authored andcommitted
Enable INTERPROCEDURAL_OPTIMIZATION for libappmodules.so in OSS (#50580)
Summary: Pull Request resolved: #50580 This follow ups to us enabling INTERPROCEDURAL_OPTIMIZATION to libreactnative.so and enables INTERPROCEDURAL_OPTIMIZATION for the app module as well. Changelog: [Android] [Changed] - Enable INTERPROCEDURAL_OPTIMIZATION for libappmodules.so in OSS Reviewed By: rshest Differential Revision: D72696658 fbshipit-source-id: ec07c7df9a639b5c3df8923ec384db90a78463e9
1 parent 423d4fd commit 2da062f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

packages/react-native/ReactAndroid/cmake-utils/ReactNative-application.cmake

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,13 @@ if(CCACHE_FOUND)
3131
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
3232
endif(CCACHE_FOUND)
3333

34+
# If the user toolchain supports IPO, we enable it for the app build
35+
include(CheckIPOSupported)
36+
check_ipo_supported(RESULT IPO_SUPPORT)
37+
if (IPO_SUPPORT)
38+
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
39+
endif()
40+
3441
set(BUILD_DIR ${PROJECT_BUILD_DIR})
3542
file(TO_CMAKE_PATH "${BUILD_DIR}" BUILD_DIR)
3643
file(TO_CMAKE_PATH "${REACT_ANDROID_DIR}" REACT_ANDROID_DIR)

0 commit comments

Comments
 (0)