6 ifeq ($(DEVELOPER_DIR),)
7 DEVELOPER_DIR := $(shell xcode-select -p)
10 include $(DEVELOPER_DIR)/AppleInternal/Makefiles/darwintest/Makefile.common
14 TARGETS += bsdthread_set_self
18 #TARGETS += cond_hang3
19 #TARGETS += cond_stress
21 TARGETS += cond_prepost
22 TARGETS += custom_stack
26 TARGETS += main_stack_custom
30 TARGETS += mutex_prepost
32 TARGETS += once_cancel
33 TARGETS += pthread_attr_setstacksize
34 TARGETS += pthread_bulk_create
35 TARGETS += pthread_cancel
36 TARGETS += pthread_create_from_mach_thread
37 TARGETS += pthread_cwd
38 TARGETS += pthread_exit
39 TARGETS += pthread_introspection
40 TARGETS += pthread_setspecific
41 TARGETS += pthread_threadid_np
42 TARGETS += pthread_get_qos_class_np
43 TARGETS += pthread_dependency
45 TARGETS += rdar_32848402
46 #TARGETS += rwlock-22244050
47 #TARGETS += rwlock-signal
50 TARGETS += setrlimit_sigsegv
51 #TARGETS += wq_block_handoff
52 #TARGETS += wq_event_manager
54 #TARGETS += wq_kevent_stress
56 TARGETS += add_timer_termination
57 TARGETS += perf_contended_mutex_rwlock
59 # this should be CUSTOM_TARGETS, see "Compatibility defines" in Makefile.targets
60 OTHER_TARGETS := stackoverflow_crash
62 OTHER_LTE_INCLUDE_FILES += \
63 /usr/local/lib/libdarwintest_utils.dylib
65 OTHER_CFLAGS := -DDARWINTEST -Weverything \
66 -Wno-vla -Wno-bad-function-cast -Wno-missing-noreturn \
67 -Wno-missing-field-initializers -Wno-format-pedantic \
68 -Wno-gnu-folding-constant -Wno-used-but-marked-unused
69 OTHER_LDFLAGS := -ldarwintest_utils
71 #TARGETS += main_stack_legacy // Disabled by default due to linker warnings
72 #main_stack_legacy: OTHER_LDFLAGS += -Wl,-stack_addr,0xc1000000 -Wl,-stack_size,0x0f00000
73 #main_stack_legacy: OTHER_CFLAGS += -DSTACKSIZE=0x0f00000
74 #main_stack_legacy: ARCH_FLAGS = -arch i386
75 #main_stack_legacy: DEPLOYMENT_TARGET_FLAGS = -mmacosx-version-min=10.7
77 main_stack_custom: OTHER_LDFLAGS += -Wl,-stack_size,0x124000
78 main_stack_custom: OTHER_CFLAGS += -DSTACKSIZE=0x124000
80 bsdthread_set_self: OTHER_CFLAGS += -D_DARWIN_FEATURE_CLOCK_GETTIME
82 include $(DEVELOPER_DIR)/AppleInternal/Makefiles/darwintest/Makefile.targets
84 stackoverflow_crash: helpers/stackoverflow_crash.c
85 mkdir -p $(SYMROOT)/assets/
86 $(CC) -o $(SYMROOT)/assets/$@ $(CFLAGS) -D_POSIX_C_SOURCE=1 $(OTHER_CFLAGS) $(LDFLAGS) $(OTHER_LDFLAGS) $<
87 env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/assets/$@
89 install-stackoverflow_crash: stackoverflow_crash
90 mkdir -p $(INSTALLDIR)/assets
91 @cp $(SYMROOT)/assets/stackoverflow_crash $(INSTALLDIR)/assets