]>
Commit | Line | Data |
---|---|---|
2546420a A |
1 | PROJECT := libpthread |
2 | TEST_DIR := tests/ | |
964d3577 | 3 | |
a0619f9c A |
4 | ENABLE_LTE_TESTS=YES |
5 | ||
2546420a A |
6 | ifeq ($(DEVELOPER_DIR),) |
7 | DEVELOPER_DIR := $(shell xcode-select -p) | |
8 | endif | |
3a6437e6 | 9 | |
2546420a | 10 | include $(DEVELOPER_DIR)/AppleInternal/Makefiles/darwintest/Makefile.common |
3a6437e6 | 11 | |
2546420a A |
12 | TARGETS := |
13 | TARGETS += atfork | |
14 | TARGETS += bsdthread_set_self | |
214d78a2 A |
15 | TARGETS += stack |
16 | TARGETS += stack_size | |
2546420a A |
17 | TARGETS += cond |
18 | #TARGETS += cond_hang3 | |
19 | #TARGETS += cond_stress | |
20 | TARGETS += cond_timed | |
214d78a2 | 21 | TARGETS += cond_prepost |
2546420a A |
22 | TARGETS += custom_stack |
23 | TARGETS += stack_aslr | |
24 | TARGETS += join | |
25 | TARGETS += main_stack | |
26 | TARGETS += main_stack_custom | |
a0619f9c | 27 | TARGETS += detach |
2546420a A |
28 | #TARGETS += maxwidth |
29 | TARGETS += mutex | |
214d78a2 | 30 | TARGETS += mutex_prepost |
2546420a A |
31 | TARGETS += mutex_try |
32 | TARGETS += once_cancel | |
33 | TARGETS += pthread_attr_setstacksize | |
34 | TARGETS += pthread_bulk_create | |
35 | TARGETS += pthread_cancel | |
c6e5f90c | 36 | TARGETS += pthread_create_from_mach_thread |
2546420a A |
37 | TARGETS += pthread_cwd |
38 | TARGETS += pthread_exit | |
39 | TARGETS += pthread_introspection | |
40 | TARGETS += pthread_setspecific | |
41 | TARGETS += pthread_threadid_np | |
a0619f9c | 42 | TARGETS += pthread_get_qos_class_np |
214d78a2 | 43 | TARGETS += pthread_dependency |
2546420a | 44 | #TARGETS += qos |
a0619f9c | 45 | TARGETS += rdar_32848402 |
2546420a A |
46 | #TARGETS += rwlock-22244050 |
47 | #TARGETS += rwlock-signal | |
48 | #TARGETS += rwlock | |
49 | TARGETS += tsd | |
c6e5f90c | 50 | TARGETS += setrlimit_sigsegv |
2546420a A |
51 | #TARGETS += wq_block_handoff |
52 | #TARGETS += wq_event_manager | |
53 | #TARGETS += wq_kevent | |
54 | #TARGETS += wq_kevent_stress | |
a0619f9c | 55 | TARGETS += wq_limits |
2546420a | 56 | TARGETS += add_timer_termination |
214d78a2 | 57 | TARGETS += perf_contended_mutex_rwlock |
c1f56ec9 A |
58 | TARGETS += pthread_jit_write_protection |
59 | pthread_jit_write_protection: CODE_SIGN_ENTITLEMENTS=pthread_jit_write_protection-entitlements.plist | |
964d3577 | 60 | |
c6e5f90c A |
61 | # this should be CUSTOM_TARGETS, see "Compatibility defines" in Makefile.targets |
62 | OTHER_TARGETS := stackoverflow_crash | |
63 | ||
a0619f9c A |
64 | OTHER_LTE_INCLUDE_FILES += \ |
65 | /usr/local/lib/libdarwintest_utils.dylib | |
964d3577 | 66 | |
2546420a A |
67 | OTHER_CFLAGS := -DDARWINTEST -Weverything \ |
68 | -Wno-vla -Wno-bad-function-cast -Wno-missing-noreturn \ | |
69 | -Wno-missing-field-initializers -Wno-format-pedantic \ | |
c1f56ec9 A |
70 | -Wno-gnu-folding-constant -Wno-used-but-marked-unused \ |
71 | -Wno-padded | |
2546420a | 72 | OTHER_LDFLAGS := -ldarwintest_utils |
964d3577 | 73 | |
2546420a A |
74 | #TARGETS += main_stack_legacy // Disabled by default due to linker warnings |
75 | #main_stack_legacy: OTHER_LDFLAGS += -Wl,-stack_addr,0xc1000000 -Wl,-stack_size,0x0f00000 | |
76 | #main_stack_legacy: OTHER_CFLAGS += -DSTACKSIZE=0x0f00000 | |
77 | #main_stack_legacy: ARCH_FLAGS = -arch i386 | |
78 | #main_stack_legacy: DEPLOYMENT_TARGET_FLAGS = -mmacosx-version-min=10.7 | |
964d3577 | 79 | |
214d78a2 A |
80 | main_stack_custom: OTHER_LDFLAGS += -Wl,-stack_size,0x124000 |
81 | main_stack_custom: OTHER_CFLAGS += -DSTACKSIZE=0x124000 | |
964d3577 | 82 | |
2546420a | 83 | bsdthread_set_self: OTHER_CFLAGS += -D_DARWIN_FEATURE_CLOCK_GETTIME |
3a6437e6 | 84 | |
2546420a | 85 | include $(DEVELOPER_DIR)/AppleInternal/Makefiles/darwintest/Makefile.targets |
c6e5f90c A |
86 | |
87 | stackoverflow_crash: helpers/stackoverflow_crash.c | |
88 | mkdir -p $(SYMROOT)/assets/ | |
89 | $(CC) -o $(SYMROOT)/assets/$@ $(CFLAGS) -D_POSIX_C_SOURCE=1 $(OTHER_CFLAGS) $(LDFLAGS) $(OTHER_LDFLAGS) $< | |
90 | env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/assets/$@ | |
91 | ||
92 | install-stackoverflow_crash: stackoverflow_crash | |
93 | mkdir -p $(INSTALLDIR)/assets | |
94 | @cp $(SYMROOT)/assets/stackoverflow_crash $(INSTALLDIR)/assets | |
c1f56ec9 | 95 |