From b0e97c11eb5ca310c1e9e7ae1c18fe83364d29be Mon Sep 17 00:00:00 2001 From: Nicola Corti Date: Tue, 4 Oct 2022 04:18:53 -0700 Subject: [PATCH] Propagate common flag to autolinked libraries (#34853) Summary: I'm handling this TODO i left to unbreak the CI. We need to make sure all the autolinked libraries are getting the folly flags and other common flags propagated correctly. ## Changelog [Internal] [Change] - Propagate common flag to autolinked libraries Pull Request resolved: https://github.com/facebook/react-native/pull/34853 Test Plan: Will rely on a green CI Reviewed By: cipolleschi Differential Revision: D40055134 Pulled By: cortinico fbshipit-source-id: fb9afab954ab402f6a3ab417aba934035580f936 --- ReactAndroid/cmake-utils/ReactNative-application.cmake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ReactAndroid/cmake-utils/ReactNative-application.cmake b/ReactAndroid/cmake-utils/ReactNative-application.cmake index 8671abf3b0121d..8c5682d9edd227 100644 --- a/ReactAndroid/cmake-utils/ReactNative-application.cmake +++ b/ReactAndroid/cmake-utils/ReactNative-application.cmake @@ -101,6 +101,7 @@ target_link_libraries(ReactAndroid::react_codegen_rncore INTERFACE common_flags) if(EXISTS ${PROJECT_BUILD_DIR}/generated/rncli/src/main/jni/Android-rncli.cmake) include(${PROJECT_BUILD_DIR}/generated/rncli/src/main/jni/Android-rncli.cmake) target_link_libraries(${CMAKE_PROJECT_NAME} ${AUTOLINKED_LIBRARIES}) - # TODO Re-link autlinking libraries against common_flags - # target_link_libraries(${AUTOLINKED_LIBRARIES} PRIVATE common_flags) + foreach(autolinked_library ${AUTOLINKED_LIBRARIES}) + target_link_libraries(autolinked_library INTERFACE common_flags) + endforeach() endif()