Use reference Yoga CMake build for libyogacore (#37371)

Summary:
X-link: https://github.com/facebook/yoga/pull/1291

Pull Request resolved: https://github.com/facebook/react-native/pull/37371

This makes React Native use `libyogacore` as provided by Yoga's reference CMake build. This in turn matches Yoga in the OSS RN build to the same compilation settings we use internally. It also means less differences between all the builds (maintainability win).

This does not yet do the same for the Yoga JNI bindings.

Changelog:
[Android][Changed] - Use reference Yoga CMake Build

Reviewed By: cortinico

Differential Revision: D45764537

fbshipit-source-id: 1aafd221d2afa994b6efae3c267ee7ffbdf0faad
This commit is contained in:
Nick Gerleman
2023-05-11 08:34:02 -07:00
committed by Facebook GitHub Bot
parent f5759d7b5a
commit 6764adafe4
@@ -6,17 +6,9 @@
cmake_minimum_required(VERSION 3.13)
set(CMAKE_VERBOSE_MAKEFILE on)
add_compile_options(
-fexceptions
-frtti
-O3
-Wall
-Wpedantic
-Wno-gnu-zero-variadic-macro-arguments)
# Yoga by default does not enable optimizations in debug builds. Enable -O2
# for all builds in RN for faster debug app performance (at the cost of not
# being able to debug inside Yoga)
set(CMAKE_BUILD_TYPE Release)
file(GLOB_RECURSE yogacore_SRC CONFIGURE_DEPENDS yoga/*.cpp)
add_library(yogacore STATIC ${yogacore_SRC})
target_include_directories(yogacore PUBLIC .)
target_link_libraries(yogacore android log)
add_subdirectory(yoga)