Skip to content

Commit 38ef4c3

Browse files
cortinicofacebook-github-bot
authored andcommitted
Enable INTERPROCEDURAL_OPTIMIZATION for React Native
Summary: This enables INTERPROCEDURAL_OPTIMIZATION for the CMake build of React Native. Changelog: [Android] [Changed] - Enable INTERPROCEDURAL_OPTIMIZATION for React Native Differential Revision: D72574119
1 parent 1853957 commit 38ef4c3

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

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

+7
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)