Skip to content

Commit f107c28

Browse files
cortinicofacebook-github-bot
authored andcommitted
Enable INTERPROCEDURAL_OPTIMIZATION for React Native (#50529)
Summary: Pull Request resolved: #50529 This enables INTERPROCEDURAL_OPTIMIZATION for the CMake build of React Native. Changelog: [Android] [Changed] - Enable INTERPROCEDURAL_OPTIMIZATION for React Native Reviewed By: NickGerleman Differential Revision: D72574119 fbshipit-source-id: e414a61fee13e61f15044d93f5ad28f26aba4ed5
1 parent f866a8d commit f107c28

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

packages/react-native/ReactAndroid/src/main/jni/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@ set(CMAKE_VERBOSE_MAKEFILE on)
88

99
project(ReactAndroid)
1010

11+
include(CheckIPOSupported)
12+
check_ipo_supported(RESULT IPO_SUPPORT)
13+
if (IPO_SUPPORT)
14+
message(STATUS "LTO support is enabled")
15+
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
16+
endif()
17+
1118
include(${REACT_COMMON_DIR}/cmake-utils/react-native-flags.cmake)
1219

1320
# Convert input paths to CMake format (with forward slashes)

0 commit comments

Comments
 (0)