mirror of
https://github.com/darlinghq/darling-objc4.git
synced 2024-11-26 21:50:26 +00:00
Ignore some of the includes. Commented out code. Only calculate offsets if __OBJC2__ is defined.
This commit is contained in:
parent
9ded2a81c0
commit
3195667efc
@ -83,7 +83,7 @@
|
||||
|
||||
#include "objc-private.h"
|
||||
|
||||
#if TARGET_OS_OSX
|
||||
#if TARGET_OS_OSX && !defined(DARLING)
|
||||
#include <Cambria/Traps.h>
|
||||
#include <Cambria/Cambria.h>
|
||||
#endif
|
||||
@ -1117,7 +1117,7 @@ static int _collecting_in_critical(void)
|
||||
continue;
|
||||
|
||||
// Find out where thread is executing
|
||||
#if TARGET_OS_OSX
|
||||
#if TARGET_OS_OSX && !defined(DARLING)
|
||||
if (oah_is_current_process_translated()) {
|
||||
kern_return_t ret = objc_thread_get_rip(threads[count], (uint64_t*)&pc);
|
||||
if (ret != KERN_SUCCESS) {
|
||||
|
@ -28,7 +28,9 @@
|
||||
|
||||
#include "objc-private.h"
|
||||
#include "objc-loadmethod.h"
|
||||
#ifndef DARLING
|
||||
#include "objc-bp-assist.h"
|
||||
#endif
|
||||
|
||||
#if TARGET_OS_WIN32
|
||||
|
||||
@ -661,11 +663,13 @@ static void static_init()
|
||||
for (size_t i = 0; i < count; i++) {
|
||||
inits[i]();
|
||||
}
|
||||
#if __OBJC2__
|
||||
auto offsets = getLibobjcInitializerOffsets(&_mh_dylib_header, &count);
|
||||
for (size_t i = 0; i < count; i++) {
|
||||
UnsignedInitializer init(offsets[i]);
|
||||
init();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user