Skip to content

Commit

Permalink
Remove bitcode flag
Browse files Browse the repository at this point in the history
  • Loading branch information
piaskowyk committed Dec 11, 2024
1 parent 2011a91 commit 9d3b4af
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 22 deletions.
3 changes: 0 additions & 3 deletions API/jsi/jsi/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ 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 PRIVATE ${jsi_compile_flags})

install(DIRECTORY "${PROJECT_SOURCE_DIR}/API/jsi/" DESTINATION include
Expand Down
5 changes: 0 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -203,10 +203,6 @@ set(HERMES_ENABLE_FUZZILLI OFF CACHE BOOL
set(HERMES_ENABLE_TOOLS ON CACHE BOOL
"Enable CLI tools")

# Enable bitcode
set(HERMES_ENABLE_BITCODE OFF CACHE BOOL
"Include bitcode with the framework")

# Set linker flag for building the fuzzer
set(HERMES_FUZZING_FLAG "-fsanitize=fuzzer" CACHE STRING
"Linker argument to link fuzz targets against a given fuzzer.")
Expand Down Expand Up @@ -565,7 +561,6 @@ elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC")
endif()

# TODO: Investigate disabling strict signed integer overflow for MSVC

# MSVC does not have strict aliasing so there is no need to support it.
# Similar to GCC/Clang above, disable strict signed integer overflow.
# append("/d2UndefIntOverflow-" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
Expand Down
6 changes: 0 additions & 6 deletions cmake/modules/Hermes.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,6 @@ function(add_hermes_library name)
target_link_libraries(${name} ${ARG_LINK_OBJLIBS} ${ARG_LINK_LIBS})
set_property(TARGET ${name} PROPERTY POSITION_INDEPENDENT_CODE ON)
hermes_update_compile_flags(${name})
if (HERMES_ENABLE_BITCODE)
target_compile_options(${name} PUBLIC "-fembed-bitcode")
endif ()
else()
# When asking to link an OBJECT library (the default), we create an OBJECT
# library with a suffix _obj, which depends on all object libraries in
Expand All @@ -151,9 +148,6 @@ function(add_hermes_library name)
target_link_libraries(${name}_obj ${ARG_LINK_LIBS})
set_property(TARGET ${name}_obj PROPERTY POSITION_INDEPENDENT_CODE ON)
hermes_update_compile_flags(${name}_obj)
if (HERMES_ENABLE_BITCODE)
target_compile_options(${name}_obj PUBLIC "-fembed-bitcode")
endif ()

add_library(${name} STATIC)
target_link_libraries(${name} ${name}_obj ${ARG_LINK_OBJLIBS})
Expand Down
9 changes: 1 addition & 8 deletions utils/build-apple-framework.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,7 @@ function build_host_hermesc {

# Utility function to configure an Apple framework
function configure_apple_framework {
local build_cli_tools enable_bitcode

if [[ $1 == appletvos || $1 == iphoneos || $1 == catalyst || $1 == visionos ]]; then
enable_bitcode="true"
else
enable_bitcode="false"
fi
local build_cli_tools
if [[ $1 == macosx ]]; then
build_cli_tools="true"
else
Expand All @@ -75,7 +69,6 @@ function configure_apple_framework {
-DHERMES_ENABLE_LIBFUZZER:BOOLEAN=false \
-DHERMES_ENABLE_FUZZILLI:BOOLEAN=false \
-DHERMES_ENABLE_TEST_SUITE:BOOLEAN=false \
-DHERMES_ENABLE_BITCODE:BOOLEAN="$enable_bitcode" \
-DHERMES_BUILD_APPLE_FRAMEWORK:BOOLEAN=true \
-DHERMES_BUILD_APPLE_DSYM:BOOLEAN=true \
-DHERMES_ENABLE_TOOLS:BOOLEAN="$build_cli_tools" \
Expand Down

0 comments on commit 9d3b4af

Please sign in to comment.