]>
Commit | Line | Data |
---|---|---|
39037602 A |
1 | PROJECT := xnu/darwintests |
2 | ||
3 | # When building as part of xnu_tests, we get passed a DSTROOT that's got the | |
4 | # unit test path in it already. But, BASEDSTROOT doesn't, so use that instead. | |
5 | ifdef BASEDSTROOT | |
6 | override DSTROOT = $(BASEDSTROOT) | |
7 | endif | |
8 | ||
f427ee49 | 9 | INVALID_ARCHS = i386 |
5ba3f43e A |
10 | ENABLE_LTE_TESTS=YES |
11 | ||
12 | OTHER_LTE_INCLUDE_FILES += \ | |
13 | /System/Library/PrivateFrameworks/LoggingSupport.framework, \ | |
14 | /System/Library/PrivateFrameworks/MobileKeyBag.framework, \ | |
cb323159 | 15 | /System/Library/Frameworks/IOSurface.framework, \ |
5ba3f43e A |
16 | /usr/local/lib/libdarwintest_utils.dylib, \ |
17 | /usr/lib/libapple_crypto.dylib, | |
18 | ||
d9a64523 | 19 | DEVELOPER_DIR ?= $(shell xcode-select -p) |
39037602 A |
20 | |
21 | # the xnu build system will only ever call us with the default target | |
22 | .DEFAULT_GOAL := install | |
23 | ||
24 | include $(DEVELOPER_DIR)/AppleInternal/Makefiles/darwintest/Makefile.common | |
25 | ||
26 | OTHER_CFLAGS = -Weverything -Wno-gnu-union-cast -Wno-missing-field-initializers -Wno-partial-availability | |
27 | OTHER_CFLAGS += -Wno-missing-noreturn -Wno-vla -Wno-reserved-id-macro -Wno-documentation-unknown-command | |
5ba3f43e | 28 | OTHER_CFLAGS += -Wno-padded -Wno-used-but-marked-unused -Wno-covered-switch-default -Wno-nullability-extension |
cb323159 | 29 | OTHER_CFLAGS += -Wno-gnu-empty-initializer -Wno-unused-macros -Wno-undef -Wno-fixed-enum-extension |
f427ee49 | 30 | OTHER_CFLAGS += -Wno-gnu-auto-type -Wno-switch-enum -Wno-variadic-macros |
39037602 | 31 | OTHER_CFLAGS += --std=gnu11 -isystem $(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders |
d9a64523 | 32 | OTHER_CFLAGS += -UT_NAMESPACE_PREFIX -DT_NAMESPACE_PREFIX=xnu |
5ba3f43e | 33 | OTHER_CFLAGS += -F $(SDKROOT)/System/Library/PrivateFrameworks |
813fb2f6 | 34 | |
f427ee49 A |
35 | OTHER_CFLAGS += -Wl,-sectcreate,__INFO_FILTER,__disable,/dev/null |
36 | ||
37 | ||
813fb2f6 | 38 | CODESIGN:=$(shell xcrun -sdk "$(TARGETSDK)" -find codesign) |
f427ee49 | 39 | CODESIGN_HARDENED_RUNTIME:=$(CODESIGN) -o runtime |
813fb2f6 | 40 | CODESIGN_ALLOCATE:=$(shell xcrun -sdk "$(TARGETSDK)" -find codesign_allocate) |
39037602 A |
41 | |
42 | # to have custom compiler flags to | |
43 | # target: OTHER_CFLAGS += <my flags> | |
44 | ||
a39ff7e2 A |
45 | atm_diagnostic_flag: OTHER_CFLAGS += drop_priv.c |
46 | ||
c6bf4f31 A |
47 | atm_diagnostic_flag_entitled: CODE_SIGN_ENTITLEMENTS = atm_diagnostic_flag.entitlements |
48 | atm_diagnostic_flag_entitled: OTHER_CFLAGS += drop_priv.c | |
49 | ||
f427ee49 | 50 | avx: INVALID_ARCHS = $(filter arm%,$(ARCH_CONFIGS)) |
5ba3f43e A |
51 | avx: OTHER_CFLAGS += -mavx512f -mavx512bw -mavx512vl |
52 | avx: OTHER_CFLAGS += -I$(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders | |
53 | avx: CONFIG_FLAGS := $(filter-out -O%,$(CONFIG_FLAGS)) | |
54 | # Level 2 optimization must be used to prevent compiler from generating | |
55 | # invalid instructions when compiling with AVX-512 flags. | |
56 | avx: CONFIG_FLAGS += -O2 | |
a39ff7e2 A |
57 | # Disable vzeroupper insertion to work around rdar://problem/35035096 |
58 | avx: CONFIG_FLAGS += -mllvm -x86-use-vzeroupper=0 | |
5ba3f43e A |
59 | ifneq (osx,$(TARGET_NAME)) |
60 | EXCLUDED_SOURCES += avx.c | |
61 | endif | |
62 | ||
f427ee49 A |
63 | CUSTOM_TARGETS = sr_entitlement_helper |
64 | ||
65 | sr_entitlement_helper: sr_entitlement_helper.c | |
66 | mkdir -p $(SYMROOT) | |
67 | $(CC) -I $(OBJROOT) $(CFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) sr_entitlement_helper.c -o $(SYMROOT)/$@ | |
68 | echo $(CODESIGN) --force --sign - --timestamp=none --entitlements sr_entitlement.entitlements $(SYMROOT)/$@; \ | |
69 | env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none --entitlements sr_entitlement.entitlements $(SYMROOT)/$@; | |
70 | ||
71 | install-sr_entitlement_helper: sr_entitlement_helper | |
72 | mkdir -p $(INSTALLDIR) | |
73 | cp $(SYMROOT)/sr_entitlement_helper $(INSTALLDIR) | |
74 | ||
75 | sr_entitlement: OTHER_LDFLAGS += -ldarwintest_utils | |
76 | ||
39037602 | 77 | backtracing: OTHER_LDFLAGS += -framework CoreSymbolication |
f427ee49 | 78 | backtracing: CODE_SIGN_ENTITLEMENTS = kernel_symbolication_entitlements.plist |
39037602 | 79 | |
a39ff7e2 | 80 | data_protection: OTHER_LDFLAGS += -ldarwintest_utils -framework IOKit |
813fb2f6 | 81 | |
cb323159 A |
82 | immovable_send: excserver |
83 | immovable_send: OTHER_CFLAGS += $(OBJROOT)/excserver.c -I $(OBJROOT) | |
84 | immovable_send: OTHER_LDFLAGS += -ldarwintest_utils -lpthread -framework IOKit | |
85 | ||
f427ee49 | 86 | CUSTOM_TARGETS += immovable_send_client vm_spawn_tool inspect_port_nocodesign |
cb323159 A |
87 | immovable_send: immovable_send_client |
88 | ||
f427ee49 A |
89 | vm_spawn_tool: INVALID_ARCHS = i386 |
90 | vm_spawn_tool: vm_spawn_tool.c | |
91 | $(CC) $(DT_CFLAGS) -I $(OBJROOT) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) vm_spawn_tool.c -o $(SYMROOT)/vm_spawn_tool | |
92 | ||
93 | install-vm_spawn_tool: vm_spawn_tool | |
94 | mkdir -p $(INSTALLDIR)/tools | |
95 | cp $(SYMROOT)/vm_spawn_tool $(INSTALLDIR)/tools/ | |
96 | ||
cb323159 A |
97 | immovable_send_client: immovable_send_client.c |
98 | $(CC) $(DT_CFLAGS) -I $(OBJROOT) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) immovable_send_client.c -o $(SYMROOT)/immovable_send_client | |
99 | ||
100 | install-immovable_send_client: immovable_send_client | |
101 | mkdir -p $(INSTALLDIR) | |
102 | cp $(SYMROOT)/immovable_send_client $(INSTALLDIR)/ | |
103 | ||
f427ee49 A |
104 | inspect_port_nocodesign: inspect_port.c |
105 | $(CC) $(DT_CFLAGS) -I $(OBJROOT) -DT_NOCODESIGN=1 $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $^ -o $(SYMROOT)/inspect_port_nocodesign | |
106 | ||
107 | install-inspect_port_nocodesign: inspect_port_nocodesign | |
108 | mkdir -p $(INSTALLDIR) | |
109 | env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN_ALLOCATE) -r -i $(SYMROOT)/inspect_port_nocodesign -o $(SYMROOT)/inspect_port_nocodesign | |
110 | ||
111 | kas_info: OTHER_LDFLAGS += -framework CoreSymbolication | |
112 | kas_info: CODE_SIGN_ENTITLEMENTS = kernel_symbolication_entitlements.plist | |
113 | ||
39037602 | 114 | kdebug: INVALID_ARCHS = i386 |
d9a64523 | 115 | kdebug: OTHER_LDFLAGS = -framework ktrace -ldarwintest_utils -framework kperf |
39037602 | 116 | |
ea3f0419 | 117 | EXCLUDED_SOURCES += drop_priv.c kperf_helpers.c xnu_quick_test_helpers.c memorystatus_assertion_helpers.c bpflib.c in_cksum.c |
39037602 | 118 | |
0a7de745 | 119 | ifneq ($(PLATFORM),iPhoneOS) |
f427ee49 | 120 | EXCLUDED_SOURCES += jumbo_va_spaces_28530648.c perf_compressor.c memorystatus_freeze_test.c vm/entitlement_increased_memory_limit.c |
813fb2f6 A |
121 | endif |
122 | ||
a39ff7e2 | 123 | perf_compressor: OTHER_LDFLAGS += -ldarwintest_utils |
5ba3f43e A |
124 | perf_compressor: CODE_SIGN_ENTITLEMENTS=./private_entitlement.plist |
125 | ||
f427ee49 | 126 | |
cb323159 | 127 | memorystatus_freeze_test: CODE_SIGN_ENTITLEMENTS=./task_for_pid_entitlement.plist |
d9a64523 | 128 | memorystatus_freeze_test: OTHER_LDFLAGS += -ldarwintest_utils |
cb323159 | 129 | memorystatus_freeze_test: OTHER_CFLAGS += -ldarwintest_utils memorystatus_assertion_helpers.c |
d9a64523 | 130 | |
cb323159 A |
131 | memorystatus_is_assertion: OTHER_LDFLAGS += -ldarwintest_utils |
132 | memorystatus_is_assertion: OTHER_CFLAGS += memorystatus_assertion_helpers.c | |
133 | ||
cb323159 A |
134 | shared_cache_tests: OTHER_LDFLAGS += -ldarwintest_utils |
135 | ||
136 | stackshot_tests: OTHER_CFLAGS += -Wno-objc-messaging-id | |
f427ee49 | 137 | stackshot_tests: OTHER_LDFLAGS += -lkdd -lz -ldarwintest_utils -framework Foundation |
5ba3f43e | 138 | |
4ba76501 A |
139 | stackshot_accuracy: OTHER_CFLAGS += -ldarwintest_utils -Wno-objc-messaging-id |
140 | stackshot_accuracy: OTHER_LDFLAGS += -lkdd -ldarwintest_utils -framework Foundation | |
141 | stackshot_accuracy: INVALID_ARCHS = i386 | |
142 | ||
f427ee49 A |
143 | ifeq ($(PLATFORM),MacOSX) |
144 | CUSTOM_TARGETS += stackshot_translated_child | |
145 | ||
146 | stackshot_translated_child: INVALID_ARCHS = arm64 arm64e | |
147 | stackshot_translated_child: stackshot_translated_child.c | |
148 | $(CC) $(DT_CFLAGS) -I $(OBJROOT) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) stackshot_translated_child.c -o $(SYMROOT)/stackshot_translated_child | |
149 | ||
150 | install-stackshot_translated_child: stackshot_translated_child | |
151 | mkdir -p $(INSTALLDIR) | |
152 | cp $(SYMROOT)/stackshot_translated_child $(INSTALLDIR)/ | |
153 | else | |
154 | EXCLUDED_SOURCES += stackshot_translated_child.c | |
155 | endif | |
156 | ||
157 | telemetry: OTHER_LDFLAGS = -framework ktrace -framework kperf -framework CoreFoundation | |
d9a64523 | 158 | |
5ba3f43e A |
159 | memorystatus_zone_test: OTHER_CFLAGS += -isystem $(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders |
160 | memorystatus_zone_test: OTHER_LDFLAGS += -framework ktrace | |
161 | memorystatus_zone_test: OTHER_LDFLAGS += -ldarwintest_utils | |
162 | ||
f427ee49 A |
163 | ifeq ($(PLATFORM),BridgeOS) |
164 | EXCLUDED_SOURCES += dirtiness_tracking.c | |
165 | endif | |
166 | ||
167 | dirtiness_tracking: OTHER_CFLAGS += -Wno-cast-align | |
168 | ||
ea3f0419 A |
169 | kpc: OTHER_LDFLAGS += -framework kperf -framework ktrace |
170 | kpc: INVALID_ARCHS = i386 | |
813fb2f6 | 171 | |
39037602 | 172 | kperf: OTHER_CFLAGS += kperf_helpers.c |
5ba3f43e | 173 | kperf: OTHER_LDFLAGS += -framework kperf -framework kperfdata -framework ktrace -ldarwintest_utils |
39037602 | 174 | |
f427ee49 A |
175 | memcmp_zero: OTHER_CFLAGS += ../osfmk/arm64/memcmp_zero.s |
176 | ||
39037602 | 177 | kperf_backtracing: OTHER_CFLAGS += kperf_helpers.c |
5ba3f43e | 178 | kperf_backtracing: OTHER_LDFLAGS += -framework kperf -framework kperfdata -framework ktrace |
39037602 | 179 | kperf_backtracing: OTHER_LDFLAGS += -framework CoreSymbolication |
f427ee49 | 180 | kperf_backtracing: CODE_SIGN_ENTITLEMENTS = kernel_symbolication_entitlements.plist |
39037602 | 181 | |
5ba3f43e A |
182 | kevent_qos: OTHER_CFLAGS += -Wno-unused-macros |
183 | kevent_qos: OTHER_CFLAGS += -I $(OBJROOT)/ | |
184 | ||
39037602 A |
185 | mach_get_times: OTHER_LDFLAGS += -ldarwintest_utils |
186 | ||
5ba3f43e | 187 | monotonic_core: OTHER_LDFLAGS += -framework ktrace |
5ba3f43e | 188 | |
d9a64523 | 189 | perf_exit: perf_exit_proc |
0a7de745 | 190 | perf_exit: OTHER_LDFLAGS = -framework ktrace -ldarwintest_utils |
5ba3f43e A |
191 | perf_exit: CODE_SIGN_ENTITLEMENTS=./private_entitlement.plist |
192 | ||
cb323159 A |
193 | CUSTOM_TARGETS += prioritize_process_launch_helper |
194 | prioritize_process_launch: prioritize_process_launch_helper | |
195 | ||
196 | prioritize_process_launch_helper: prioritize_process_launch_helper.c | |
197 | $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) prioritize_process_launch_helper.c -o $(SYMROOT)/prioritize_process_launch_helper | |
198 | echo $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@; \ | |
199 | env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@; | |
200 | ||
201 | install-prioritize_process_launch_helper: prioritize_process_launch_helper | |
202 | mkdir -p $(INSTALLDIR) | |
203 | cp $(SYMROOT)/prioritize_process_launch_helper $(INSTALLDIR)/ | |
204 | ||
205 | ||
5ba3f43e A |
206 | perf_spawn_fork: CODE_SIGN_ENTITLEMENTS=./private_entitlement.plist |
207 | ||
cb323159 A |
208 | mach_exception_reply: OTHER_CFLAGS += -Wno-cast-align |
209 | ||
5ba3f43e A |
210 | os_thread_self_restrict: os_thread_self_restrict.c os_thread_self_restrict-entitlements.plist |
211 | os_thread_self_restrict: CODE_SIGN_ENTITLEMENTS=os_thread_self_restrict-entitlements.plist | |
39037602 | 212 | |
f427ee49 A |
213 | subsystem_root_path: subsystem_root_path.c subsystem_root_path-entitlements.plist |
214 | subsystem_root_path: CODE_SIGN_ENTITLEMENTS=subsystem_root_path-entitlements.plist | |
cb323159 | 215 | |
f427ee49 A |
216 | EXCLUDED_SOURCES += $(wildcard bounded_ptr_src/*.cpp) |
217 | bounded_ptr: OTHER_CXXFLAGS += -Werror=implicit-int-conversion -Werror=shorten-64-to-32 -I$(SRCROOT)/../libkern -std=c++17 | |
218 | bounded_ptr: $(wildcard bounded_ptr_src/*.cpp) bounded_ptr.cpp | |
cb323159 | 219 | |
f427ee49 A |
220 | EXCLUDED_SOURCES += bounded_ptr_03.cpp |
221 | bounded_ptr_03: OTHER_CXXFLAGS += -Werror=implicit-int-conversion -Werror=shorten-64-to-32 -I$(SRCROOT)/../libkern -std=c++03 | |
222 | bounded_ptr_03: bounded_ptr_03.cpp | |
223 | ||
224 | EXCLUDED_SOURCES += $(wildcard bounded_array_src/*.cpp) | |
225 | bounded_array: OTHER_CXXFLAGS += -Werror=implicit-int-conversion -Werror=shorten-64-to-32 -I$(SRCROOT)/../libkern -std=c++17 | |
226 | bounded_array: $(wildcard bounded_array_src/*.cpp) bounded_array.cpp | |
cb323159 | 227 | |
f427ee49 A |
228 | EXCLUDED_SOURCES += $(wildcard bounded_array_ref_src/*.cpp) |
229 | bounded_array_ref: OTHER_CXXFLAGS += -Werror=implicit-int-conversion -Werror=shorten-64-to-32 -I$(SRCROOT)/../libkern -std=c++17 | |
230 | bounded_array_ref: $(wildcard bounded_array_ref_src/*.cpp) bounded_array_ref.cpp | |
231 | ||
232 | EXCLUDED_SOURCES += $(wildcard intrusive_shared_ptr_src/*.cpp) | |
233 | intrusive_shared_ptr: OTHER_CXXFLAGS += -Werror=implicit-int-conversion -Werror=shorten-64-to-32 -I$(SRCROOT)/../libkern -std=c++17 | |
234 | intrusive_shared_ptr: $(wildcard intrusive_shared_ptr_src/*.cpp) intrusive_shared_ptr.cpp | |
235 | ||
236 | EXCLUDED_SOURCES += $(wildcard safe_allocation_src/*.cpp) | |
237 | safe_allocation: OTHER_CXXFLAGS += -Werror=implicit-int-conversion -Werror=shorten-64-to-32 -I$(SRCROOT)/../libkern -std=c++17 | |
238 | safe_allocation: $(wildcard safe_allocation_src/*.cpp) safe_allocation.cpp | |
239 | ||
240 | EXCLUDED_SOURCES += osptr_compat.cpp | |
241 | osptr_98: OTHER_CXXFLAGS += -I$(SRCROOT)/../libkern -std=c++98 -DOSPTR_STD="98" | |
242 | osptr_98: osptr_compat.cpp | |
243 | $(CXX) $(DT_CXXFLAGS) $(OTHER_CXXFLAGS) $(CXXFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/$@ | |
244 | osptr_11: OTHER_CXXFLAGS += -I$(SRCROOT)/../libkern -std=c++11 -DOSPTR_STD="11" | |
245 | osptr_11: osptr_compat.cpp | |
246 | $(CXX) $(DT_CXXFLAGS) $(OTHER_CXXFLAGS) $(CXXFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/$@ | |
247 | osptr_14: OTHER_CXXFLAGS += -I$(SRCROOT)/../libkern -std=c++14 -DOSPTR_STD="14" | |
248 | osptr_14: osptr_compat.cpp | |
249 | $(CXX) $(DT_CXXFLAGS) $(OTHER_CXXFLAGS) $(CXXFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/$@ | |
250 | osptr_17: OTHER_CXXFLAGS += -I$(SRCROOT)/../libkern -std=c++17 -DOSPTR_STD="17" | |
251 | osptr_17: osptr_compat.cpp | |
cb323159 A |
252 | $(CXX) $(DT_CXXFLAGS) $(OTHER_CXXFLAGS) $(CXXFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/$@ |
253 | ||
f427ee49 | 254 | priority_queue: OTHER_CXXFLAGS += -std=c++17 |
cb323159 A |
255 | |
256 | os_refcnt: OTHER_CFLAGS += -I$(SRCROOT)/../libkern/ -Wno-gcc-compat -Wno-undef -O3 -flto | |
257 | ||
813fb2f6 A |
258 | task_inspect: CODE_SIGN_ENTITLEMENTS = task_inspect.entitlements |
259 | task_inspect: OTHER_CFLAGS += -DENTITLED=1 | |
260 | ||
d9a64523 A |
261 | turnstile_multihop: OTHER_CFLAGS += -Wno-unused-macros |
262 | turnstile_multihop: OTHER_CFLAGS += -I $(OBJROOT)/ | |
263 | ||
813fb2f6 A |
264 | CUSTOM_TARGETS += perf_exit_proc |
265 | ||
266 | perf_exit_proc: | |
267 | $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) perf_exit_proc.c -o $(SYMROOT)/perf_exit_proc | |
268 | ||
269 | install-perf_exit_proc: perf_exit_proc | |
270 | mkdir -p $(INSTALLDIR) | |
271 | cp $(SYMROOT)/perf_exit_proc $(INSTALLDIR)/ | |
272 | ||
39037602 A |
273 | stackshot_idle_25570396: OTHER_LDFLAGS += -lkdd -framework Foundation |
274 | ||
813fb2f6 | 275 | stackshot_block_owner_14362384: OTHER_LDFLAGS += -framework Foundation -lpthread -lkdd |
a39ff7e2 A |
276 | ifeq ($(PLATFORM),MacOSX) |
277 | stackshot_block_owner_14362384: OTHER_LDFLAGS += -lpcre | |
278 | endif | |
279 | ||
280 | all: $(DSTROOT)/usr/local/bin/kcdata | |
281 | ||
d9a64523 | 282 | $(DSTROOT)/usr/local/bin/kcdata: $(SRCROOT)/../tools/lldbmacros/kcdata.py |
a39ff7e2 A |
283 | mkdir -p $(dir $@) |
284 | cp $< $@ | |
285 | chmod a+x $@ | |
813fb2f6 | 286 | |
5ba3f43e | 287 | xnu_quick_test: OTHER_CFLAGS += xnu_quick_test_helpers.c |
a39ff7e2 | 288 | |
d9a64523 A |
289 | xnu_quick_test_entitled: CODE_SIGN_ENTITLEMENTS = xnu_quick_test.entitlements |
290 | ||
291 | CUSTOM_TARGETS += vm_set_max_addr_helper | |
292 | ||
293 | vm_set_max_addr_helper: vm_set_max_addr_helper.c | |
294 | $(CC) $(OTHER_CFLAGS) $(CFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) vm_set_max_addr_helper.c -o $(SYMROOT)/vm_set_max_addr_helper; \ | |
295 | echo $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@; \ | |
296 | env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@; | |
297 | ||
298 | install-vm_set_max_addr_helper: vm_set_max_addr_helper | |
299 | mkdir -p $(INSTALLDIR) | |
300 | cp $(SYMROOT)/vm_set_max_addr_helper $(INSTALLDIR)/ | |
301 | ||
f427ee49 A |
302 | CUSTOM_TARGETS += subsystem_root_path_helper_entitled |
303 | CUSTOM_TARGETS += subsystem_root_path_helper | |
304 | ||
305 | subsystem_root_path_helper_entitled: subsystem_root_path_helper.c subsystem_root_path-entitlements.plist | |
306 | $(CC) $(OTHER_CFLAGS) $(CFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) subsystem_root_path_helper.c -o $(SYMROOT)/subsystem_root_path_helper_entitled; \ | |
307 | echo $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@; \ | |
308 | env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none --entitlements subsystem_root_path-entitlements.plist $(SYMROOT)/$@; | |
309 | ||
310 | install-subsystem_root_path_helper_entitled: subsystem_root_path_helper_entitled | |
311 | mkdir -p $(INSTALLDIR) | |
312 | cp $(SYMROOT)/subsystem_root_path_helper_entitled $(INSTALLDIR)/ | |
313 | ||
314 | subsystem_root_path_helper: subsystem_root_path_helper.c | |
315 | $(CC) $(OTHER_CFLAGS) $(CFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) subsystem_root_path_helper.c -o $(SYMROOT)/subsystem_root_path_helper; \ | |
316 | echo $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@; \ | |
317 | env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@; | |
318 | ||
319 | install-subsystem_root_path_helper: subsystem_root_path_helper | |
320 | mkdir -p $(INSTALLDIR) | |
321 | cp $(SYMROOT)/subsystem_root_path_helper $(INSTALLDIR)/ | |
322 | ||
323 | CUSTOM_TARGETS += vm_test_code_signing_helper | |
324 | ||
325 | vm_test_code_signing_helper: vm_test_code_signing_helper.c | |
326 | $(CC) $(OTHER_CFLAGS) $(CFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) vm_test_code_signing_helper.c -o $(SYMROOT)/vm_test_code_signing_helper; \ | |
327 | echo $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@; \ | |
328 | env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@; | |
329 | ||
330 | install-vm_test_code_signing_helper: vm_test_code_signing_helper | |
331 | mkdir -p $(INSTALLDIR) | |
332 | cp $(SYMROOT)/vm_test_code_signing_helper $(INSTALLDIR)/ | |
333 | ||
334 | vm_test_code_signing: OTHER_LDFLAGS += -ldarwintest_utils | |
335 | ||
336 | INCLUDED_TEST_SOURCE_DIRS += vm | |
337 | ||
338 | # Revert to legacy vm_test suite until <rdar://problem/56675212> gets solved | |
339 | EXCLUDED_SOURCES += vm/vm_allocation.c | |
340 | ||
813fb2f6 | 341 | ifeq ($(PLATFORM),iPhoneOS) |
f427ee49 | 342 | OTHER_TEST_TARGETS += jumbo_va_spaces_28530648_unentitled jumbo_va_spaces_52551256 vm_phys_footprint_legacy vm/entitlement_increased_memory_limit vm/entitlement_increased_memory_limit_unentitled |
813fb2f6 | 343 | jumbo_va_spaces_28530648: CODE_SIGN_ENTITLEMENTS = jumbo_va_spaces_28530648.entitlements |
f427ee49 | 344 | jumbo_va_spaces_28530648: OTHER_CFLAGS += -DENTITLED=1 -DTESTNAME=jumbo_va_spaces_28530648 |
813fb2f6 A |
345 | jumbo_va_spaces_28530648: OTHER_LDFLAGS += -ldarwintest_utils |
346 | ||
f427ee49 A |
347 | jumbo_va_spaces_52551256: CODE_SIGN_ENTITLEMENTS = jumbo_va_spaces_52551256.entitlements |
348 | jumbo_va_spaces_52551256: OTHER_CFLAGS += -DENTITLED=1 -DTESTNAME=jumbo_va_spaces_52551256 | |
349 | jumbo_va_spaces_52551256: OTHER_LDFLAGS += -ldarwintest_utils | |
350 | jumbo_va_spaces_52551256: jumbo_va_spaces_28530648.c | |
351 | $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/$@ | |
352 | env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none --entitlements $(CODE_SIGN_ENTITLEMENTS) $(SYMROOT)/$@; | |
353 | ||
813fb2f6 | 354 | jumbo_va_spaces_28530648_unentitled: OTHER_LDFLAGS += -ldarwintest_utils |
f427ee49 | 355 | jumbo_va_spaces_28530648_unentitled: OTHER_CFLAGS += -DTESTNAME=jumbo_va_spaces_28530648_unentitled |
813fb2f6 A |
356 | jumbo_va_spaces_28530648_unentitled: jumbo_va_spaces_28530648.c |
357 | $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/$@ | |
cb323159 | 358 | |
f427ee49 A |
359 | vm/entitlement_increased_memory_limit: CODE_SIGN_ENTITLEMENTS = vm/entitlement_increased_memory_limit.entitlements |
360 | vm/entitlement_increased_memory_limit: OTHER_CFLAGS += -DENTITLED=1 | |
361 | vm/entitlement_increased_memory_limit: OTHER_LDFLAGS += -ldarwintest_utils memorystatus_assertion_helpers.c | |
362 | vm/entitlement_increased_memory_limit: vm/entitlement_increased_memory_limit.c | |
363 | $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/$@ | |
364 | env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none --entitlements $(CODE_SIGN_ENTITLEMENTS) $(SYMROOT)/$@; | |
365 | ||
366 | vm/entitlement_increased_memory_limit_unentitled: OTHER_LDFLAGS += -ldarwintest_utils memorystatus_assertion_helpers.c | |
367 | vm/entitlement_increased_memory_limit_unentitled: vm/entitlement_increased_memory_limit.c | |
368 | $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/$@ | |
369 | ||
cb323159 A |
370 | vm_phys_footprint_legacy: OTHER_LDFLAGS += -framework CoreFoundation -framework IOSurface |
371 | vm_phys_footprint_legacy: OTHER_CFLAGS += -DLEGACY_FOOTPRINT_ENTITLED=1 | |
372 | vm_phys_footprint_legacy: CODE_SIGN_ENTITLEMENTS=./legacy_footprint.entitlement | |
373 | vm_phys_footprint_legacy: vm_phys_footprint.c | |
374 | $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/$@ | |
375 | ||
813fb2f6 A |
376 | endif |
377 | ||
5ba3f43e A |
378 | task_info_28439149: CODE_SIGN_ENTITLEMENTS = ./task_for_pid_entitlement.plist |
379 | ||
f427ee49 A |
380 | inspect_port: CODE_SIGN_ENTITLEMENTS = ./task_for_pid_entitlement.plist |
381 | ||
a39ff7e2 A |
382 | proc_info: CODE_SIGN_ENTITLEMENTS = ./task_for_pid_entitlement.plist |
383 | proc_info: OTHER_LDFLAGS += -ldarwintest_utils | |
384 | ||
d9a64523 A |
385 | proc_info_list_kthreads: CODE_SIGN_ENTITLEMENTS = ./proc_info_list_kthreads.entitlements |
386 | ||
cb323159 A |
387 | proc_info_44873309: CODE_SIGN_ENTITLEMENTS = ./proc_info_44873309.entitlements |
388 | ||
5ba3f43e A |
389 | disk_mount_conditioner: disk_mount_conditioner* |
390 | disk_mount_conditioner: CODE_SIGN_ENTITLEMENTS=./disk_mount_conditioner-entitlements.plist | |
391 | disk_mount_conditioner: OTHER_LDFLAGS += -ldarwintest_utils | |
392 | ||
cb323159 | 393 | disk_mount_conditioner: OTHER_TEST_TARGETS += disk_mount_conditioner_unentitled |
5ba3f43e A |
394 | disk_mount_conditioner_unentitled: OTHER_CFLAGS += -DTEST_UNENTITLED |
395 | disk_mount_conditioner_unentitled: OTHER_LDFLAGS += -ldarwintest_utils | |
396 | disk_mount_conditioner_unentitled: disk_mount_conditioner.c | |
397 | $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/$@ | |
398 | ||
399 | work_interval_test: CODE_SIGN_ENTITLEMENTS = work_interval_test.entitlements | |
400 | work_interval_test: OTHER_CFLAGS += -DENTITLED=1 | |
401 | ||
a39ff7e2 A |
402 | settimeofday_29193041: OTHER_CFLAGS += drop_priv.c |
403 | ||
5ba3f43e | 404 | settimeofday_29193041_entitled: CODE_SIGN_ENTITLEMENTS = settimeofday_29193041.entitlements |
a39ff7e2 A |
405 | settimeofday_29193041_entitled: OTHER_CFLAGS += drop_priv.c |
406 | ||
5ba3f43e | 407 | thread_group_set_32261625: OTHER_LDFLAGS = -framework ktrace |
5ba3f43e A |
408 | |
409 | task_info: CODE_SIGN_ENTITLEMENTS = task_for_pid_entitlement.plist | |
410 | ||
f427ee49 A |
411 | ifneq ($(PLATFORM),iPhoneOS) |
412 | EXCLUDED_SOURCES += task_vm_info_decompressions.c | |
413 | endif | |
cb323159 | 414 | |
a39ff7e2 A |
415 | socket_bind_35243417: CODE_SIGN_ENTITLEMENTS = network_entitlements.plist |
416 | socket_bind_35685803: CODE_SIGN_ENTITLEMENTS = network_entitlements.plist | |
417 | ||
d9a64523 A |
418 | net_tuntests: CODE_SIGN_ENTITLEMENTS = network_entitlements.plist |
419 | ||
ea3f0419 A |
420 | net_bridge: OTHER_CFLAGS += bpflib.c in_cksum.c |
421 | net_bridge: OTHER_LDFLAGS += -ldarwintest_utils | |
422 | ||
f427ee49 | 423 | CUSTOM_TARGETS += posix_spawn_archpref_helper |
94ff46dc | 424 | |
f427ee49 A |
425 | posix_spawn_archpref_helper: |
426 | $(CC) $(LDFLAGS) $(CFLAGS) posix_spawn_archpref_helper.c -o $(SYMROOT)/$@; | |
94ff46dc A |
427 | env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@; |
428 | ||
f427ee49 | 429 | install-posix_spawn_archpref_helper: |
94ff46dc | 430 | mkdir -p $(INSTALLDIR) |
f427ee49 | 431 | cp $(SYMROOT)/posix_spawn_archpref_helper $(INSTALLDIR)/ |
a39ff7e2 | 432 | |
d9a64523 A |
433 | MIG:=SDKROOT=$(SDKROOT) $(shell xcrun -sdk "$(TARGETSDK)" -find mig) |
434 | ||
435 | CUSTOM_TARGETS += excserver | |
436 | ||
437 | excserver: | |
438 | $(MIG) $(CFLAGS) \ | |
439 | -sheader $(OBJROOT)/excserver.h \ | |
440 | -server $(OBJROOT)/excserver.c \ | |
441 | -header /dev/null -user /dev/null \ | |
442 | excserver.defs | |
443 | install-excserver: ; | |
444 | ||
f427ee49 A |
445 | EXCLUDED_SOURCES += exc_helpers.c |
446 | ||
447 | ||
448 | x18: OTHER_CFLAGS += -Wno-language-extension-token | |
449 | ||
d9a64523 A |
450 | exc_resource_threads: excserver |
451 | exc_resource_threads: OTHER_CFLAGS += $(OBJROOT)/excserver.c -I $(OBJROOT) | |
452 | ||
f427ee49 | 453 | fp_exception: excserver exc_helpers.c |
cb323159 A |
454 | fp_exception: OTHER_CFLAGS += $(OBJROOT)/excserver.c -I $(OBJROOT) |
455 | ||
f427ee49 A |
456 | ptrauth_failure: excserver exc_helpers.c |
457 | ptrauth_failure: OTHER_CFLAGS += $(OBJROOT)/excserver.c -I $(OBJROOT) -Wno-language-extension-token | |
458 | ptrauth_failure: CODESIGN = $(CODESIGN_HARDENED_RUNTIME) | |
459 | ||
460 | # This test currently relies on pid_hibernate(), which is only available on embedded platforms. | |
461 | ifeq ($(PLATFORM),MacOSX) | |
462 | EXCLUDED_SOURCES += decompression_failure.c | |
0a7de745 | 463 | else |
f427ee49 A |
464 | decompression_failure: excserver exc_helpers.c |
465 | decompression_failure: OTHER_CFLAGS += $(OBJROOT)/excserver.c -I $(OBJROOT) | |
466 | endif | |
467 | ||
468 | ifeq ($(findstring x86_64,$(ARCH_CONFIGS)),) | |
469 | EXCLUDED_SOURCES += ldt_code32.s ldt.c | |
470 | else # target = osx | |
0a7de745 A |
471 | $(OBJROOT)/ldt_mach_exc_server.c: |
472 | $(MIG) $(CFLAGS) \ | |
473 | -user /dev/null \ | |
474 | -server $(OBJROOT)/ldt_mach_exc_server.c \ | |
475 | -header $(OBJROOT)/ldt_mach_exc.h \ | |
476 | mach_exc.defs | |
477 | ||
f427ee49 | 478 | ldt: INVALID_ARCHS = $(ARCH_CONFIGS) |
0a7de745 | 479 | ldt: $(OBJROOT)/ldt_mach_exc_server.c |
f427ee49 | 480 | ldt: OTHER_CFLAGS += -arch x86_64 -I $(OBJROOT) $(SRCROOT)/ldt_code32.s -Wl,-pagezero_size,0x1000 -Wno-missing-variable-declarations |
cb323159 | 481 | ldt: CODE_SIGN_ENTITLEMENTS=ldt_entitlement.plist |
0a7de745 A |
482 | endif |
483 | ||
d26ffc64 A |
484 | ifneq ($(PLATFORM),BridgeOS) |
485 | EXCLUDED_SOURCES += remote_time.c | |
486 | else | |
487 | remote_time: INVALID_ARCHS = armv7 armv7s arm64_32 | |
488 | endif | |
489 | ||
0a7de745 | 490 | vm_phys_footprint: OTHER_LDFLAGS += -framework CoreFoundation -framework IOSurface |
cb323159 | 491 | |
f427ee49 A |
492 | vm_kern_count_wired_kernelcache: OTHER_CFLAGS += -I$(SDKROOT)/System/Library/Frameworks/Kernel.framework/PrivateHeaders/mach |
493 | ||
cb323159 A |
494 | debug_control_port_for_pid: CODE_SIGN_ENTITLEMENTS = ./debug_control_port_for_pid_entitlement.plist |
495 | ||
496 | prng: OTHER_LDFLAGS += -ldarwintest_utils | |
0a7de745 | 497 | |
f427ee49 A |
498 | preoslog: OTHER_LDFLAGS += -ldarwintest_utils |
499 | ||
500 | task_policy: CODE_SIGN_ENTITLEMENTS = ./task_policy_entitlement.plist | |
501 | ||
502 | OTHER_TEST_TARGETS += task_policy_unentitled | |
503 | task_policy_unentitled: CODE_SIGN_ENTITLEMENTS = task_for_pid_entitlement.plist | |
504 | task_policy_unentitled: OTHER_CFLAGS += -DUNENTITLED | |
505 | task_policy_unentitled: task_policy.c | |
506 | $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/$@ | |
507 | $(CODESIGN) --force --sign - --timestamp=none --entitlements $(CODE_SIGN_ENTITLEMENTS) $(SYMROOT)/$@ | |
508 | ||
509 | ||
510 | EXCLUDED_SOURCES += get_shared_cache_address.c | |
511 | ifeq ($(PLATFORM),iPhoneOS) | |
512 | CUSTOM_TARGETS += get_shared_cache_address | |
513 | get_shared_cache_address: INVALID_ARCHS = arm64 | |
514 | get_shared_cache_address: get_shared_cache_address.c | |
515 | $(CC) $(OTHER_CFLAGS) $(CFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/get_shared_cache_address | |
516 | ||
517 | install-get_shared_cache_address: get_shared_cache_address | |
518 | $(CODESIGN) --force --sign - --timestamp=none --identifier=com.apple.get_shared_cache_address $(SYMROOT)/get_shared_cache_address | |
519 | mkdir -p $(INSTALLDIR) | |
520 | cp $(SYMROOT)/get_shared_cache_address $(INSTALLDIR)/ | |
521 | endif | |
522 | ||
523 | ifneq ($(PLATFORM),MacOSX) | |
524 | EXCLUDED_SOURCES += hvtest_x86.m hvtest_x86_guest.c hvtest_x86_asm.s | |
525 | else | |
526 | EXCLUDED_SOURCES += hvtest_x86_guest.c hvtest_x86_asm.s | |
527 | hvtest_x86: CODE_SIGN_ENTITLEMENTS = hv_public.entitlements | |
528 | hvtest_x86: INVALID_ARCHS += arm64e arm64 i386 | |
529 | hvtest_x86: OTHER_CFLAGS += hvtest_x86_guest.c hvtest_x86_asm.s -framework Hypervisor -framework Foundation | |
530 | endif | |
531 | ||
532 | OTHER_TEST_TARGETS += io_catalog_send_data vm_memory_share_tests | |
533 | ||
534 | vm_memory_share_tests: INVALID_ARCHS = i386 | |
535 | vm_memory_share_tests: CODE_SIGN_ENTITLEMENTS = ./task_for_pid_entitlement.plist | |
536 | vm_memory_share_tests: vm_memory_tests_src/main.c vm_memory_tests_src/common.c vm_memory_tests_src/vm_tests.c | |
537 | $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $^ -o $(SYMROOT)/$@ | |
538 | echo $(CODESIGN) --force --sign - --timestamp=none --entitlements $(SRCROOT)/$(CODE_SIGN_ENTITLEMENTS) $(SYMROOT)/$@; | |
539 | env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none --entitlements "$(SRCROOT)/$(CODE_SIGN_ENTITLEMENTS)" $(SYMROOT)/$@; | |
540 | ||
541 | # build the mach server as individual helper which does not use libdarwintest | |
542 | CUSTOM_TARGETS += vm_memory_share_tests_server | |
543 | vm_memory_share_tests_server: CODE_SIGN_ENTITLEMENTS = ./task_for_pid_entitlement.plist | |
544 | vm_memory_share_tests_server: vm_memory_tests_src/server.c vm_memory_tests_src/common.c vm_memory_tests_src/vm_tests.c | |
545 | $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $^ -o $(SYMROOT)/vm_memory_share_tests_server | |
546 | echo $(CODESIGN) --force --sign - --timestamp=none --entitlements $(SRCROOT)/$(CODE_SIGN_ENTITLEMENTS) $(SYMROOT)/$@; | |
547 | env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none --entitlements "$(SRCROOT)/$(CODE_SIGN_ENTITLEMENTS)" $(SYMROOT)/$@; | |
548 | ||
549 | install-vm_memory_share_tests_server: vm_memory_share_tests_server | |
550 | mkdir -p $(INSTALLDIR) | |
551 | cp $(SYMROOT)/vm_memory_share_tests_server $(INSTALLDIR)/ | |
ea3f0419 A |
552 | |
553 | io_catalog_send_data: INVALID_ARCHS = i386 | |
554 | io_catalog_send_data: OTHER_CFLAGS += -DTEST_UNENTITLED -framework IOKit -framework CoreFoundation -framework Foundation | |
f427ee49 | 555 | |
ea3f0419 A |
556 | io_catalog_send_data: iokit/io_catalog_send_data.m |
557 | $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/$@ | |
558 | ||
f427ee49 A |
559 | ifeq ($(PLATFORM),MacOSX) |
560 | EXCLUDED_SOURCES += vm/kern_max_task_pmem.c | |
561 | endif | |
562 | ||
563 | EXCLUDED_SOURCES += vm/perf_helpers.c | |
564 | ||
565 | fault_throughput: vm/fault_throughput.c | |
566 | mkdir -p $(SYMROOT)/vm | |
567 | $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/vm/$@ | |
568 | fault_throughput: OTHER_CFLAGS += vm/perf_helpers.c | |
569 | ||
570 | install-fault_throughput: fault_throughput | |
571 | mkdir -p $(INSTALLDIR)/vm | |
572 | cp $(SYMROOT)/vm/fault_throughput $(INSTALLDIR)/vm/ | |
573 | ||
574 | BATS_PLISTS += $(SRCROOT)/vm/fault_throughput.plist | |
575 | ||
576 | fault_throughput_benchrun: | |
577 | mkdir -p $(SYMROOT)/vm | |
578 | cp $(SRCROOT)/vm/fault_throughput.lua $(SYMROOT)/vm/fault_throughput.lua | |
579 | chmod +x $(SYMROOT)/vm/fault_throughput.lua | |
580 | ||
581 | install-fault_throughput_benchrun: fault_throughput_benchrun | |
582 | mkdir -p $(INSTALLDIR)/vm | |
583 | cp $(SYMROOT)/vm/fault_throughput.lua $(INSTALLDIR)/vm | |
584 | chmod +x $(INSTALLDIR)/vm/fault_throughput.lua | |
585 | ||
586 | CUSTOM_TARGETS += fault_throughput fault_throughput_benchrun | |
587 | EXCLUDED_SOURCES += vm/fault_throughput.plist vm/fault_throughput.c | |
588 | ||
589 | perf_madvise: vm/perf_madvise.c | |
590 | mkdir -p $(SYMROOT)/vm | |
591 | $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/vm/$@ | |
592 | perf_madvise: OTHER_CFLAGS += vm/perf_helpers.c | |
593 | install-perf_madvise: perf_madvise | |
594 | mkdir -p $(INSTALLDIR)/vm | |
595 | cp $(SYMROOT)/vm/perf_madvise $(INSTALLDIR)/vm/ | |
596 | perf_madvise_benchrun: | |
597 | mkdir -p $(SYMROOT)/vm | |
598 | cp $(SRCROOT)/vm/perf_madvise.lua $(SYMROOT)/vm/perf_madvise.lua | |
599 | chmod +x $(SYMROOT)/vm/perf_madvise.lua | |
600 | install-perf_madvise_benchrun: perf_madvise_benchrun | |
601 | mkdir -p $(INSTALLDIR)/vm | |
602 | cp $(SYMROOT)/vm/perf_madvise.lua $(INSTALLDIR)/vm | |
603 | chmod +x $(INSTALLDIR)/vm/perf_madvise.lua | |
604 | ||
605 | CUSTOM_TARGETS += perf_madvise perf_madvise_benchrun | |
606 | EXCLUDED_SOURCES += vm/perf_madvise.c | |
607 | ||
ea3f0419 A |
608 | task_create_suid_cred: CODE_SIGN_ENTITLEMENTS = ./task_create_suid_cred_entitlement.plist |
609 | ||
610 | OTHER_TEST_TARGETS += task_create_suid_cred_unentitled | |
611 | task_create_suid_cred_unentitled: OTHER_CFLAGS += -DUNENTITLED | |
612 | task_create_suid_cred_unentitled: task_create_suid_cred.c | |
613 | $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/$@ | |
614 | ||
f427ee49 A |
615 | ifeq ($(PLATFORM),MacOSX) |
616 | test_dext_launch_56101852: OTHER_LDFLAGS += -framework CoreFoundation -framework IOKit | |
617 | test_dext_launch_56101852: CODE_SIGN_ENTITLEMENTS += test_dext_launch_56101852.entitlements | |
618 | else | |
619 | EXCLUDED_SOURCES += test_dext_launch_56101852.c | |
620 | endif | |
621 | ||
622 | ioconnectasyncmethod_57641955: OTHER_LDFLAGS += -framework IOKit | |
623 | ||
624 | ifeq ($(PLATFORM),BridgeOS) | |
625 | EXCLUDED_SOURCES += ipsec.m | |
626 | else | |
627 | ipsec: OTHER_LDFLAGS += -framework Foundation -framework CoreFoundation -framework NetworkExtension | |
628 | ipsec: CODE_SIGN_ENTITLEMENTS = ipsec.entitlements | |
629 | endif | |
630 | ||
631 | test_sysctl_kern_procargs_25397314: OTHER_LDFLAGS += -framework Foundation -ldarwintest_utils | |
632 | ||
39037602 | 633 | include $(DEVELOPER_DIR)/AppleInternal/Makefiles/darwintest/Makefile.targets |