mirror of
https://github.com/darlinghq/darling.git
synced 2026-05-03 09:19:19 -05:00
Build dSYM files for all binaries
This commit is contained in:
@@ -34,6 +34,8 @@ endif (${CMAKE_C_COMPILER_ID} STREQUAL "Clang" AND NOT ${CMAKE_C_COMPILER_VERSIO
|
||||
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${IGNORED_WARNINGS}")
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${IGNORED_WARNINGS}")
|
||||
SET(CMAKE_C_FLAGS_DEBUG "-O0 -ggdb")
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -ggdb")
|
||||
|
||||
enable_language(ASM-ATT)
|
||||
|
||||
|
||||
@@ -16,5 +16,9 @@ FUNCTION(add_darling_executable exe)
|
||||
use_ld64(${exe})
|
||||
target_link_libraries(${exe} system)
|
||||
add_dependencies(${exe} csu)
|
||||
|
||||
if (NOT NO_DSYM)
|
||||
dsym(${exe})
|
||||
endif (NOT NO_DSYM)
|
||||
ENDFUNCTION(add_darling_executable)
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ endif(COMMAND cmake_policy)
|
||||
|
||||
include(use_ld64)
|
||||
include(CMakeParseArguments)
|
||||
include(dsym)
|
||||
|
||||
FUNCTION(add_darling_library name)
|
||||
foreach(f IN LISTS ARGN)
|
||||
@@ -39,6 +40,10 @@ FUNCTION(add_darling_library name)
|
||||
endif (DYLIB_CURRENT_VERSION)
|
||||
|
||||
use_ld64(${name})
|
||||
|
||||
if (NOT NO_DSYM)
|
||||
dsym(${name})
|
||||
endif (NOT NO_DSYM)
|
||||
ENDFUNCTION(add_darling_library)
|
||||
|
||||
FUNCTION(make_fat)
|
||||
|
||||
+5
-3
@@ -1,11 +1,13 @@
|
||||
|
||||
function(dsym target)
|
||||
if (DSYMUTIL_EXE)
|
||||
if (DSYMUTIL_EXE AND CMAKE_BUILD_TYPE MATCHES DEBUG)
|
||||
|
||||
set(ENV{PATH} "${CMAKE_BINARY_DIR}/src/external/cctools-port/cctools/misc:$ENV{PATH}") # for lipo
|
||||
add_custom_command(OUTPUT "${target}.dSYM" COMMAND ${CMAKE_COMMAND} -E env
|
||||
"PATH=${CMAKE_BINARY_DIR}/src/external/cctools-port/cctools/misc:$ENV{PATH}"
|
||||
"${DSYMUTIL_EXE}" "-flat" "-o" "${target}.dSYM" "$<TARGET_FILE:${target}>")
|
||||
|
||||
add_custom_command(OUTPUT "${target}.dSYM" COMMAND "${DSYMUTIL_EXE}" "-flat" "-o" "${target}.dSYM" "$<TARGET_FILE:${target}>")
|
||||
add_custom_target("${target}-dSYM" ALL DEPENDS "${target}" "${target}.dSYM" getuuid lipo)
|
||||
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${target}.dSYM" DESTINATION "${CMAKE_INSTALL_PREFIX}/libexec/darling/System/Library/Caches/dsym/files")
|
||||
install(DIRECTORY DESTINATION "${CMAKE_INSTALL_PREFIX}/libexec/darling/System/Library/Caches/dsym/uuid")
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#define _REASON_H_
|
||||
|
||||
#include <stdint.h>
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
|
||||
@@ -19,6 +19,6 @@ set(csu_SRCS
|
||||
crt1.10.6.S
|
||||
)
|
||||
|
||||
add_darling_library(csu STATIC ${csu_SRCS})
|
||||
add_darling_static_library(csu SOURCES ${csu_SRCS})
|
||||
make_fat(csu)
|
||||
|
||||
|
||||
Vendored
+1
-1
Submodule src/external/objc4 updated: 21808aed62...489e12b857
@@ -13,7 +13,7 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
add_subdirectory(emulation/linux)
|
||||
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse -msse2 -msse3 -w -fblocks -ggdb")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse -msse2 -msse3 -w -fblocks -ffreestanding")
|
||||
|
||||
# Why -bind_at_load is necessary:
|
||||
# I couldn't find something like -Bsymbolic in Apple's ld
|
||||
|
||||
Reference in New Issue
Block a user