Skip to content

Commit

Permalink
remove dSYM generating
Browse files Browse the repository at this point in the history
  • Loading branch information
piaskowyk committed Dec 12, 2024
1 parent 8840972 commit 999b2d3
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 26 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -327,9 +327,9 @@ if(HERMES_CHECK_NATIVE_STACK)
add_definitions(-DHERMES_CHECK_NATIVE_STACK)
endif()

if(HERMES_BUILD_APPLE_DSYM)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -gdwarf")
endif()
# if(HERMES_BUILD_APPLE_DSYM)
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -gdwarf")
# endif()

if (HERMES_IS_MOBILE_BUILD)
add_definitions(-DHERMES_IS_MOBILE_BUILD)
Expand Down
46 changes: 23 additions & 23 deletions lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -207,32 +207,32 @@ endif()

# Create debug symbols (dSYM) bundle for Apple platform dylibs/frameworks
# Largely inspired by https://github.com/llvm/llvm-project/blob/6701993027f8af172d7ba697884459261b00e3c6/llvm/cmake/modules/AddLLVM.cmake#L1934-L1986
if(HERMES_BUILD_APPLE_DSYM)
if(CMAKE_CXX_FLAGS MATCHES "-flto")
set(lto_object ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/hermesvm-lto.o)
set_property(TARGET hermesvm APPEND_STRING PROPERTY LINK_FLAGS " -Wl,-object_path_lto,${lto_object}")
endif()
# if(HERMES_BUILD_APPLE_DSYM)
# if(CMAKE_CXX_FLAGS MATCHES "-flto")
# set(lto_object ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/hermesvm-lto.o)
# set_property(TARGET hermesvm APPEND_STRING PROPERTY LINK_FLAGS " -Wl,-object_path_lto,${lto_object}")
# endif()

get_target_property(DSYM_PATH hermesvm LOCATION)
if(HERMES_BUILD_APPLE_FRAMEWORK)
get_filename_component(DSYM_PATH ${DSYM_PATH} DIRECTORY)
endif()
set(DSYM_PATH "${DSYM_PATH}.dSYM")
# get_target_property(DSYM_PATH hermesvm LOCATION)
# if(HERMES_BUILD_APPLE_FRAMEWORK)
# get_filename_component(DSYM_PATH ${DSYM_PATH} DIRECTORY)
# endif()
# set(DSYM_PATH "${DSYM_PATH}.dSYM")

if(NOT CMAKE_DSYMUTIL)
set(CMAKE_DSYMUTIL xcrun dsymutil)
endif()
add_custom_command(TARGET hermesvm POST_BUILD
COMMAND ${CMAKE_DSYMUTIL} $<TARGET_FILE:hermesvm> --out ${DSYM_PATH}
BYPRODUCTS ${DSYM_PATH}
)
# if(NOT CMAKE_DSYMUTIL)
# set(CMAKE_DSYMUTIL xcrun dsymutil)
# endif()
# add_custom_command(TARGET hermesvm POST_BUILD
# COMMAND ${CMAKE_DSYMUTIL} $<TARGET_FILE:hermesvm> --out ${DSYM_PATH}
# BYPRODUCTS ${DSYM_PATH}
# )

if(HERMES_BUILD_APPLE_FRAMEWORK)
install(DIRECTORY ${DSYM_PATH} DESTINATION Library/Frameworks/${HERMES_APPLE_TARGET_PLATFORM})
else()
install(DIRECTORY ${DSYM_PATH} DESTINATION lib)
endif()
endif()
# if(HERMES_BUILD_APPLE_FRAMEWORK)
# install(DIRECTORY ${DSYM_PATH} DESTINATION Library/Frameworks/${HERMES_APPLE_TARGET_PLATFORM})
# else()
# install(DIRECTORY ${DSYM_PATH} DESTINATION lib)
# endif()
# endif()

# Force the entire hermesvm_a library to be used by hermesvm. There is
# no cross platform way to do this (force_load is for macOS). Once we upgrade
Expand Down

0 comments on commit 999b2d3

Please sign in to comment.