From 311d4e9ef080aa429f840236cc23c013c0ae644c Mon Sep 17 00:00:00 2001 From: grabbou Date: Tue, 22 Sep 2020 14:39:57 -0700 Subject: [PATCH] feat: enable bitcode (#365) Summary: Bitcode is turned on by default in React Native and so, setting it here as well. Changelog: [iOS] [Changed] - Upgraded JSI with a new HERMES_ENABLE_BITCODE flag Pull Request resolved: https://github.com/facebook/hermes/pull/365 Reviewed By: tmikov Differential Revision: D23823228 Pulled By: Huxpro fbshipit-source-id: d43638818a733f6a87b2f4a1ecadad8ea9c7a419 --- ReactCommon/jsi/jsi/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ReactCommon/jsi/jsi/CMakeLists.txt b/ReactCommon/jsi/jsi/CMakeLists.txt index d04af0006af..121d697fd8e 100644 --- a/ReactCommon/jsi/jsi/CMakeLists.txt +++ b/ReactCommon/jsi/jsi/CMakeLists.txt @@ -21,6 +21,9 @@ elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC") # when they go out of scope due to exceptions. list(APPEND jsi_compile_flags "/EHsc") endif() +if (HERMES_ENABLE_BITCODE) + list(APPEND jsi_compile_flags "-fembed-bitcode") +endif () target_compile_options(jsi PUBLIC ${jsi_compile_flags}) install(DIRECTORY "${PROJECT_SOURCE_DIR}/API/jsi/" DESTINATION include