this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Attempt to link more libraries using two-level namespace

+102 -96
+2 -2
cmake/darling_framework.cmake
··· 25 25 else (FRAMEWORK_IOSSUPPORT) 26 26 set(sys_library_dir "System/Library") 27 27 endif (FRAMEWORK_IOSSUPPORT) 28 - 28 + 29 29 if(DEFINED FRAMEWORK_PARENT) 30 30 if(NOT DEFINED FRAMEWORK_PARENT_VERSION) 31 31 # 99% of the time it's version A ··· 57 57 endif (FRAMEWORK_FAT) 58 58 59 59 endif (FRAMEWORK_CIRCULAR_DEPENDENCIES) 60 - 60 + 61 61 set_property(TARGET ${my_name} PROPERTY DYLIB_INSTALL_NAME ${DYLIB_INSTALL_NAME}) 62 62 63 63 if (FRAMEWORK_CURRENT_VERSION)
+12 -5
src/dyld/CMakeLists.txt
··· 13 13 14 14 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -Wno-availability -include ${CMAKE_SOURCE_DIR}/src/duct/include/CrashReporterClient.h") 15 15 set(CMAKE_SHARED_LINKER_FLAGS_SAVED "${CMAKE_SHARED_LINKER_FLAGS}") 16 - set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -nostdlib -Wl,-bind_at_load -Wl,-flat_namespace -Wl,-undefined,suppress") 16 + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -nostdlib") 17 17 18 18 add_definitions(-DHAVE_STDINT_H=1) 19 19 ··· 60 60 dyld3/ClosureBuilder.cpp 61 61 dyld3/Closure.cpp 62 62 dyld3/ClosureFileSystemPhysical.cpp 63 - dyld3/ClosurePrinter.cpp 63 + #dyld3/ClosurePrinter.cpp 64 64 dyld3/ClosureWriter.cpp 65 65 dyld3/Diagnostics.cpp 66 66 dyld3/shared-cache/DyldSharedCache.cpp ··· 74 74 dyld3/PathOverrides.cpp 75 75 dyld3/Tracing.cpp 76 76 77 - SIBLINGS 78 - system_c system_kernel compiler_rt platform 79 - DEPENDENCIES 77 + UPWARD 78 + system_c 79 + system_kernel 80 + system_malloc 81 + system_blocks 82 + system_pthread 83 + system_sandbox 84 + libdispatch_shared 85 + compiler_rt 86 + platform 80 87 launch 81 88 ) 82 89 set_target_properties(system_dyld PROPERTIES
+8 -3
src/launchd/liblaunch/CMakeLists.txt
··· 10 10 add_definitions(-w -nostdinc) 11 11 12 12 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fblocks -include ${CMAKE_SOURCE_DIR}/kernel-include/sys/fileport.h -ggdb") 13 - set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -nostdlib -Wl,-flat_namespace -Wl,-undefined,suppress") 13 + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -nostdlib") 14 14 15 15 mig(job.defs) 16 16 mig(helper.defs) ··· 30 30 SIBLINGS 31 31 system_c 32 32 system_kernel 33 + system_dyld 34 + DEPENDENCIES 35 + system_pthread 36 + system_malloc 37 + platform 38 + libdispatch_shared 39 + compiler_rt 33 40 ) 34 - #target_link_libraries(launch PRIVATE system_c system_kernel) 35 - #make_fat(launch) 36 41 37 42 install(TARGETS launch DESTINATION libexec/darling/usr/lib/system) 38 43
-1
src/libinfo/CMakeLists.txt
··· 70 70 xpc 71 71 compiler_rt 72 72 launch 73 - DEPENDENCIES 74 73 resolv-darwin 75 74 ) 76 75 #target_link_libraries(system_info PRIVATE system_c resolv-darwin system_dyld system_blocks libdispatch_shared system_notify platform)
+2 -1
src/libmalloc/CMakeLists.txt
··· 40 40 ${libmalloc_sources} 41 41 SIBLINGS 42 42 system_kernel 43 - system_c 44 43 platform 45 44 system_dyld 46 45 compiler_rt 46 + UPWARD 47 + system_c 47 48 ) 48 49 49 50 install(TARGETS system_malloc DESTINATION libexec/darling/usr/lib/system)
+1 -2
src/libnotify/CMakeLists.txt
··· 30 30 add_circular(system_notify FAT 31 31 SOURCES 32 32 ${notify_sources} 33 - SIBLINGS 33 + DEPENDENCIES 34 34 system_c 35 35 system_kernel 36 36 system_blocks ··· 43 43 system_asl 44 44 ) 45 45 #target_link_libraries(system_notify system_c system_kernel system_blocks libdispatch_shared launch system_dyld system_malloc system_pthread) 46 - #make_fat(system_notify) 47 46 48 47 add_darling_executable(notifyutil notifyutil/notifyutil.c) 49 48
+16 -4
src/libresolv/CMakeLists.txt
··· 15 15 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/dnsinfo) 16 16 17 17 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fblocks -nostdinc -DUSE__RES_9") 18 - set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -nostdlib -Wl,-flat_namespace -Wl,-undefined,suppress") 18 + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -nostdlib") 19 19 20 20 # Hide warnings 21 21 add_definitions( ··· 58 58 set(DYLIB_COMPAT_VERSION "1.0.0") 59 59 set(DYLIB_CURRENT_VERSION "1.0.0") 60 60 set(DYLIB_INSTALL_NAME "/usr/lib/libresolv.9.dylib") 61 - add_darling_library(resolv-darwin SHARED ${resolv_sources}) 61 + 62 + add_circular(resolv-darwin FAT 63 + SOURCES 64 + ${resolv_sources} 65 + SIBLINGS 66 + system_info 67 + DEPENDENCIES 68 + system_pthread 69 + system_malloc 70 + system_c 71 + system_kernel 72 + system_dnssd 73 + system_notify 74 + system_dyld 75 + ) 62 76 set_target_properties(resolv-darwin PROPERTIES OUTPUT_NAME "resolv.9") 63 - make_fat(resolv-darwin) 64 - #target_link_libraries(resolv-darwin PRIVATE system) 65 77 66 78 InstallSymlink("libresolv.9.dylib" "${CMAKE_INSTALL_PREFIX}/libexec/darling/usr/lib/libresolv.dylib") 67 79 install(TARGETS resolv-darwin DESTINATION libexec/darling/usr/lib)
+1 -1
src/libsandbox/CMakeLists.txt
··· 8 8 src/sandbox.c 9 9 ) 10 10 set_target_properties(sandbox_not_system PROPERTIES OUTPUT_NAME sandbox.1) 11 - make_fat(sandbox) 11 + make_fat(sandbox_not_system) 12 12 target_link_libraries(sandbox_not_system system) 13 13 install(TARGETS sandbox_not_system DESTINATION libexec/darling/usr/lib) 14 14 InstallSymlink(libsandbox.1.dylib ${CMAKE_INSTALL_PREFIX}/libexec/darling/usr/lib/libsandbox.dylib)
+48 -72
src/libsystem/CMakeLists.txt
··· 32 32 ) 33 33 34 34 set(DYLIB_INSTALL_NAME "/usr/lib/libSystem.B.dylib") 35 - add_circular(system FAT 36 - SOURCES 37 - ${libsystem_sources} 38 - OBJECTS 39 - $<TARGET_OBJECTS:kqueue> 35 + add_darling_library(system 36 + ${libsystem_sources} 37 + $<TARGET_OBJECTS:kqueue> 38 + ) 40 39 41 - SIBLINGS 40 + function(libsystem_reexport) 41 + while(ARGN) 42 + list(GET ARGN 0 sublib) 43 + list(GET ARGN 1 sublib_path) 42 44 43 - system_malloc 44 - ) 45 + add_dependencies(system ${sublib}) 46 + set_property(TARGET system APPEND_STRING PROPERTY LINK_FLAGS 47 + " -Wl,-reexport_library -Wl,${CMAKE_BINARY_DIR}/${sublib_path} ") 45 48 46 - target_link_libraries(system PRIVATE 47 - sandbox 48 - system_quarantine 49 - removefile 50 - system_copyfile 51 - system_coreservices 52 - system_coretls 53 - system_malloc 54 - system_c 55 - system_kernel 56 - system_trace 57 - keymgr 58 - system_m 59 - system_info 60 - system_notify 61 - libdispatch_shared 62 - launch 63 - compiler_rt 64 - unwind 65 - system_dyld 66 - macho 67 - system_pthread 68 - platform 69 - system_asl 70 - system_duct 71 - system_blocks 72 - xpc 73 - corecrypto 74 - commonCrypto 75 - system_dnssd 76 - system_networkextension 49 + list(REMOVE_AT ARGN 0 1) 50 + endwhile(ARGN) 51 + endfunction(libsystem_reexport) 52 + 53 + libsystem_reexport( 54 + system_sandbox src/sandbox/libsystem_sandbox.dylib 55 + system_quarantine src/quarantine/libquarantine.dylib 56 + removefile src/libremovefile/libremovefile.dylib 57 + system_copyfile src/copyfile/libcopyfile.dylib 58 + system_coreservices src/libsystem_coreservices/libsystem_coreservices.dylib 59 + system_coretls src/external/coretls/libsystem_coretls.dylib 60 + system_malloc src/libmalloc/libsystem_malloc.dylib 61 + system_c src/libc/libsystem_c.dylib 62 + system_kernel src/kernel/libsystem_kernel.dylib 63 + system_trace src/external/libtrace/libsystem_trace.dylib 64 + keymgr src/keymgr/libkeymgr.dylib 65 + system_m src/libm/libsystem_m.dylib 66 + system_info src/libinfo/libsystem_info.dylib 67 + system_notify src/libnotify/libsystem_notify.dylib 68 + libdispatch_shared src/external/libdispatch/libdispatch.dylib 69 + launch src/launchd/liblaunch/liblaunch.dylib 70 + compiler_rt src/external/compiler-rt/lib/builtins/libcompiler_rt.dylib 71 + system_dyld src/dyld/libdyld.dylib 72 + macho src/libmacho/libmacho.dylib 73 + system_pthread src/external/libpthread/src/libsystem_pthread.dylib 74 + platform src/external/libplatform/libsystem_platform.dylib 75 + system_asl src/external/syslog/libsystem_asl.tproj/libsystem_asl.dylib 76 + system_duct src/duct/src/libsystem_duct.dylib 77 + system_blocks src/external/libclosure/libsystem_blocks.dylib 78 + xpc src/external/libxpc/libxpc.dylib 79 + corecrypto src/external/corecrypto/libcorecrypto.dylib 80 + commonCrypto src/external/commoncrypto/libcommonCrypto.dylib 81 + system_dnssd src/lib/system/dnssd/libsystem_dnssd.dylib 82 + system_networkextension src/networkextension/libsystem_networkextension.dylib 83 + unwind src/libunwind/libunwind.dylib 77 84 ) 78 85 79 86 set_target_properties(system PROPERTIES OUTPUT_NAME "System.B") 80 87 set_property(TARGET system APPEND_STRING PROPERTY LINK_FLAGS 81 - " -sub_library libsystem_malloc \ 82 - -sub_library libsystem_c \ 83 - -sub_library libsystem_kernel \ 84 - -sub_library libkeymgr \ 85 - -sub_library libsystem_m \ 86 - -sub_library libsystem_info \ 87 - -sub_library libsystem_notify \ 88 - -sub_library libquarantine \ 89 - -sub_library libsystem_blocks \ 90 - -sub_library libsystem_duct \ 91 - -sub_library libsystem_pthread \ 92 - -sub_library libsystem_platform \ 93 - -sub_library libsystem_trace \ 94 - -sub_library libdispatch \ 95 - -sub_library liblaunch \ 96 - -sub_library libremovefile \ 97 - -sub_library libcopyfile \ 98 - -sub_library libunwind \ 99 - -sub_library libdyld \ 100 - -sub_library libcompiler_rt \ 101 - -sub_library libmacho \ 102 - -sub_library libcommonCrypto \ 103 - -sub_library libsystem_sandbox \ 104 - -sub_library libsystem_coreservices \ 105 - -sub_library libsystem_coretls \ 106 - -sub_library libsystem_asl \ 107 - -sub_library libxpc \ 108 - -sub_library libcorecrypto \ 109 - -sub_library libsystem_dnssd \ 110 - -sub_library libsystem_networkextension \ 111 - -Wl,-compatibility_version,1.0.0 \ 112 - -Wl,-current_version,1238.0.0") 88 + "-Wl,-compatibility_version,1.0.0 -Wl,-current_version,1238.0.0") 113 89 114 - #make_fat(system) 90 + make_fat(system) 115 91 116 92 install(TARGETS system DESTINATION libexec/darling/usr/lib) 117 93
+12 -5
src/sandbox/CMakeLists.txt
··· 1 1 project(libsandbox) 2 2 3 3 set(DYLIB_INSTALL_NAME "/usr/lib/system/libsystem_sandbox.dylib") 4 - add_darling_library(sandbox SHARED sandbox.c) 5 - target_link_libraries(sandbox PRIVATE system_c system_kernel system_dyld system_malloc) 6 - set_target_properties(sandbox PROPERTIES OUTPUT_NAME "system_sandbox") 7 - make_fat(sandbox) 4 + add_circular(system_sandbox FAT 5 + SOURCES 6 + sandbox.c 7 + 8 + SIBLINGS 9 + system_dyld 10 + DEPENDENCIES 11 + system_c 12 + system_kernel 13 + system_malloc 14 + ) 8 15 9 - install(TARGETS sandbox DESTINATION libexec/darling/usr/lib/system) 16 + install(TARGETS system_sandbox DESTINATION libexec/darling/usr/lib/system)