mirror of
https://github.com/darlinghq/darling-compiler-rt.git
synced 2024-11-30 07:10:42 +00:00
More changes needed for dylib usage
This commit is contained in:
parent
da0a3111a3
commit
52df903643
@ -6,8 +6,10 @@ if(COMMAND cmake_policy)
|
||||
cmake_policy(SET CMP0003 NEW)
|
||||
endif(COMMAND cmake_policy)
|
||||
|
||||
include(darling_static_lib)
|
||||
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -nostdinc")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -nostdlib -Wl,-dylib_install_name,/usr/lib/system/libsystem_blocks.dylib -Wl,-flat_namespace -Wl,-undefined,suppress")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -nostdlib -Wl,-flat_namespace -Wl,-undefined,suppress")
|
||||
|
||||
add_definitions(-DTARGET_OS_MAC=1)
|
||||
add_definitions(-DHAVE_STDINT_H=1)
|
||||
@ -18,7 +20,13 @@ set(blocks_sources
|
||||
runtime.c
|
||||
)
|
||||
|
||||
add_darling_library(system_blocks SHARED ${blocks_sources})
|
||||
target_link_libraries(system_blocks PRIVATE system_c system_kernel system_m system_malloc)
|
||||
set(CMAKE_AR "${CMAKE_BINARY_DIR}/src/external/cctools-port/cctools/ar/x86_64-apple-darwin11-ar" PARENT_SCOPE)
|
||||
set(CMAKE_RANLIB "${CMAKE_BINARY_DIR}/src/external/cctools-port/cctools/misc/ranlib" PARENT_SCOPE)
|
||||
|
||||
install(TARGETS system_blocks DESTINATION ${CMAKE_INSTALL_LIBDIR}/darling)
|
||||
set(DYLIB_INSTALL_NAME "/usr/lib/system/libsystem_blocks.dylib")
|
||||
add_darling_library(system_blocks SHARED ${blocks_sources})
|
||||
add_library(system_blocks_static STATIC ${blocks_sources})
|
||||
target_link_libraries(system_blocks PRIVATE system_c system_kernel system_m system_malloc)
|
||||
add_dependencies(system_blocks_static ranlib x86_64-apple-darwin11-ar)
|
||||
|
||||
install(TARGETS system_blocks DESTINATION libexec/darling/usr/lib/system)
|
||||
|
@ -357,10 +357,6 @@ set(mips64_SOURCES ${mips_SOURCES})
|
||||
set(mips64el_SOURCES ${mips_SOURCES})
|
||||
|
||||
if (DARLING)
|
||||
SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/darling")
|
||||
SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
|
||||
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
||||
|
||||
if (BITS EQUAL 64)
|
||||
set(arch "x86_64")
|
||||
else (BITS EQUAL 64)
|
||||
@ -377,10 +373,15 @@ if (DARLING)
|
||||
|
||||
if (BITS EQUAL 64)
|
||||
add_darling_library(compiler_rt SHARED ${x86_64_SOURCES})
|
||||
|
||||
set(CMAKE_AR "${CMAKE_BINARY_DIR}/src/external/cctools-port/cctools/ar/x86_64-apple-darwin11-ar")
|
||||
set(CMAKE_RANLIB "${CMAKE_BINARY_DIR}/src/external/cctools-port/cctools/misc/ranlib")
|
||||
add_library(compiler_rt_static STATIC ${x86_64_SOURCES})
|
||||
add_dependencies(compiler_rt_static ranlib x86_64-apple-darwin11-ar)
|
||||
else (BITS EQUAL 64)
|
||||
add_darling_library(compiler_rt SHARED ${i386_SOURCES})
|
||||
endif (BITS EQUAL 64)
|
||||
install(TARGETS compiler_rt DESTINATION ${CMAKE_INSTALL_LIBDIR}/darling)
|
||||
install(TARGETS compiler_rt DESTINATION libexec/darling/usr/lib/system)
|
||||
|
||||
return ()
|
||||
endif (DARLING)
|
||||
|
Loading…
Reference in New Issue
Block a user