1*043036a2SApple OSS DistributionsPROJECT := xnu/darwintests 2*043036a2SApple OSS Distributions 3*043036a2SApple OSS Distributionsinclude disabled.mk 4*043036a2SApple OSS Distributions 5*043036a2SApple OSS Distributions# When building as part of xnu_tests, we get passed a DSTROOT that's got the 6*043036a2SApple OSS Distributions# unit test path in it already. But, BASEDSTROOT doesn't, so use that instead. 7*043036a2SApple OSS Distributionsifdef BASEDSTROOT 8*043036a2SApple OSS Distributionsoverride DSTROOT = $(BASEDSTROOT) 9*043036a2SApple OSS Distributionsendif 10*043036a2SApple OSS Distributions 11*043036a2SApple OSS DistributionsINVALID_ARCHS = i386 $(filter armv7%,$(ARCH_CONFIGS)) 12*043036a2SApple OSS DistributionsENABLE_LTE_TESTS=YES 13*043036a2SApple OSS Distributions 14*043036a2SApple OSS DistributionsOTHER_LTE_INCLUDE_FILES += \ 15*043036a2SApple OSS Distributions /System/Library/PrivateFrameworks/LoggingSupport.framework, \ 16*043036a2SApple OSS Distributions /System/Library/PrivateFrameworks/MobileKeyBag.framework, \ 17*043036a2SApple OSS Distributions /System/Library/Frameworks/IOSurface.framework, \ 18*043036a2SApple OSS Distributions /usr/local/lib/libdarwintest_utils.dylib, \ 19*043036a2SApple OSS Distributions /usr/lib/libapple_crypto.dylib, 20*043036a2SApple OSS Distributions 21*043036a2SApple OSS DistributionsENV = /usr/bin/env 22*043036a2SApple OSS Distributions 23*043036a2SApple OSS DistributionsDEVELOPER_DIR ?= $(shell xcode-select -p) 24*043036a2SApple OSS Distributions 25*043036a2SApple OSS Distributions 26*043036a2SApple OSS Distributionsifeq ($(origin TIGHTBEAM_MODULE_DIR),undefined) 27*043036a2SApple OSS Distributions export TIGHTBEAM_MODULE_DIR := $(shell /usr/bin/xcrun --show-sdk-path -sdk $(SDKROOT))/usr/local/lib/kernel/tightbeam 28*043036a2SApple OSS Distributionsendif 29*043036a2SApple OSS Distributions 30*043036a2SApple OSS DistributionsUSE_WERROR := 1 31*043036a2SApple OSS Distributionsifneq ($(BUILD_WERROR),) 32*043036a2SApple OSS DistributionsUSE_WERROR := $(BUILD_WERROR) 33*043036a2SApple OSS Distributionsendif 34*043036a2SApple OSS Distributions 35*043036a2SApple OSS Distributionsifeq ($(USE_WERROR),1) 36*043036a2SApple OSS DistributionsWERROR := -Werror 37*043036a2SApple OSS Distributionsendif 38*043036a2SApple OSS Distributions 39*043036a2SApple OSS Distributions# the xnu build system will only ever call us with the default target 40*043036a2SApple OSS Distributions.DEFAULT_GOAL := install 41*043036a2SApple OSS Distributions 42*043036a2SApple OSS Distributionsinclude $(DEVELOPER_DIR)/AppleInternal/Makefiles/darwintest/Makefile.common 43*043036a2SApple OSS Distributions 44*043036a2SApple OSS DistributionsOTHER_CFLAGS = -Wall 45*043036a2SApple OSS DistributionsOTHER_CFLAGS += -Wno-deprecated-declarations 46*043036a2SApple OSS DistributionsOTHER_CFLAGS += -Werror=excess-initializers 47*043036a2SApple OSS DistributionsOTHER_CFLAGS += -Wno-c2x-extensions 48*043036a2SApple OSS DistributionsOTHER_CFLAGS += -Werror=excess-initializers 49*043036a2SApple OSS DistributionsOTHER_CFLAGS += --std=gnu17 -isystem $(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders 50*043036a2SApple OSS DistributionsOTHER_CFLAGS += -UT_NAMESPACE_PREFIX -DT_NAMESPACE_PREFIX=xnu -DT_LEAKS_DISABLE=1 51*043036a2SApple OSS DistributionsOTHER_CFLAGS += -F $(SDKROOT)/System/Library/PrivateFrameworks 52*043036a2SApple OSS Distributions 53*043036a2SApple OSS Distributions# IPC utils for tests that need ipc_utils.c 54*043036a2SApple OSS DistributionsIPC_UTILS = ipc/ipc_utils.c 55*043036a2SApple OSS DistributionsEXCLUDED_SOURCES += $(IPC_UTILS) 56*043036a2SApple OSS Distributions 57*043036a2SApple OSS Distributionsipc/%: OTHER_CFLAGS += -Wno-format-pedantic $(WERROR) 58*043036a2SApple OSS Distributions 59*043036a2SApple OSS Distributions 60*043036a2SApple OSS DistributionsCODESIGN:=$(shell xcrun -sdk "$(TARGETSDK)" -find codesign) 61*043036a2SApple OSS DistributionsCODESIGN_HARDENED_RUNTIME:=$(CODESIGN) -o runtime 62*043036a2SApple OSS DistributionsCODESIGN_ALLOCATE:=$(shell xcrun -sdk "$(TARGETSDK)" -find codesign_allocate) 63*043036a2SApple OSS Distributions 64*043036a2SApple OSS DistributionsLIPO:=$(shell xcrun -sdk "$(TARGETSDK)" -find lipo) 65*043036a2SApple OSS Distributions 66*043036a2SApple OSS Distributionsifeq ($(PLATFORM),iPhoneOS) 67*043036a2SApple OSS Distributions IOS_TEST_COMPAT = YES 68*043036a2SApple OSS Distributionselse 69*043036a2SApple OSS Distributions IOS_TEST_COMPAT = NO 70*043036a2SApple OSS Distributionsendif 71*043036a2SApple OSS Distributions 72*043036a2SApple OSS Distributions# Generate tightbeam header for ExclavesCHelloServer from tbmodule in the SDK 73*043036a2SApple OSS Distributionsifneq ($(wildcard $(SDKROOT)/System/Library/PrivateFrameworks/Tightbeam.framework/Headers/tightbeam.h),) 74*043036a2SApple OSS DistributionsTIGHTBEAM_MODULES := \ 75*043036a2SApple OSS Distributions ExclavesCHelloServer.tbmodule 76*043036a2SApple OSS Distributions 77*043036a2SApple OSS DistributionsTIGHTBEAM_MODULE_HEADERS := $(patsubst %.tbmodule,%.tightbeam.h,$(TIGHTBEAM_MODULES)) 78*043036a2SApple OSS DistributionsTIGHTBEAM_MODULE_IMPL := $(patsubst %.tbmodule,%.tightbeam.c,$(TIGHTBEAM_MODULES)) 79*043036a2SApple OSS Distributions 80*043036a2SApple OSS Distributions# This makes sure to not include any tbmodules which don't exist in the SDK and 81*043036a2SApple OSS Distributions# expand the modules listed above to their full path in the SDK. The modules 82*043036a2SApple OSS Distributions# should only be needed when actually building with CONFIG_EXCLAVES 83*043036a2SApple OSS Distributions# (which can't easily be checked here). 84*043036a2SApple OSS DistributionsTIGHTBEAM_MODULES := $(patsubst %.tbmodule,$(TIGHTBEAM_MODULE_DIR)/%.tbmodule,$(TIGHTBEAM_MODULES)) 85*043036a2SApple OSS DistributionsTIGHTBEAM_MODULES := $(wildcard $(TIGHTBEAM_MODULES)) 86*043036a2SApple OSS DistributionsTIGHTBEAM_MODULE_IMPL_PATH := $(addprefix $(OBJROOT)/, $(TIGHTBEAM_MODULE_IMPL)) 87*043036a2SApple OSS Distributions 88*043036a2SApple OSS Distributions$(TIGHTBEAM_MODULE_IMPL) : \ 89*043036a2SApple OSS Distributions %.tightbeam.c : $(TIGHTBEAM_MODULES) 90*043036a2SApple OSS Distributions $(TIGHTBEAMC) build generate-c --output-base $(OBJROOT)/$*.tightbeam.c --codegen-version 2 $< 91*043036a2SApple OSS Distributions 92*043036a2SApple OSS Distributions$(TIGHTBEAM_MODULE_HEADERS) : $(TIGHTBEAM_MODULE_IMPL) 93*043036a2SApple OSS Distributionsendif 94*043036a2SApple OSS Distributions 95*043036a2SApple OSS Distributions# Subsystems 96*043036a2SApple OSS Distributions 97*043036a2SApple OSS Distributionsinclude ktrace/Makefile 98*043036a2SApple OSS Distributionsinclude signals/Makefile 99*043036a2SApple OSS Distributions 100*043036a2SApple OSS DistributionsINCLUDED_TEST_SOURCE_DIRS += recount 101*043036a2SApple OSS Distributionsinclude recount/Makefile 102*043036a2SApple OSS DistributionsINCLUDED_TEST_SOURCE_DIRS += cpu_counters 103*043036a2SApple OSS Distributionsinclude cpu_counters/Makefile 104*043036a2SApple OSS Distributions 105*043036a2SApple OSS DistributionsINCLUDED_TEST_SOURCE_DIRS += sched 106*043036a2SApple OSS Distributionsinclude sched/Makefile 107*043036a2SApple OSS Distributions 108*043036a2SApple OSS Distributions# Miscellaneous Tests 109*043036a2SApple OSS Distributions 110*043036a2SApple OSS Distributionsmach_eventlink: OTHER_LDFLAGS += $(SCHED_UTILS_FLAGS) 111*043036a2SApple OSS Distributionsmach_eventlink: $(SCHED_UTILS) 112*043036a2SApple OSS Distributions 113*043036a2SApple OSS Distributionsatm_diagnostic_flag: OTHER_CFLAGS += drop_priv.c 114*043036a2SApple OSS Distributions 115*043036a2SApple OSS Distributionsatm_diagnostic_flag_entitled: CODE_SIGN_ENTITLEMENTS = atm_diagnostic_flag.entitlements 116*043036a2SApple OSS Distributionsatm_diagnostic_flag_entitled: OTHER_CFLAGS += drop_priv.c 117*043036a2SApple OSS Distributions 118*043036a2SApple OSS Distributionsavx: INVALID_ARCHS = $(filter arm%,$(ARCH_CONFIGS)) 119*043036a2SApple OSS Distributionsavx: OTHER_CFLAGS += -mavx512f -mavx512bw -mavx512vl 120*043036a2SApple OSS Distributionsavx: OTHER_CFLAGS += -I$(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders 121*043036a2SApple OSS Distributionsavx: CONFIG_FLAGS := $(filter-out -O%,$(CONFIG_FLAGS)) 122*043036a2SApple OSS Distributions# Add -mno-implicit-float to prevent the compiler from touching SIMD regs 123*043036a2SApple OSS Distributions# unexpectedly 124*043036a2SApple OSS Distributionsavx: CONFIG_FLAGS += -mno-implicit-float 125*043036a2SApple OSS Distributions# Disable vzeroupper insertion to work around rdar://problem/35035096 126*043036a2SApple OSS Distributionsavx: CONFIG_FLAGS += -mllvm -x86-use-vzeroupper=0 127*043036a2SApple OSS Distributionsifneq (osx,$(TARGET_NAME)) 128*043036a2SApple OSS DistributionsEXCLUDED_SOURCES += avx.c 129*043036a2SApple OSS Distributionsendif 130*043036a2SApple OSS Distributions 131*043036a2SApple OSS DistributionsCUSTOM_TARGETS = sr_entitlement_helper 132*043036a2SApple OSS Distributions 133*043036a2SApple OSS Distributionssr_entitlement_helper: sr_entitlement_helper.c 134*043036a2SApple OSS Distributions mkdir -p $(SYMROOT) 135*043036a2SApple OSS Distributions $(CC) -I $(OBJROOT) $(CFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) sr_entitlement_helper.c -o $(SYMROOT)/$@ 136*043036a2SApple OSS Distributions echo $(CODESIGN) --force --sign - --timestamp=none --entitlements sr_entitlement.entitlements $(SYMROOT)/$@; \ 137*043036a2SApple OSS Distributions env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none --entitlements sr_entitlement.entitlements $(SYMROOT)/$@; 138*043036a2SApple OSS Distributions 139*043036a2SApple OSS Distributionsinstall-sr_entitlement_helper: sr_entitlement_helper 140*043036a2SApple OSS Distributions mkdir -p $(INSTALLDIR) 141*043036a2SApple OSS Distributions cp $(SYMROOT)/sr_entitlement_helper $(INSTALLDIR) 142*043036a2SApple OSS Distributions 143*043036a2SApple OSS Distributionssr_entitlement: OTHER_LDFLAGS += -ldarwintest_utils 144*043036a2SApple OSS Distributions 145*043036a2SApple OSS Distributionsrestrict_jit: CODE_SIGN_ENTITLEMENTS = restrict_jit.entitlements 146*043036a2SApple OSS Distributions 147*043036a2SApple OSS Distributionsbacktracing_tests: OTHER_LDFLAGS += -framework CoreSymbolication 148*043036a2SApple OSS Distributionsbacktracing_tests: CODE_SIGN_ENTITLEMENTS = kernel_symbolication_entitlements.plist 149*043036a2SApple OSS Distributions 150*043036a2SApple OSS DistributionsCUSTOM_TARGETS += corpse_backtrace2 151*043036a2SApple OSS Distributions 152*043036a2SApple OSS Distributionscorpse_backtrace2: 153*043036a2SApple OSS Distributions $(MIG) $(CFLAGS) \ 154*043036a2SApple OSS Distributions -DMACH_EXC_SERVER_TASKIDTOKEN \ 155*043036a2SApple OSS Distributions -DMACH_EXC_SERVER_BACKTRACE \ 156*043036a2SApple OSS Distributions -sheader $(OBJROOT)/excserver_backtrace.h \ 157*043036a2SApple OSS Distributions -server $(OBJROOT)/excserver_backtrace.c \ 158*043036a2SApple OSS Distributions -header /dev/null -user /dev/null \ 159*043036a2SApple OSS Distributions excserver_backtrace.defs 160*043036a2SApple OSS Distributions 161*043036a2SApple OSS Distributionsinstall-corpse_backtrace2: ; 162*043036a2SApple OSS Distributions 163*043036a2SApple OSS Distributionscorpse_backtrace: corpse_backtrace2 exc_helpers.c 164*043036a2SApple OSS Distributionscorpse_backtrace: OTHER_CFLAGS += $(OBJROOT)/excserver_backtrace.c 165*043036a2SApple OSS Distributionscorpse_backtrace: OTHER_CFLAGS += -I $(OBJROOT) 166*043036a2SApple OSS Distributionscorpse_backtrace: CODE_SIGN_ENTITLEMENTS = entitlements/set_exception_port.entitlement 167*043036a2SApple OSS Distributions 168*043036a2SApple OSS Distributions# Tests that use exc_guard_helper.h should add all of the build options used by exc_guard_helper_test: 169*043036a2SApple OSS Distributions# - additional C files exc_guard_helper.c and exc_helpers.c and test_utils.c 170*043036a2SApple OSS Distributions# - additional library darwintest_utils 171*043036a2SApple OSS Distributions# - excserver MIG-generated file 172*043036a2SApple OSS Distributions# - entitlement to allow thread_set_exception_ports() 173*043036a2SApple OSS Distributionsexc_guard_helper_test: exc_guard_helper.c exc_helpers.c test_utils.c excserver 174*043036a2SApple OSS Distributionsexc_guard_helper_test: OTHER_CFLAGS += $(OBJROOT)/excserver.c -I $(OBJROOT) 175*043036a2SApple OSS Distributionsexc_guard_helper_test: OTHER_LDFLAGS += -ldarwintest_utils 176*043036a2SApple OSS Distributionsexc_guard_helper_test: CODE_SIGN_ENTITLEMENTS = entitlements/set_exception_port.entitlement 177*043036a2SApple OSS Distributions 178*043036a2SApple OSS DistributionsEXCLUDED_SOURCES += exc_guard_helper.c 179*043036a2SApple OSS Distributions 180*043036a2SApple OSS Distributionsexc_guard_helper_test_unexpected: exc_guard_helper.c exc_helpers.c test_utils.c excserver 181*043036a2SApple OSS Distributionsexc_guard_helper_test_unexpected: OTHER_CFLAGS += $(OBJROOT)/excserver.c -I $(OBJROOT) 182*043036a2SApple OSS Distributionsexc_guard_helper_test_unexpected: OTHER_LDFLAGS += -ldarwintest_utils 183*043036a2SApple OSS Distributionsexc_guard_helper_test_unexpected: CODE_SIGN_ENTITLEMENTS = entitlements/set_exception_port.entitlement 184*043036a2SApple OSS Distributions 185*043036a2SApple OSS Distributions# Tests that use try_read_write.h should add all of the build options used by try_read_write_test: 186*043036a2SApple OSS Distributions# - additional C files try_read_write.c and exc_helpers.c 187*043036a2SApple OSS Distributions# - excserver MIG-generated file 188*043036a2SApple OSS Distributions# - entitlement to allow thread_set_exception_ports() 189*043036a2SApple OSS Distributionstry_read_write_test: try_read_write.c exc_helpers.c excserver 190*043036a2SApple OSS Distributionstry_read_write_test: OTHER_CFLAGS += $(OBJROOT)/excserver.c -I $(OBJROOT) 191*043036a2SApple OSS Distributionstry_read_write_test: CODE_SIGN_ENTITLEMENTS = entitlements/set_exception_port.entitlement 192*043036a2SApple OSS Distributions 193*043036a2SApple OSS DistributionsEXCLUDED_SOURCES += try_read_write.c 194*043036a2SApple OSS Distributions 195*043036a2SApple OSS Distributionstry_read_write_test_unexpected: try_read_write.c exc_helpers.c excserver 196*043036a2SApple OSS Distributionstry_read_write_test_unexpected: OTHER_CFLAGS += $(OBJROOT)/excserver.c -I $(OBJROOT) 197*043036a2SApple OSS Distributionstry_read_write_test_unexpected: CODE_SIGN_ENTITLEMENTS = entitlements/set_exception_port.entitlement 198*043036a2SApple OSS Distributions 199*043036a2SApple OSS Distributionsvm/corpse_owned_vmobjects: excserver_protect_state excserver 200*043036a2SApple OSS Distributionsvm/corpse_owned_vmobjects: OTHER_CFLAGS += $(OBJROOT)/excserver_protect_state.c -I $(OBJROOT) 201*043036a2SApple OSS Distributionsvm/corpse_owned_vmobjects: CODE_SIGN_ENTITLEMENTS += vm/corpse_owned_vmobjects.entitlements 202*043036a2SApple OSS Distributions 203*043036a2SApple OSS Distributionsvm_test_mach_map: try_read_write.c exc_helpers.c excserver 204*043036a2SApple OSS Distributionsvm_test_mach_map: OTHER_CFLAGS += $(OBJROOT)/excserver.c -I $(OBJROOT) 205*043036a2SApple OSS Distributionsvm_test_mach_map: CODE_SIGN_ENTITLEMENTS = ./vm_test_mach_map.plist 206*043036a2SApple OSS Distributions 207*043036a2SApple OSS DistributionsOTHER_TEST_TARGETS += vm/vm_parameter_validation 208*043036a2SApple OSS Distributionsvm/vm_parameter_validation: CODE_SIGN_ENTITLEMENTS = vm/vm_parameter_validation.entitlements 209*043036a2SApple OSS Distributions 210*043036a2SApple OSS Distributions# vm_parameter_validation builds each arch as a separate build command 211*043036a2SApple OSS Distributions# so we can pass architecture-specific linker flags. 212*043036a2SApple OSS Distributions# and generate arch-specific MIG files. 213*043036a2SApple OSS Distributions 214*043036a2SApple OSS Distributions# libdarwintest.a doesn't have an arm64 slice on watchOS 215*043036a2SApple OSS Distributionsifeq ($(PLATFORM),WatchOS) 216*043036a2SApple OSS DistributionsVM_PARAMETER_VALIDATION_INVALID_ARCHS = arm64 217*043036a2SApple OSS Distributionsvm/vm_parameter_validation: INVALID_ARCHS += arm64 218*043036a2SApple OSS Distributionsendif 219*043036a2SApple OSS Distributions 220*043036a2SApple OSS DistributionsVM_PARAMETER_VALIDATION_ARCHS = $(filter-out $(VM_PARAMETER_VALIDATION_INVALID_ARCHS),$(ARCH_CONFIGS)) 221*043036a2SApple OSS Distributions 222*043036a2SApple OSS Distributions# Some tests map-overwrite wildly at addresses near 0. 223*043036a2SApple OSS Distributions# Use a large PAGEZERO so our executable and other data do not land there. 224*043036a2SApple OSS Distributions# (This is 32-bit only. 64-bit uses 4GB PAGEZERO by default which is fine.) 225*043036a2SApple OSS DistributionsVM_PARAMETER_VALIDATION_LDFLAGS_i386 = -Xlinker -pagezero_size -Xlinker 0x1000000 226*043036a2SApple OSS DistributionsVM_PARAMETER_VALIDATION_LDFLAGS_armv7 = -Xlinker -pagezero_size -Xlinker 0x1000000 227*043036a2SApple OSS DistributionsVM_PARAMETER_VALIDATION_LDFLAGS_armv7s = -Xlinker -pagezero_size -Xlinker 0x1000000 228*043036a2SApple OSS DistributionsVM_PARAMETER_VALIDATION_LDFLAGS_armv7k = -Xlinker -pagezero_size -Xlinker 0x1000000 229*043036a2SApple OSS DistributionsVM_PARAMETER_VALIDATION_LDFLAGS_arm64_32 = -Xlinker -pagezero_size -Xlinker 0x1000000 230*043036a2SApple OSS Distributions 231*043036a2SApple OSS DistributionsVM_PARAMETER_VALIDATION_SLICES=$(addprefix $(SYMROOT)/vm/vm_parameter_validation_,$(VM_PARAMETER_VALIDATION_ARCHS)) 232*043036a2SApple OSS Distributions 233*043036a2SApple OSS Distributionsvm/vm_parameter_validation: assets $(VM_PARAMETER_VALIDATION_SLICES) 234*043036a2SApple OSS Distributions $(LIPO) -create $(VM_PARAMETER_VALIDATION_SLICES) -output $(SYMROOT)/$@ 235*043036a2SApple OSS Distributions env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --entitlements $(CODE_SIGN_ENTITLEMENTS) --timestamp=none $(SYMROOT)/$@ 236*043036a2SApple OSS Distributions 237*043036a2SApple OSS Distributions$(SYMROOT)/vm/vm_parameter_validation_%: ../osfmk/tests/vm_parameter_validation.h \ 238*043036a2SApple OSS Distributions $(OBJROOT)/vm_parameter_validation_%_vm32_map_user.c \ 239*043036a2SApple OSS Distributions $(OBJROOT)/vm_parameter_validation_%_mach_vm_user.c \ 240*043036a2SApple OSS Distributions $(OBJROOT)/vm_parameter_validation_%_replacement_mach_host.c \ 241*043036a2SApple OSS Distributions $(OBJROOT)/vm_parameter_validation_%_replacement_host_priv.c \ 242*043036a2SApple OSS Distributions vm/vm_parameter_validation.c 243*043036a2SApple OSS Distributions mkdir -p $(SYMROOT)/vm 244*043036a2SApple OSS Distributions $(CC) -I $(OBJROOT) \ 245*043036a2SApple OSS Distributions $(DT_CFLAGS) $(OTHER_CFLAGS) $(filter-out $(ARCH_FLAGS),$(CFLAGS)) -arch $* \ 246*043036a2SApple OSS Distributions $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $(VM_PARAMETER_VALIDATION_LDFLAGS_$*) \ 247*043036a2SApple OSS Distributions -DVM32_SUPPORT=1 -DKERNEL_VM_TEST=1 \ 248*043036a2SApple OSS Distributions $(OBJROOT)/vm_parameter_validation_$*_vm32_map_user.c \ 249*043036a2SApple OSS Distributions $(OBJROOT)/vm_parameter_validation_$*_mach_vm_user.c \ 250*043036a2SApple OSS Distributions $(OBJROOT)/vm_parameter_validation_$*_replacement_mach_host.c \ 251*043036a2SApple OSS Distributions $(OBJROOT)/vm_parameter_validation_$*_replacement_host_priv.c \ 252*043036a2SApple OSS Distributions vm/vm_parameter_validation.c -o $@ 253*043036a2SApple OSS Distributions 254*043036a2SApple OSS Distributions# xnu/libsyscall/mach/mach_vm.c intercepts some VM calls from userspace, 255*043036a2SApple OSS Distributions# sometimes doing something other than the expected MIG call. 256*043036a2SApple OSS Distributions# And on 64-bit platforms libsystem has no interface to reach the 32-bit entrypoints. 257*043036a2SApple OSS Distributions# We generate our own MIG userspace call sites to call the kernel entrypoints directly. 258*043036a2SApple OSS Distributions$(OBJROOT)/vm_parameter_validation_%_vm32_map_user.c: ../osfmk/mach/vm32_map.defs 259*043036a2SApple OSS Distributions $(MIG) $(filter-out $(ARCH_FLAGS),$(CFLAGS)) -arch $* \ 260*043036a2SApple OSS Distributions -I../osfmk -novouchers -DKERNEL_USER=1 -DKOBJECT_SERVER -DKERNEL_VM_TEST=1 \ 261*043036a2SApple OSS Distributions -user $@ -header $(subst _$*_,_,$(@:.c=.h)) \ 262*043036a2SApple OSS Distributions -server /dev/null -sheader /dev/null \ 263*043036a2SApple OSS Distributions $< 264*043036a2SApple OSS Distributions$(OBJROOT)/vm_parameter_validation_%_mach_vm_user.c: ../osfmk/mach/mach_vm.defs 265*043036a2SApple OSS Distributions $(MIG) $(filter-out $(ARCH_FLAGS),$(CFLAGS)) -arch $* \ 266*043036a2SApple OSS Distributions -I../osfmk -novouchers -DKERNEL_USER=1 -DKOBJECT_SERVER -DKERNEL_VM_TEST=1 \ 267*043036a2SApple OSS Distributions -user $@ -header $(subst _$*_,_,$(@:.c=.h)) \ 268*043036a2SApple OSS Distributions -server /dev/null -sheader /dev/null \ 269*043036a2SApple OSS Distributions $< 270*043036a2SApple OSS Distributions# The declaration of mach_memory_object_memory_entry is buggy on U32. 271*043036a2SApple OSS Distributions# We compile in our own MIG user stub for it with a "replacement_" prefix. 272*043036a2SApple OSS Distributions# rdar://117927965 273*043036a2SApple OSS Distributions$(OBJROOT)/vm_parameter_validation_%_replacement_mach_host.c: vm/vm_parameter_validation_replacement_mach_host.defs 274*043036a2SApple OSS Distributions $(MIG) $(filter-out $(ARCH_FLAGS),$(CFLAGS)) -arch $* \ 275*043036a2SApple OSS Distributions -I../osfmk -novouchers -DKERNEL_USER=1 -DKOBJECT_SERVER -DKERNEL_VM_TEST=1 \ 276*043036a2SApple OSS Distributions -user $@ -header $(subst _$*_,_,$(@:.c=.h)) \ 277*043036a2SApple OSS Distributions -server /dev/null -sheader /dev/null \ 278*043036a2SApple OSS Distributions $< 279*043036a2SApple OSS Distributions# The declaration of vm_wire is buggy on U32. 280*043036a2SApple OSS Distributions# We compile in our own MIG user stub for it with a "replacement_" prefix. 281*043036a2SApple OSS Distributions# rdar://118258929 282*043036a2SApple OSS Distributions$(OBJROOT)/vm_parameter_validation_%_replacement_host_priv.c: vm/vm_parameter_validation_replacement_host_priv.defs 283*043036a2SApple OSS Distributions $(MIG) $(filter-out $(ARCH_FLAGS),$(CFLAGS)) -arch $* \ 284*043036a2SApple OSS Distributions -I../osfmk -novouchers -DKERNEL_USER=1 -DKOBJECT_SERVER -DKERNEL_VM_TEST=1 \ 285*043036a2SApple OSS Distributions -user $@ -header $(subst _$*_,_,$(@:.c=.h)) \ 286*043036a2SApple OSS Distributions -server /dev/null -sheader /dev/null \ 287*043036a2SApple OSS Distributions $< 288*043036a2SApple OSS Distributions 289*043036a2SApple OSS Distributions 290*043036a2SApple OSS DistributionsCUSTOM_TARGETS += immovable_send_client vm_spawn_tool port_exhaustion_client port_table_limits_client fd_table_limits_client posix_spawnattr_set_crash_behavior_np_child kqworkloop_limits_client 291*043036a2SApple OSS DistributionsCUSTOM_TARGETS += ipc/hardened_exceptions_entitled_debugger ipc/hardened_exceptions_entitled 292*043036a2SApple OSS DistributionsCUSTOM_TARGETS += excserver_protect 293*043036a2SApple OSS DistributionsCUSTOM_TARGETS += excserver_protect_state 294*043036a2SApple OSS Distributions 295*043036a2SApple OSS Distributionsexception_tests: excserver_protect exc_helpers.c 296*043036a2SApple OSS Distributionsexception_tests: CODE_SIGN_ENTITLEMENTS = exception_tests.entitlements 297*043036a2SApple OSS Distributionsexception_tests: OTHER_CFLAGS += $(OBJROOT)/excserver_protect.c 298*043036a2SApple OSS Distributionsexception_tests: OTHER_CFLAGS += -I $(OBJROOT) 299*043036a2SApple OSS Distributionsexception_tests: OTHER_CFLAGS += -DENTITLED=1 300*043036a2SApple OSS Distributions 301*043036a2SApple OSS Distributionsipc/hardened_exceptions: excserver_protect_state exc_helpers.c 302*043036a2SApple OSS Distributionsipc/hardened_exceptions: ipc/hardened_exceptions_entitled ipc/hardened_exceptions_entitled_debugger 303*043036a2SApple OSS Distributionsipc/hardened_exceptions: $(OBJROOT)/excserver_protect_state.c 304*043036a2SApple OSS Distributions 305*043036a2SApple OSS Distributionsipc/hardened_exceptions_entitled: excserver_protect_state 306*043036a2SApple OSS Distributionsipc/hardened_exceptions_entitled: CODE_SIGN_ENTITLEMENTS = entitlements/only_one_exception_port.entitlement 307*043036a2SApple OSS Distributionsipc/hardened_exceptions_entitled: OTHER_CFLAGS += -I $(OBJROOT) 308*043036a2SApple OSS Distributionsipc/hardened_exceptions_entitled: exc_helpers.c ipc/hardened_exceptions.c $(OBJROOT)/excserver_protect_state.c 309*043036a2SApple OSS Distributions mkdir -p $(SYMROOT)/ipc 310*043036a2SApple OSS Distributions $(CC) $(DT_CFLAGS) -I $(OBJROOT) $(CFLAGS) $(OTHER_CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) -I$(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders \ 311*043036a2SApple OSS Distributions $(filter-out $(CUSTOM_TARGETS), $^) -o $(SYMROOT)/$@ 312*043036a2SApple OSS Distributions $(CODESIGN) --force --sign - --entitlements $(CODE_SIGN_ENTITLEMENTS) --timestamp=none $(SYMROOT)/$@ 313*043036a2SApple OSS Distributions 314*043036a2SApple OSS Distributionsipc/hardened_exceptions_entitled_debugger: excserver_protect_state 315*043036a2SApple OSS Distributionsipc/hardened_exceptions_entitled_debugger: CODE_SIGN_ENTITLEMENTS = entitlements/only_one_exception_port_debugger.entitlement 316*043036a2SApple OSS Distributionsipc/hardened_exceptions_entitled_debugger: exc_helpers.c ipc/hardened_exceptions.c $(OBJROOT)/excserver_protect_state.c 317*043036a2SApple OSS Distributions mkdir -p $(SYMROOT)/ipc 318*043036a2SApple OSS Distributions $(CC) $(DT_CFLAGS) -I $(OBJROOT) $(CFLAGS) $(OTHER_CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) -I$(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders \ 319*043036a2SApple OSS Distributions $(filter-out $(CUSTOM_TARGETS), $^) -o $(SYMROOT)/$@ 320*043036a2SApple OSS Distributions $(CODESIGN) --force --sign - --entitlements $(CODE_SIGN_ENTITLEMENTS) --timestamp=none $(SYMROOT)/$@ 321*043036a2SApple OSS Distributions 322*043036a2SApple OSS Distributionsinstall-ipc/hardened_exceptions_entitled_debugger: ipc/hardened_exceptions_entitled_debugger 323*043036a2SApple OSS Distributions mkdir -p $(INSTALLDIR) 324*043036a2SApple OSS Distributions cp $(SYMROOT)/$< $(INSTALLDIR)/ 325*043036a2SApple OSS Distributions 326*043036a2SApple OSS Distributionsinstall-ipc/hardened_exceptions_entitled: ipc/hardened_exceptions_entitled 327*043036a2SApple OSS Distributions mkdir -p $(INSTALLDIR) 328*043036a2SApple OSS Distributions cp $(SYMROOT)/$< $(INSTALLDIR)/ 329*043036a2SApple OSS Distributions 330*043036a2SApple OSS Distributionsinstall-reply_port_defense_client: reply_port_defense_client 331*043036a2SApple OSS Distributions mkdir -p $(INSTALLDIR) 332*043036a2SApple OSS Distributions cp $(SYMROOT)/$< $(INSTALLDIR)/ 333*043036a2SApple OSS Distributions 334*043036a2SApple OSS Distributionsimmovable_send: excserver 335*043036a2SApple OSS Distributionsimmovable_send: OTHER_CFLAGS += $(OBJROOT)/excserver.c -I $(OBJROOT) 336*043036a2SApple OSS Distributionsimmovable_send: OTHER_LDFLAGS += -ldarwintest_utils -lpthread -framework IOKit 337*043036a2SApple OSS Distributionsimmovable_send: immovable_send_client 338*043036a2SApple OSS Distributionsimmovable_send: CODE_SIGN_ENTITLEMENTS = entitlements/set_exception_port.entitlement 339*043036a2SApple OSS Distributions 340*043036a2SApple OSS Distributionslocks: OTHER_LDFLAGS += -ldarwintest_utils 341*043036a2SApple OSS Distributions 342*043036a2SApple OSS Distributionsimmovable_send_client: immovable_send_client.c 343*043036a2SApple OSS Distributions $(CC) $(DT_CFLAGS) -I $(OBJROOT) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) immovable_send_client.c -o $(SYMROOT)/immovable_send_client 344*043036a2SApple OSS Distributions 345*043036a2SApple OSS Distributionsinstall-immovable_send_client: immovable_send_client 346*043036a2SApple OSS Distributions mkdir -p $(INSTALLDIR) 347*043036a2SApple OSS Distributions cp $(SYMROOT)/immovable_send_client $(INSTALLDIR)/ 348*043036a2SApple OSS Distributions 349*043036a2SApple OSS Distributionsipc/sys_perf_notify_test: excserver_protect_state 350*043036a2SApple OSS Distributionsipc/sys_perf_notify_test: OTHER_CFLAGS += $(OBJROOT)/excserver_protect_state.c -I $(OBJROOT) 351*043036a2SApple OSS Distributionsipc/sys_perf_notify_test: CODE_SIGN_ENTITLEMENTS=entitlements/sys_perf_notify_test.entitlements 352*043036a2SApple OSS Distributions 353*043036a2SApple OSS Distributionsipc/port_type_policy: CODE_SIGN_ENTITLEMENTS = entitlements/port_type_policy.entitlements 354*043036a2SApple OSS Distributionsipc/port_type_policy: OTHER_CFLAGS += -I $(OBJROOT) 355*043036a2SApple OSS Distributionsipc/port_type_policy: ipc/port_type_policy.c 356*043036a2SApple OSS Distributionsipc/port_type_policy: $(IPC_UTILS) 357*043036a2SApple OSS Distributions $(CC) $(DT_CFLAGS) -I $(OBJROOT) $(CFLAGS) $(OTHER_CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) -I$(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders \ 358*043036a2SApple OSS Distributions $(filter-out $(CUSTOM_TARGETS), $^) -o $(SYMROOT)/$@ 359*043036a2SApple OSS Distributions $(CODESIGN) --force --sign - --entitlements $(CODE_SIGN_ENTITLEMENTS) --timestamp=none $(SYMROOT)/$@ 360*043036a2SApple OSS Distributions 361*043036a2SApple OSS DistributionsEXCLUDED_SOURCES += posix_sem_namespace_helper.c 362*043036a2SApple OSS DistributionsCUSTOM_TARGETS += posix_sem_namespace_helper_team0 posix_sem_namespace_helper_team1 363*043036a2SApple OSS Distributionsposix_sem_namespace_helper_team0: posix_sem_namespace_helper.c 364*043036a2SApple OSS Distributions $(CC) $(DT_CFLAGS) -I $(OBJROOT) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) -I$(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders \ 365*043036a2SApple OSS Distributions $^ -o $(SYMROOT)/$@ 366*043036a2SApple OSS Distributions $(CODESIGN) --force --sign - --timestamp=none --team-identifier "PSXSEMT0" $(SYMROOT)/$@ 367*043036a2SApple OSS Distributionsposix_sem_namespace_helper_team1: posix_sem_namespace_helper.c 368*043036a2SApple OSS Distributions $(CC) $(DT_CFLAGS) -I $(OBJROOT) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) -I$(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders \ 369*043036a2SApple OSS Distributions $^ -o $(SYMROOT)/$@ 370*043036a2SApple OSS Distributions $(CODESIGN) --force --sign - --timestamp=none --team-identifier "PSXSEMT1" $(SYMROOT)/$@ 371*043036a2SApple OSS Distributions 372*043036a2SApple OSS Distributionsinstall-posix_sem_namespace_helper_team0: posix_sem_namespace_helper_team0 373*043036a2SApple OSS Distributions mkdir -p $(INSTALLDIR) 374*043036a2SApple OSS Distributions cp $(SYMROOT)/posix_sem_namespace_helper_team0 $(INSTALLDIR)/ 375*043036a2SApple OSS Distributionsinstall-posix_sem_namespace_helper_team1: posix_sem_namespace_helper_team1 376*043036a2SApple OSS Distributions mkdir -p $(INSTALLDIR) 377*043036a2SApple OSS Distributions cp $(SYMROOT)/posix_sem_namespace_helper_team1 $(INSTALLDIR)/ 378*043036a2SApple OSS Distributions 379*043036a2SApple OSS Distributionsposix_sem: posix_sem_namespace_helper_team0 posix_sem_namespace_helper_team1 380*043036a2SApple OSS Distributionsposix_sem: OTHER_LDFLAGS += -ldarwintest_utils 381*043036a2SApple OSS Distributions 382*043036a2SApple OSS Distributions 383*043036a2SApple OSS Distributionsposix_spawnattr_set_crash_behavior_np: posix_spawnattr_set_crash_behavior_np_child 384*043036a2SApple OSS Distributionsposix_spawnattr_set_crash_behavior_np: CODE_SIGN_ENTITLEMENTS = posix_spawnattr_set_crash_behavior_np_entitlements.plist 385*043036a2SApple OSS Distributions 386*043036a2SApple OSS Distributionsposix_spawnattr_set_crash_behavior_np_child: posix_spawnattr_set_crash_behavior_np_child.c 387*043036a2SApple OSS Distributions $(CC) $(DT_CFLAGS) -I $(OBJROOT) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) posix_spawnattr_set_crash_behavior_np_child.c -o $(SYMROOT)/posix_spawnattr_set_crash_behavior_np_child 388*043036a2SApple OSS Distributions $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@ 389*043036a2SApple OSS Distributions 390*043036a2SApple OSS Distributionsinstall-posix_spawnattr_set_crash_behavior_np_child: posix_spawnattr_set_crash_behavior_np_child 391*043036a2SApple OSS Distributions mkdir -p $(INSTALLDIR) 392*043036a2SApple OSS Distributions cp $(SYMROOT)/posix_spawnattr_set_crash_behavior_np_child $(INSTALLDIR)/ 393*043036a2SApple OSS Distributions 394*043036a2SApple OSS Distributionsposix_spawnattr_set_launch_type_np: posix_spawnattr_set_launch_type_test 395*043036a2SApple OSS Distributionsposix_spawnattr_set_launch_type_np: OTHER_CFLAGS += -isystem $(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders 396*043036a2SApple OSS Distributions 397*043036a2SApple OSS Distributionsposix_spawn_launch_type: CODE_SIGN_ENTITLEMENTS = posix_spawn_launch_type-entitlements.plist 398*043036a2SApple OSS Distributions 399*043036a2SApple OSS Distributionsport_exhaustion: OTHER_LDFLAGS += -ldarwintest_utils -lpthread 400*043036a2SApple OSS Distributionsport_exhaustion: port_exhaustion_client 401*043036a2SApple OSS Distributions 402*043036a2SApple OSS Distributionsport_exhaustion_client: port_exhaustion_client.c 403*043036a2SApple OSS Distributions $(CC) $(DT_CFLAGS) -I $(OBJROOT) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) port_exhaustion_client.c -o $(SYMROOT)/port_exhaustion_client 404*043036a2SApple OSS Distributions 405*043036a2SApple OSS Distributionsinstall-port_exhaustion_client: port_exhaustion_client 406*043036a2SApple OSS Distributions mkdir -p $(INSTALLDIR) 407*043036a2SApple OSS Distributions cp $(SYMROOT)/port_exhaustion_client $(INSTALLDIR)/ 408*043036a2SApple OSS Distributions 409*043036a2SApple OSS Distributionsport_table_limits: rnserver 410*043036a2SApple OSS Distributionsport_table_limits: CODE_SIGN_ENTITLEMENTS = task_for_pid_entitlement.plist 411*043036a2SApple OSS Distributionsport_table_limits: OTHER_CFLAGS += $(OBJROOT)/rnServer.c -I $(OBJROOT) 412*043036a2SApple OSS Distributionsport_table_limits: OTHER_LDFLAGS += -ldarwintest_utils -lpthread 413*043036a2SApple OSS Distributionsport_table_limits: port_table_limits_client 414*043036a2SApple OSS Distributions 415*043036a2SApple OSS Distributionsport_table_limits_client: port_table_limits_client.c 416*043036a2SApple OSS Distributions $(CC) $(DT_CFLAGS) -I $(OBJROOT) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) port_table_limits_client.c -o $(SYMROOT)/port_table_limits_client 417*043036a2SApple OSS Distributions $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@ 418*043036a2SApple OSS Distributions 419*043036a2SApple OSS Distributionsinstall-port_table_limits_client: port_table_limits_client 420*043036a2SApple OSS Distributions mkdir -p $(INSTALLDIR) 421*043036a2SApple OSS Distributions cp $(SYMROOT)/port_table_limits_client $(INSTALLDIR)/ 422*043036a2SApple OSS Distributions 423*043036a2SApple OSS DistributionsCUSTOM_TARGETS += kqwl_rnserver 424*043036a2SApple OSS Distributions 425*043036a2SApple OSS Distributionskqwl_rnserver: 426*043036a2SApple OSS Distributions $(MIG) $(CFLAGS) \ 427*043036a2SApple OSS Distributions -DKQWORKLOOPS_VIOLATION_SUPPORTED \ 428*043036a2SApple OSS Distributions -user /dev/null \ 429*043036a2SApple OSS Distributions -header $(OBJROOT)/kqwl_rn.h \ 430*043036a2SApple OSS Distributions -sheader $(OBJROOT)/kqwl_rnServer.h \ 431*043036a2SApple OSS Distributions -server $(OBJROOT)/kqwl_rnServer.c \ 432*043036a2SApple OSS Distributions rnserver.defs 433*043036a2SApple OSS Distributionsinstall-kqwl_rnserver: ; 434*043036a2SApple OSS Distributions 435*043036a2SApple OSS Distributionskqworkloop_limits: kqwl_rnserver 436*043036a2SApple OSS Distributionskqworkloop_limits: OTHER_CFLAGS += $(OBJROOT)/kqwl_rnServer.c -I $(OBJROOT) 437*043036a2SApple OSS Distributionskqworkloop_limits: OTHER_LDFLAGS += -ldarwintest_utils -lpthread 438*043036a2SApple OSS Distributionskqworkloop_limits: kqworkloop_limits_client 439*043036a2SApple OSS Distributions 440*043036a2SApple OSS Distributionskqworkloop_limits_client: kqworkloop_limits_client.c 441*043036a2SApple OSS Distributions $(CC) $(DT_CFLAGS) -I $(OBJROOT) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) kqworkloop_limits_client.c -o $(SYMROOT)/kqworkloop_limits_client 442*043036a2SApple OSS Distributions $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@ 443*043036a2SApple OSS Distributions 444*043036a2SApple OSS Distributionsinstall-kqworkloop_limits_client: kqworkloop_limits_client 445*043036a2SApple OSS Distributions mkdir -p $(INSTALLDIR) 446*043036a2SApple OSS Distributions cp $(SYMROOT)/kqworkloop_limits_client $(INSTALLDIR)/ 447*043036a2SApple OSS Distributions 448*043036a2SApple OSS Distributionsipc/task_name_for_pid: CODE_SIGN_ENTITLEMENTS = ipc/task_name_for_pid_entitlement.plist 449*043036a2SApple OSS Distributions 450*043036a2SApple OSS Distributionsipc/mach_msg_transport: CODE_SIGN_ENTITLEMENTS = entitlements/create_conn_port_with_port_array.entitlements 451*043036a2SApple OSS Distributions 452*043036a2SApple OSS Distributionsfd_table_limits: rnserver 453*043036a2SApple OSS Distributionsfd_table_limits: OTHER_CFLAGS += $(OBJROOT)/rnServer.c -I $(OBJROOT) 454*043036a2SApple OSS Distributionsfd_table_limits: OTHER_LDFLAGS += -ldarwintest_utils -lpthread 455*043036a2SApple OSS Distributionsfd_table_limits: fd_table_limits_client 456*043036a2SApple OSS Distributions 457*043036a2SApple OSS Distributionsfd_table_limits_client: fd_table_limits_client.c 458*043036a2SApple OSS Distributions $(CC) $(DT_CFLAGS) -I $(OBJROOT) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) fd_table_limits_client.c -o $(SYMROOT)/fd_table_limits_client 459*043036a2SApple OSS Distributions $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@ 460*043036a2SApple OSS Distributions 461*043036a2SApple OSS Distributionsinstall-fd_table_limits_client: fd_table_limits_client 462*043036a2SApple OSS Distributions mkdir -p $(INSTALLDIR) 463*043036a2SApple OSS Distributions cp $(SYMROOT)/fd_table_limits_client $(INSTALLDIR)/ 464*043036a2SApple OSS Distributions 465*043036a2SApple OSS Distributionsvm_spawn_tool: INVALID_ARCHS = i386 466*043036a2SApple OSS Distributionsvm_spawn_tool: vm_spawn_tool.c 467*043036a2SApple OSS Distributions $(CC) $(DT_CFLAGS) -I $(OBJROOT) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) vm_spawn_tool.c -o $(SYMROOT)/vm_spawn_tool 468*043036a2SApple OSS Distributions 469*043036a2SApple OSS Distributionsinstall-vm_spawn_tool: vm_spawn_tool 470*043036a2SApple OSS Distributions mkdir -p $(INSTALLDIR)/tools 471*043036a2SApple OSS Distributions cp $(SYMROOT)/vm_spawn_tool $(INSTALLDIR)/tools/ 472*043036a2SApple OSS Distributions 473*043036a2SApple OSS DistributionsCUSTOM_TARGETS += ipc/imm_pinned_control_port_crasher 474*043036a2SApple OSS DistributionsCUSTOM_TARGETS += ipc/imm_pinned_control_port_crasher_3P_hardened 475*043036a2SApple OSS Distributions 476*043036a2SApple OSS Distributionsipc/imm_pinned_control_port: excserver_protect 477*043036a2SApple OSS Distributionsipc/imm_pinned_control_port: CODE_SIGN_ENTITLEMENTS = entitlements/imm_pinned_control_port.entitlements 478*043036a2SApple OSS Distributionsipc/imm_pinned_control_port: OTHER_CFLAGS += $(OBJROOT)/excserver_protect.c -I $(OBJROOT) 479*043036a2SApple OSS Distributionsipc/imm_pinned_control_port: OTHER_LDFLAGS += -ldarwintest_utils -lpthread 480*043036a2SApple OSS Distributionsipc/imm_pinned_control_port: ipc/imm_pinned_control_port_crasher ipc/imm_pinned_control_port_crasher_3P_hardened 481*043036a2SApple OSS Distributions 482*043036a2SApple OSS Distributionsipc/imm_pinned_control_port_crasher: ipc/imm_pinned_control_port_crasher.c cs_helpers.c 483*043036a2SApple OSS Distributions mkdir -p $(SYMROOT)/ipc 484*043036a2SApple OSS Distributions $(CC) $(DT_CFLAGS) -I $(OBJROOT) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) -I$(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders \ 485*043036a2SApple OSS Distributions $^ -o $(SYMROOT)/$@ 486*043036a2SApple OSS Distributions $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@ 487*043036a2SApple OSS Distributions 488*043036a2SApple OSS Distributionsipc/imm_pinned_control_port_crasher_3P_hardened: CODE_SIGN_ENTITLEMENTS = entitlements/enhanced-security-binary-entitlements-1.plist 489*043036a2SApple OSS Distributionsipc/imm_pinned_control_port_crasher_3P_hardened: ipc/imm_pinned_control_port_crasher.c cs_helpers.c 490*043036a2SApple OSS Distributions mkdir -p $(SYMROOT)/ipc 491*043036a2SApple OSS Distributions $(CC) $(DT_CFLAGS) -I $(OBJROOT) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) -I$(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders \ 492*043036a2SApple OSS Distributions $^ -o $(SYMROOT)/$@ 493*043036a2SApple OSS Distributions $(CODESIGN) --force --sign - --entitlements $(CODE_SIGN_ENTITLEMENTS) --timestamp=none $(SYMROOT)/$@ 494*043036a2SApple OSS Distributions 495*043036a2SApple OSS Distributionsinstall-ipc/imm_pinned_control_port: ipc/imm_pinned_control_port 496*043036a2SApple OSS Distributions mkdir -p $(INSTALLDIR)/ipc 497*043036a2SApple OSS Distributions cp $(SYMROOT)/$< $(INSTALLDIR)/ipc/ 498*043036a2SApple OSS Distributions 499*043036a2SApple OSS Distributionsinstall-ipc/imm_pinned_control_port_crasher: ipc/imm_pinned_control_port_crasher 500*043036a2SApple OSS Distributions mkdir -p $(INSTALLDIR)/ipc 501*043036a2SApple OSS Distributions cp $(SYMROOT)/$< $(INSTALLDIR)/ipc/ 502*043036a2SApple OSS Distributions 503*043036a2SApple OSS Distributionsinstall-ipc/imm_pinned_control_port_crasher_3P_hardened: ipc/imm_pinned_control_port_crasher_3P_hardened 504*043036a2SApple OSS Distributions mkdir -p $(INSTALLDIR)/ipc 505*043036a2SApple OSS Distributions cp $(SYMROOT)/$< $(INSTALLDIR)/ipc/ 506*043036a2SApple OSS Distributions 507*043036a2SApple OSS Distributions# Allow this test to pull {TASK, THREAD}_KERNEL_PORT via get-movable-control-port 508*043036a2SApple OSS Distributionsipc/imm_pinned_control_port_entitled: CODE_SIGN_ENTITLEMENTS = task_for_pid_entitlement.plist 509*043036a2SApple OSS Distributionsipc/imm_pinned_control_port_entitled: OTHER_LDFLAGS += -ldarwintest_utils -lpthread 510*043036a2SApple OSS Distributions 511*043036a2SApple OSS Distributionsinstall-ipc/imm_pinned_control_port_entitled: ipc/imm_pinned_control_port_entitled 512*043036a2SApple OSS Distributions mkdir -p $(INSTALLDIR)/ipc 513*043036a2SApple OSS Distributions cp $(SYMROOT)/$< $(INSTALLDIR)/ipc/ 514*043036a2SApple OSS Distributions 515*043036a2SApple OSS DistributionsCUSTOM_TARGETS += reply_port_defense_client 516*043036a2SApple OSS DistributionsCUSTOM_TARGETS += reply_port_defense_client_3P_hardened 517*043036a2SApple OSS Distributions 518*043036a2SApple OSS Distributionsreply_port_defense: excserver_protect_state 519*043036a2SApple OSS Distributionsreply_port_defense: OTHER_CFLAGS += $(OBJROOT)/excserver_protect_state.c -I $(OBJROOT) 520*043036a2SApple OSS Distributionsreply_port_defense: OTHER_LDFLAGS += -ldarwintest_utils -lpthread 521*043036a2SApple OSS Distributionsreply_port_defense: CODE_SIGN_ENTITLEMENTS = entitlements/set_exception_port.entitlement 522*043036a2SApple OSS Distributionsreply_port_defense: reply_port_defense_client reply_port_defense_client_3P_hardened 523*043036a2SApple OSS Distributionsreply_port_defense: $(IPC_UTILS) 524*043036a2SApple OSS Distributions 525*043036a2SApple OSS Distributionsreply_port_defense_client: CODE_SIGN_ENTITLEMENTS=exception_tests.entitlements 526*043036a2SApple OSS Distributionsreply_port_defense_client: OTHER_LDFLAGS += -ldarwintest_utils -lpthread 527*043036a2SApple OSS Distributionsreply_port_defense_client: reply_port_defense_client.c cs_helpers.c 528*043036a2SApple OSS Distributions $(CC) $(DT_CFLAGS) -I $(OBJROOT) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) -I$(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders \ 529*043036a2SApple OSS Distributions $^ -o $(SYMROOT)/$@ 530*043036a2SApple OSS Distributions $(CODESIGN) --force --sign - --entitlements $(CODE_SIGN_ENTITLEMENTS) --timestamp=none $(SYMROOT)/$@ 531*043036a2SApple OSS Distributions 532*043036a2SApple OSS Distributionsreply_port_defense_client_3P_hardened: CODE_SIGN_ENTITLEMENTS=entitlements/enhanced-security-binary-entitlements-1.plist 533*043036a2SApple OSS Distributionsreply_port_defense_client_3P_hardened: reply_port_defense_client.c cs_helpers.c 534*043036a2SApple OSS Distributions $(CC) $(DT_CFLAGS) -I $(OBJROOT) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) -I$(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders \ 535*043036a2SApple OSS Distributions $^ -o $(SYMROOT)/$@ 536*043036a2SApple OSS Distributions $(CODESIGN) --force --sign - --entitlements $(CODE_SIGN_ENTITLEMENTS) --timestamp=none $(SYMROOT)/$@ 537*043036a2SApple OSS Distributions 538*043036a2SApple OSS Distributionsinstall-reply_port_defense_client: reply_port_defense_client 539*043036a2SApple OSS Distributions mkdir -p $(INSTALLDIR) 540*043036a2SApple OSS Distributions cp $(SYMROOT)/$< $(INSTALLDIR)/ 541*043036a2SApple OSS Distributions 542*043036a2SApple OSS Distributionsinstall-reply_port_defense_client_3P_hardened: reply_port_defense_client_3P_hardened 543*043036a2SApple OSS Distributions mkdir -p $(INSTALLDIR) 544*043036a2SApple OSS Distributions cp $(SYMROOT)/$< $(INSTALLDIR)/ 545*043036a2SApple OSS Distributions 546*043036a2SApple OSS Distributionskas_info: OTHER_LDFLAGS += -framework CoreSymbolication 547*043036a2SApple OSS Distributionskas_info: CODE_SIGN_ENTITLEMENTS = kernel_symbolication_entitlements.plist 548*043036a2SApple OSS Distributions 549*043036a2SApple OSS Distributionsnet_bounds_safety: OTHER_CFLAGS += -fbounds-safety 550*043036a2SApple OSS Distributions 551*043036a2SApple OSS Distributionsnet_no_bounds_safety: OTHER_CFLAGS += -fno-bounds-safety 552*043036a2SApple OSS Distributionsnet_no_bounds_safety: net_bounds_safety.c 553*043036a2SApple OSS Distributions $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/$@ 554*043036a2SApple OSS DistributionsOTHER_TEST_TARGETS += net_no_bounds_safety 555*043036a2SApple OSS Distributions 556*043036a2SApple OSS Distributionshost_statistics_rate_limiting: cs_helpers.c host_statistics_rate_limiting.c 557*043036a2SApple OSS Distributions 558*043036a2SApple OSS DistributionsEXCLUDED_SOURCES += drop_priv.c xnu_quick_test_helpers.c memorystatus_assertion_helpers.c bpflib.c in_cksum.c test_utils.c inet_transfer.c net_test_lib.c cs_helpers.c vsock_helpers.c 559*043036a2SApple OSS Distributions 560*043036a2SApple OSS Distributionsifneq ($(IOS_TEST_COMPAT),YES) 561*043036a2SApple OSS DistributionsEXCLUDED_SOURCES += jumbo_va_spaces_28530648.c perf_compressor.c vm/ios13extended_footprint.c vm/entitlement_internal_bands.c 562*043036a2SApple OSS Distributionsendif 563*043036a2SApple OSS Distributions 564*043036a2SApple OSS Distributionsperf_compressor: OTHER_LDFLAGS += -ldarwintest_utils 565*043036a2SApple OSS Distributionsperf_compressor: CODE_SIGN_ENTITLEMENTS=./private_entitlement.plist 566*043036a2SApple OSS Distributions 567*043036a2SApple OSS Distributions 568*043036a2SApple OSS Distributionsvm/memorystatus_freeze_test: CODE_SIGN_ENTITLEMENTS=./task_for_pid_entitlement.plist 569*043036a2SApple OSS Distributionsvm/memorystatus_freeze_test: OTHER_LDFLAGS += -ldarwintest_utils 570*043036a2SApple OSS Distributionsvm/memorystatus_freeze_test: memorystatus_assertion_helpers.c test_utils.c vm/memorystatus_freeze_test.c 571*043036a2SApple OSS Distributions $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $^ -o $(SYMROOT)/$@ 572*043036a2SApple OSS Distributions env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none --entitlements $(CODE_SIGN_ENTITLEMENTS) $(SYMROOT)/$@; 573*043036a2SApple OSS Distributions 574*043036a2SApple OSS Distributionsvm/memorystatus_freeze_test_entitled: CODE_SIGN_ENTITLEMENTS=./vm/memorystatus_freeze_test_entitled.plist 575*043036a2SApple OSS Distributionsvm/memorystatus_freeze_test_entitled: OTHER_LDFLAGS += -ldarwintest_utils 576*043036a2SApple OSS Distributionsvm/memorystatus_freeze_test_entitled: test_utils.c vm/memorystatus_freeze_test_entitled.c 577*043036a2SApple OSS Distributions $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $^ -o $(SYMROOT)/$@ 578*043036a2SApple OSS Distributions env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none --entitlements $(CODE_SIGN_ENTITLEMENTS) $(SYMROOT)/$@; 579*043036a2SApple OSS Distributions 580*043036a2SApple OSS Distributionsvm/memorystatus_jetsam_zprint_snapshot: CODE_SIGN_ENTITLEMENTS=./vm/memorystatus_jetsam_zprint_snapshot.entitlements 581*043036a2SApple OSS Distributionsvm/memorystatus_jetsam_zprint_snapshot: OTHER_LDFLAGS += -ldarwintest_utils 582*043036a2SApple OSS Distributions 583*043036a2SApple OSS Distributionsvm/memorystatus_kill_counts: CODE_SIGN_ENTITLEMENTS=./vm/memorystatus_kill_counts.entitlements 584*043036a2SApple OSS Distributionsvm/memorystatus_kill_counts: OTHER_LDFLAGS += -ldarwintest_utils 585*043036a2SApple OSS Distributions 586*043036a2SApple OSS Distributionsvm/neural_footprint: CODE_SIGN_ENTITLEMENTS=./vm/neural_footprint.entitlement 587*043036a2SApple OSS Distributionsvm/neural_footprint: OTHER_CFLAGS += -I $(OBJROOT) 588*043036a2SApple OSS Distributionsvm/neural_footprint: OTHER_LDFLAGS += -ldarwintest_utils 589*043036a2SApple OSS Distributionsvm/neural_footprint: test_utils.c vm/neural_footprint.c ./vm/neural_footprint.entitlement 590*043036a2SApple OSS Distributions $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/$@ 591*043036a2SApple OSS Distributions env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none --entitlements $(CODE_SIGN_ENTITLEMENTS) $(SYMROOT)/$@; 592*043036a2SApple OSS Distributions 593*043036a2SApple OSS Distributionsvm/vm_guard_objects_telemetry: exc_guard_helper.c exc_helpers.c test_utils.c excserver 594*043036a2SApple OSS Distributionsvm/vm_guard_objects_telemetry: CODE_SIGN_ENTITLEMENTS = entitlements/guard_objects-enabled.plist 595*043036a2SApple OSS Distributionsvm/vm_guard_objects_telemetry: OTHER_CFLAGS += $(OBJROOT)/excserver.c -I $(OBJROOT) 596*043036a2SApple OSS Distributionsvm/vm_guard_objects_telemetry: OTHER_LDFLAGS += -ldarwintest_utils 597*043036a2SApple OSS Distributionsvm/vm_guard_objects_telemetry: vm/vm_guard_objects_telemetry.c 598*043036a2SApple OSS Distributions $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $^ -o $(SYMROOT)/$@ 599*043036a2SApple OSS Distributions env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none --entitlements $(CODE_SIGN_ENTITLEMENTS) $(SYMROOT)/$@; 600*043036a2SApple OSS Distributions 601*043036a2SApple OSS Distributionsmemorystatus_is_assertion: OTHER_LDFLAGS += -ldarwintest_utils 602*043036a2SApple OSS Distributionsmemorystatus_is_assertion: OTHER_CFLAGS += memorystatus_assertion_helpers.c 603*043036a2SApple OSS Distributions 604*043036a2SApple OSS Distributionsmemorystatus_vm_map_fork: OTHER_CFLAGS += test_utils.c 605*043036a2SApple OSS Distributionsmemorystatus_vm_map_fork: OTHER_LDFLAGS += -ldarwintest_utils 606*043036a2SApple OSS Distributions 607*043036a2SApple OSS Distributionsshared_cache_tests: OTHER_LDFLAGS += -ldarwintest_utils 608*043036a2SApple OSS Distributions 609*043036a2SApple OSS Distributionsifneq ($(wildcard $(SDKROOT)/System/Library/PrivateFrameworks/Tightbeam.framework/Headers/tightbeam.h),) 610*043036a2SApple OSS Distributionsstackshot_tests: OTHER_LDFLAGS += -framework Tightbeam 611*043036a2SApple OSS Distributionsstackshot_tests: OTHER_CFLAGS += -I$(OBJROOT) 612*043036a2SApple OSS Distributionsstackshot_tests: OTHER_CFLAGS += $(TIGHTBEAM_MODULE_IMPL_PATH) 613*043036a2SApple OSS Distributionsstackshot_tests.m: $(TIGHTBEAM_MODULE_HEADERS) 614*043036a2SApple OSS Distributionsendif 615*043036a2SApple OSS Distributionsstackshot_tests: ./stackshot-entitlements.plist stackshot_tests.m 616*043036a2SApple OSS Distributionsstackshot_tests: CODE_SIGN_ENTITLEMENTS=./stackshot-entitlements.plist 617*043036a2SApple OSS Distributionsstackshot_tests: OTHER_CFLAGS += -Wno-objc-messaging-id test_utils.c 618*043036a2SApple OSS Distributionsstackshot_tests: OTHER_LDFLAGS += -lkdd -lz -ldarwintest_utils -framework Foundation -framework IOKit 619*043036a2SApple OSS Distributions 620*043036a2SApple OSS Distributionsstackshot_accuracy: ./stackshot-entitlements.plist 621*043036a2SApple OSS Distributionsstackshot_accuracy: CODE_SIGN_ENTITLEMENTS=./stackshot-entitlements.plist 622*043036a2SApple OSS Distributionsstackshot_accuracy: OTHER_CFLAGS += -ldarwintest_utils -Wno-objc-messaging-id 623*043036a2SApple OSS Distributionsstackshot_accuracy: OTHER_LDFLAGS += -lkdd -ldarwintest_utils -framework Foundation 624*043036a2SApple OSS Distributionsstackshot_accuracy: INVALID_ARCHS = i386 625*043036a2SApple OSS Distributions 626*043036a2SApple OSS Distributionsstackshot_spawn_exit_stress: ./stackshot-entitlements.plist 627*043036a2SApple OSS Distributionsstackshot_spawn_exit_stress: CODE_SIGN_ENTITLEMENTS=./stackshot-entitlements.plist 628*043036a2SApple OSS Distributions 629*043036a2SApple OSS Distributionsifeq ($(PLATFORM),MacOSX) 630*043036a2SApple OSS DistributionsCUSTOM_TARGETS += stackshot_translated_child 631*043036a2SApple OSS Distributions 632*043036a2SApple OSS Distributionsstackshot_translated_child: INVALID_ARCHS = arm64 arm64e 633*043036a2SApple OSS Distributionsstackshot_translated_child: stackshot_translated_child.c 634*043036a2SApple OSS Distributions $(CC) $(DT_CFLAGS) -I $(OBJROOT) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) stackshot_translated_child.c -o $(SYMROOT)/stackshot_translated_child 635*043036a2SApple OSS Distributions 636*043036a2SApple OSS Distributionsinstall-stackshot_translated_child: stackshot_translated_child 637*043036a2SApple OSS Distributions mkdir -p $(INSTALLDIR) 638*043036a2SApple OSS Distributions cp $(SYMROOT)/stackshot_translated_child $(INSTALLDIR)/ 639*043036a2SApple OSS Distributionselse 640*043036a2SApple OSS DistributionsEXCLUDED_SOURCES += stackshot_translated_child.c 641*043036a2SApple OSS Distributionsendif 642*043036a2SApple OSS Distributions 643*043036a2SApple OSS Distributionsmicrostackshot_tests: ./stackshot-entitlements.plist 644*043036a2SApple OSS Distributionsmicrostackshot_tests: CODE_SIGN_ENTITLEMENTS=./stackshot-entitlements.plist 645*043036a2SApple OSS Distributionsmicrostackshot_tests: OTHER_LDFLAGS = -ldarwintest_utils -framework ktrace -framework kperf -framework CoreFoundation 646*043036a2SApple OSS Distributions 647*043036a2SApple OSS Distributionsmemorystatus_zone_test: ./stackshot-entitlements.plist 648*043036a2SApple OSS Distributionsmemorystatus_zone_test: CODE_SIGN_ENTITLEMENTS=./stackshot-entitlements.plist 649*043036a2SApple OSS Distributionsmemorystatus_zone_test: OTHER_CFLAGS += -isystem $(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders 650*043036a2SApple OSS Distributionsmemorystatus_zone_test: OTHER_LDFLAGS += -framework ktrace 651*043036a2SApple OSS Distributionsmemorystatus_zone_test: OTHER_LDFLAGS += -ldarwintest_utils 652*043036a2SApple OSS Distributions 653*043036a2SApple OSS Distributionsmemcmp_zero: OTHER_CFLAGS += ../osfmk/arm64/memcmp_zero.s 654*043036a2SApple OSS Distributions 655*043036a2SApple OSS Distributionstext_corruption: OTHER_LDFLAGS += -ldarwintest_utils 656*043036a2SApple OSS DistributionsCUSTOM_TARGETS += text_corruption_helper 657*043036a2SApple OSS Distributions 658*043036a2SApple OSS Distributionstext_corruption_helper: 659*043036a2SApple OSS Distributions $(CC) $(LDFLAGS) $(CFLAGS) text_corruption_helper.c -lm -o $(SYMROOT)/$@; 660*043036a2SApple OSS Distributions env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@; 661*043036a2SApple OSS Distributions 662*043036a2SApple OSS Distributionsinstall-text_corruption_helper: text_corruption_helper 663*043036a2SApple OSS Distributions mkdir -p $(INSTALLDIR) 664*043036a2SApple OSS Distributions cp $(SYMROOT)/text_corruption_helper $(INSTALLDIR)/ 665*043036a2SApple OSS Distributions 666*043036a2SApple OSS Distributionscodesigntests: CODE_SIGN_ENTITLEMENTS=codesigntests-entitlements.plist 667*043036a2SApple OSS Distributionscodesigntests: OTHER_CFLAGS += -DTESTNAME=codesigntests 668*043036a2SApple OSS Distributions# Adding a custom target and build/install rules since CODE_SIGN_ENTITLEMENTS 669*043036a2SApple OSS Distributions# does not take in arguments, and we need to sign this test using a sha256T 670*043036a2SApple OSS Distributions# digest 671*043036a2SApple OSS Distributions 672*043036a2SApple OSS DistributionsOTHER_TEST_TARGETS += codesigntests_sha256t 673*043036a2SApple OSS Distributionscodesigntests_sha256t: OTHER_CFLAGS += -DTESTNAME=codesigntests_sha256t 674*043036a2SApple OSS Distributions 675*043036a2SApple OSS Distributionscodesigntests_sha256t: codesigntests.c 676*043036a2SApple OSS Distributions $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(DT_LDFLAGS) $(LDFLAGS) $(CFLAGS) codesigntests.c -o $(SYMROOT)/$@; 677*043036a2SApple OSS Distributions env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --digest=sha256T -s - --entitlements codesigntests-entitlements.plist $(SYMROOT)/$@; 678*043036a2SApple OSS Distributionsinstall-codesigntests_sha256t: codesigntests_sha256t 679*043036a2SApple OSS Distributions mkdir -p $(INSTALLDIR) 680*043036a2SApple OSS Distributions cp $(SYMROOT)/codesigntests_sha256t $(INSTALLDIR)/ 681*043036a2SApple OSS Distributions 682*043036a2SApple OSS Distributions 683*043036a2SApple OSS Distributionsecc_test: OTHER_LDFLAGS += -ldarwintest_utils 684*043036a2SApple OSS DistributionsCUSTOM_TARGETS += ecc_test_helper 685*043036a2SApple OSS Distributions 686*043036a2SApple OSS Distributionsecc_test_helper: 687*043036a2SApple OSS Distributions $(CC) $(LDFLAGS) $(CFLAGS) ecc_test_helper.c -lm -o $(SYMROOT)/$@; 688*043036a2SApple OSS Distributions env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@; 689*043036a2SApple OSS Distributions 690*043036a2SApple OSS Distributionsinstall-ecc_test_helper: ecc_test_helper 691*043036a2SApple OSS Distributions mkdir -p $(INSTALLDIR) 692*043036a2SApple OSS Distributions cp $(SYMROOT)/ecc_test_helper $(INSTALLDIR)/ 693*043036a2SApple OSS Distributions 694*043036a2SApple OSS Distributionsvm/test_vm_no_pager: excserver 695*043036a2SApple OSS Distributionsvm/test_vm_no_pager: OTHER_LDFLAGS += -ldarwintest_utils -lpthread -lkdd -framework Foundation 696*043036a2SApple OSS Distributionsvm/test_vm_no_pager: OTHER_CFLAGS += -I$(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders $(OBJROOT)/excserver.c -I$(OBJROOT) 697*043036a2SApple OSS Distributionsvm/test_vm_no_pager: vm/test_vm_no_pager_helper 698*043036a2SApple OSS Distributionsvm/test_vm_no_pager: CODE_SIGN_ENTITLEMENTS = entitlements/set_exception_port.entitlement 699*043036a2SApple OSS DistributionsCUSTOM_TARGETS += vm/test_vm_no_pager_helper 700*043036a2SApple OSS Distributions 701*043036a2SApple OSS Distributionsvm/test_vm_no_pager_helper: vm/test_vm_no_pager_helper.c 702*043036a2SApple OSS Distributions mkdir -p $(SYMROOT)/vm 703*043036a2SApple OSS Distributions $(CC) $(CFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $^ -lm -o $(SYMROOT)/$@; 704*043036a2SApple OSS Distributions env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@; 705*043036a2SApple OSS Distributions 706*043036a2SApple OSS Distributionsinstall-vm/test_vm_no_pager_helper: vm/test_vm_no_pager_helper 707*043036a2SApple OSS Distributions mkdir -p $(INSTALLDIR)/vm 708*043036a2SApple OSS Distributions cp $(SYMROOT)/vm/test_vm_no_pager_helper $(INSTALLDIR)/vm/ 709*043036a2SApple OSS Distributions 710*043036a2SApple OSS Distributions 711*043036a2SApple OSS Distributionskevent_qos: OTHER_CFLAGS += -Wno-unused-macros 712*043036a2SApple OSS Distributionskevent_qos: OTHER_CFLAGS += -I $(OBJROOT)/ 713*043036a2SApple OSS Distributions 714*043036a2SApple OSS Distributionstest_knote_use_after_free: OTHER_CFLAGS += -Wno-unused-macros 715*043036a2SApple OSS Distributionstest_knote_use_after_free: OTHER_LDFLAGS += -ldarwintest_utils -lpthread 716*043036a2SApple OSS Distributions 717*043036a2SApple OSS Distributionsmach_get_times: OTHER_LDFLAGS += -ldarwintest_utils 718*043036a2SApple OSS Distributions 719*043036a2SApple OSS Distributionsmonotonic_core: ./stackshot-entitlements.plist 720*043036a2SApple OSS Distributionsmonotonic_core: CODE_SIGN_ENTITLEMENTS=./stackshot-entitlements.plist 721*043036a2SApple OSS Distributionsmonotonic_core: OTHER_LDFLAGS += -framework ktrace 722*043036a2SApple OSS Distributions 723*043036a2SApple OSS Distributionsperf_exit: perf_exit_proc 724*043036a2SApple OSS Distributionsperf_exit: ./stackshot-entitlements.plist 725*043036a2SApple OSS Distributionsperf_exit: CODE_SIGN_ENTITLEMENTS=./stackshot-entitlements.plist 726*043036a2SApple OSS Distributionsperf_exit: OTHER_LDFLAGS = -framework ktrace -ldarwintest_utils 727*043036a2SApple OSS Distributionsperf_exit: CODE_SIGN_ENTITLEMENTS=./private_entitlement.plist 728*043036a2SApple OSS Distributions 729*043036a2SApple OSS Distributionsipc/mach_exc_port_substitute: excserver 730*043036a2SApple OSS Distributionsipc/mach_exc_port_substitute: OTHER_CFLAGS += $(OBJROOT)/excserver.c -I $(OBJROOT) 731*043036a2SApple OSS Distributionsipc/mach_exc_port_substitute: CODE_SIGN_ENTITLEMENTS = ipc/mach_exc_port_substitute.plist 732*043036a2SApple OSS Distributions 733*043036a2SApple OSS DistributionsCUSTOM_TARGETS += prioritize_process_launch_helper 734*043036a2SApple OSS Distributionsprioritize_process_launch: prioritize_process_launch_helper 735*043036a2SApple OSS Distributions 736*043036a2SApple OSS Distributionsprioritize_process_launch_helper: prioritize_process_launch_helper.c 737*043036a2SApple OSS Distributions $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) prioritize_process_launch_helper.c -o $(SYMROOT)/prioritize_process_launch_helper 738*043036a2SApple OSS Distributions echo $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@; \ 739*043036a2SApple OSS Distributions env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@; 740*043036a2SApple OSS Distributions 741*043036a2SApple OSS Distributionsinstall-prioritize_process_launch_helper: prioritize_process_launch_helper 742*043036a2SApple OSS Distributions mkdir -p $(INSTALLDIR) 743*043036a2SApple OSS Distributions cp $(SYMROOT)/prioritize_process_launch_helper $(INSTALLDIR)/ 744*043036a2SApple OSS Distributions 745*043036a2SApple OSS Distributions 746*043036a2SApple OSS Distributionsperf_spawn_fork: CODE_SIGN_ENTITLEMENTS=./private_entitlement.plist 747*043036a2SApple OSS Distributions 748*043036a2SApple OSS Distributionsmach_exception_reply: OTHER_CFLAGS += -Wno-cast-align 749*043036a2SApple OSS Distributionsmach_exception_reply: CODE_SIGN_ENTITLEMENTS = entitlements/set_exception_port.entitlement 750*043036a2SApple OSS Distributions 751*043036a2SApple OSS Distributionsos_thread_self_restrict: os_thread_self_restrict.c os_thread_self_restrict-entitlements.plist test_utils.c 752*043036a2SApple OSS Distributionsos_thread_self_restrict: CODE_SIGN_ENTITLEMENTS=os_thread_self_restrict-entitlements.plist 753*043036a2SApple OSS Distributionsos_thread_self_restrict: OTHER_LDFLAGS += -ldarwintest_utils -sectcreate __TEXT __info_plist os_thread_self_restrict-identifier.plist 754*043036a2SApple OSS Distributions 755*043036a2SApple OSS Distributions# Temporarily disabled. See rdar://121952316 756*043036a2SApple OSS DistributionsEXCLUDED_SOURCES += os_thread_self_restrict.c 757*043036a2SApple OSS Distributions 758*043036a2SApple OSS Distributionssubsystem_root_path: subsystem_root_path.c subsystem_root_path-entitlements.plist 759*043036a2SApple OSS Distributionssubsystem_root_path: CODE_SIGN_ENTITLEMENTS=subsystem_root_path-entitlements.plist 760*043036a2SApple OSS Distributions 761*043036a2SApple OSS DistributionsEXCLUDED_SOURCES += $(wildcard bounded_ptr_src/*.cpp) 762*043036a2SApple OSS Distributionsbounded_ptr: OTHER_CXXFLAGS += -Werror=implicit-int-conversion -Werror=shorten-64-to-32 -I$(SRCROOT)/../libkern -std=c++17 763*043036a2SApple OSS Distributionsbounded_ptr: $(wildcard bounded_ptr_src/*.cpp) bounded_ptr.cpp 764*043036a2SApple OSS Distributions 765*043036a2SApple OSS DistributionsEXCLUDED_SOURCES += bounded_ptr_03.cpp 766*043036a2SApple OSS Distributionsbounded_ptr_03: OTHER_CXXFLAGS += -Werror=implicit-int-conversion -Werror=shorten-64-to-32 -I$(SRCROOT)/../libkern -std=c++03 $(DT_LDFLAGS) 767*043036a2SApple OSS Distributionsbounded_ptr_03: bounded_ptr_03.cpp 768*043036a2SApple OSS Distributions 769*043036a2SApple OSS DistributionsEXCLUDED_SOURCES += $(wildcard bounded_array_src/*.cpp) 770*043036a2SApple OSS Distributionsbounded_array: OTHER_CXXFLAGS += -Werror=implicit-int-conversion -Werror=shorten-64-to-32 -I$(SRCROOT)/../libkern -std=c++17 771*043036a2SApple OSS Distributionsbounded_array: $(wildcard bounded_array_src/*.cpp) bounded_array.cpp 772*043036a2SApple OSS Distributions 773*043036a2SApple OSS DistributionsEXCLUDED_SOURCES += $(wildcard bounded_array_ref_src/*.cpp) 774*043036a2SApple OSS Distributionsbounded_array_ref: OTHER_CXXFLAGS += -Werror=implicit-int-conversion -Werror=shorten-64-to-32 -I$(SRCROOT)/../libkern -std=c++17 775*043036a2SApple OSS Distributionsbounded_array_ref: $(wildcard bounded_array_ref_src/*.cpp) bounded_array_ref.cpp 776*043036a2SApple OSS Distributions 777*043036a2SApple OSS DistributionsEXCLUDED_SOURCES += $(wildcard intrusive_shared_ptr_src/*.cpp) 778*043036a2SApple OSS Distributionsintrusive_shared_ptr: OTHER_CXXFLAGS += -Werror=implicit-int-conversion -Werror=shorten-64-to-32 -I$(SRCROOT)/../libkern -std=c++17 779*043036a2SApple OSS Distributionsintrusive_shared_ptr: $(wildcard intrusive_shared_ptr_src/*.cpp) intrusive_shared_ptr.cpp 780*043036a2SApple OSS Distributions 781*043036a2SApple OSS DistributionsEXCLUDED_SOURCES += $(wildcard safe_allocation_src/*.cpp) 782*043036a2SApple OSS Distributionssafe_allocation: OTHER_CXXFLAGS += -Werror=implicit-int-conversion -Werror=shorten-64-to-32 -I$(SRCROOT)/../libkern -std=c++17 783*043036a2SApple OSS Distributionssafe_allocation: $(wildcard safe_allocation_src/*.cpp) safe_allocation.cpp 784*043036a2SApple OSS Distributions 785*043036a2SApple OSS DistributionsEXCLUDED_SOURCES += $(wildcard cxx_safe_buffers_src/*.cpp) 786*043036a2SApple OSS Distributionscxx_safe_buffers: OTHER_CXXFLAGS += -Werror=unsafe-buffer-usage -I$(SRCROOT)/../libkern -std=c++20 787*043036a2SApple OSS Distributionscxx_safe_buffers: $(wildcard cxx_safe_buffers_src/*.cpp) cxx_safe_buffers.cpp 788*043036a2SApple OSS Distributions 789*043036a2SApple OSS DistributionsEXCLUDED_SOURCES += osptr_compat.cpp 790*043036a2SApple OSS Distributionsosptr_98: OTHER_CXXFLAGS += -I$(SRCROOT)/../libkern -std=c++98 -DOSPTR_STD="98" 791*043036a2SApple OSS Distributionsosptr_98: osptr_compat.cpp 792*043036a2SApple OSS Distributions $(CXX) $(DT_CXXFLAGS) $(OTHER_CXXFLAGS) $(CXXFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/$@ 793*043036a2SApple OSS Distributionsosptr_11: OTHER_CXXFLAGS += -I$(SRCROOT)/../libkern -std=c++11 -DOSPTR_STD="11" 794*043036a2SApple OSS Distributionsosptr_11: osptr_compat.cpp 795*043036a2SApple OSS Distributions $(CXX) $(DT_CXXFLAGS) $(OTHER_CXXFLAGS) $(CXXFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/$@ 796*043036a2SApple OSS Distributionsosptr_14: OTHER_CXXFLAGS += -I$(SRCROOT)/../libkern -std=c++14 -DOSPTR_STD="14" 797*043036a2SApple OSS Distributionsosptr_14: osptr_compat.cpp 798*043036a2SApple OSS Distributions $(CXX) $(DT_CXXFLAGS) $(OTHER_CXXFLAGS) $(CXXFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/$@ 799*043036a2SApple OSS Distributionsosptr_17: OTHER_CXXFLAGS += -I$(SRCROOT)/../libkern -std=c++17 -DOSPTR_STD="17" 800*043036a2SApple OSS Distributionsosptr_17: osptr_compat.cpp 801*043036a2SApple OSS Distributions $(CXX) $(DT_CXXFLAGS) $(OTHER_CXXFLAGS) $(CXXFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/$@ 802*043036a2SApple OSS Distributions 803*043036a2SApple OSS Distributionspriority_queue: OTHER_CXXFLAGS += -std=c++17 804*043036a2SApple OSS Distributionsqueue: OTHER_CFLAGS += -I$(SRCROOT)/../osfmk 805*043036a2SApple OSS Distributions 806*043036a2SApple OSS Distributionsvm/zalloc: OTHER_LDFLAGS += -ldarwintest_utils 807*043036a2SApple OSS Distributionsvm/zalloc_buddy: OTHER_CFLAGS += -Wno-format-pedantic 808*043036a2SApple OSS Distributions 809*043036a2SApple OSS Distributionsos_refcnt: OTHER_CFLAGS += -I$(SRCROOT)/../libkern/ -Wno-gcc-compat -Wno-undef -O3 -flto -ldarwintest_utils 810*043036a2SApple OSS Distributions 811*043036a2SApple OSS Distributionskernel_inspection: CODE_SIGN_ENTITLEMENTS = ./task_for_pid_entitlement.plist 812*043036a2SApple OSS Distributionskernel_inspection: OTHER_CFLAGS += -DENTITLED=1 813*043036a2SApple OSS Distributions 814*043036a2SApple OSS Distributionsturnstile_multihop: OTHER_CFLAGS += -Wno-unused-macros 815*043036a2SApple OSS Distributionsturnstile_multihop: OTHER_CFLAGS += -I $(OBJROOT)/ 816*043036a2SApple OSS Distributions 817*043036a2SApple OSS DistributionsCUSTOM_TARGETS += perf_exit_proc 818*043036a2SApple OSS Distributions 819*043036a2SApple OSS Distributionsperf_exit_proc: 820*043036a2SApple OSS Distributions $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) perf_exit_proc.c -o $(SYMROOT)/perf_exit_proc 821*043036a2SApple OSS Distributions 822*043036a2SApple OSS Distributionsinstall-perf_exit_proc: perf_exit_proc 823*043036a2SApple OSS Distributions mkdir -p $(INSTALLDIR) 824*043036a2SApple OSS Distributions cp $(SYMROOT)/perf_exit_proc $(INSTALLDIR)/ 825*043036a2SApple OSS Distributions 826*043036a2SApple OSS Distributions# Stackshot 827*043036a2SApple OSS Distributions 828*043036a2SApple OSS Distributions 829*043036a2SApple OSS Distributionsstackshot_idle_25570396: ./stackshot-entitlements.plist 830*043036a2SApple OSS Distributionsstackshot_idle_25570396: CODE_SIGN_ENTITLEMENTS=./stackshot-entitlements.plist 831*043036a2SApple OSS Distributionsstackshot_idle_25570396: OTHER_LDFLAGS += -lkdd -framework Foundation 832*043036a2SApple OSS Distributionsstackshot_idle_25570396: OTHER_LDFLAGS += -lkdd -framework Foundation 833*043036a2SApple OSS Distributions 834*043036a2SApple OSS Distributionsstackshot_block_owner_14362384: ./stackshot-entitlements.plist 835*043036a2SApple OSS Distributionsstackshot_block_owner_14362384: CODE_SIGN_ENTITLEMENTS=./stackshot-entitlements.plist 836*043036a2SApple OSS Distributionsstackshot_block_owner_14362384: OTHER_LDFLAGS += -framework Foundation -lpthread -lkdd 837*043036a2SApple OSS Distributionsifeq ($(PLATFORM),MacOSX) 838*043036a2SApple OSS Distributionsstackshot_block_owner_14362384: OTHER_LDFLAGS += -lpcre 839*043036a2SApple OSS Distributionsendif 840*043036a2SApple OSS Distributions 841*043036a2SApple OSS Distributionsall: $(DSTROOT)/usr/local/bin/kcdata 842*043036a2SApple OSS Distributions 843*043036a2SApple OSS Distributions$(DSTROOT)/usr/local/bin/kcdata: $(SRCROOT)/../tools/lldbmacros/kcdata.py 844*043036a2SApple OSS Distributions mkdir -p $(dir $@) 845*043036a2SApple OSS Distributions cp $< $@ 846*043036a2SApple OSS Distributions chmod a+x $@ 847*043036a2SApple OSS Distributions 848*043036a2SApple OSS Distributionsxnu_quick_test: OTHER_CFLAGS += xnu_quick_test_helpers.c 849*043036a2SApple OSS Distributions 850*043036a2SApple OSS DistributionsCUSTOM_TARGETS += vm_set_max_addr_helper 851*043036a2SApple OSS Distributions 852*043036a2SApple OSS Distributionsvm_set_max_addr_helper: vm_set_max_addr_helper.c 853*043036a2SApple OSS Distributions $(CC) $(OTHER_CFLAGS) $(CFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) vm_set_max_addr_helper.c -o $(SYMROOT)/vm_set_max_addr_helper; \ 854*043036a2SApple OSS Distributions echo $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@; \ 855*043036a2SApple OSS Distributions env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@; 856*043036a2SApple OSS Distributions 857*043036a2SApple OSS Distributionsinstall-vm_set_max_addr_helper: vm_set_max_addr_helper 858*043036a2SApple OSS Distributions mkdir -p $(INSTALLDIR) 859*043036a2SApple OSS Distributions cp $(SYMROOT)/vm_set_max_addr_helper $(INSTALLDIR)/ 860*043036a2SApple OSS Distributions 861*043036a2SApple OSS DistributionsCUSTOM_TARGETS += subsystem_root_path_helper_entitled 862*043036a2SApple OSS DistributionsCUSTOM_TARGETS += subsystem_root_path_helper 863*043036a2SApple OSS Distributions 864*043036a2SApple OSS Distributionssubsystem_root_path_helper_entitled: subsystem_root_path_helper.c subsystem_root_path-entitlements.plist 865*043036a2SApple OSS Distributions $(CC) $(OTHER_CFLAGS) $(CFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) subsystem_root_path_helper.c -o $(SYMROOT)/subsystem_root_path_helper_entitled; \ 866*043036a2SApple OSS Distributions echo $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@; \ 867*043036a2SApple OSS Distributions env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none --entitlements subsystem_root_path-entitlements.plist $(SYMROOT)/$@; 868*043036a2SApple OSS Distributions 869*043036a2SApple OSS Distributionsinstall-subsystem_root_path_helper_entitled: subsystem_root_path_helper_entitled 870*043036a2SApple OSS Distributions mkdir -p $(INSTALLDIR) 871*043036a2SApple OSS Distributions cp $(SYMROOT)/subsystem_root_path_helper_entitled $(INSTALLDIR)/ 872*043036a2SApple OSS Distributions 873*043036a2SApple OSS Distributionssubsystem_root_path_helper: subsystem_root_path_helper.c 874*043036a2SApple OSS Distributions $(CC) $(OTHER_CFLAGS) $(CFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) subsystem_root_path_helper.c -o $(SYMROOT)/subsystem_root_path_helper; \ 875*043036a2SApple OSS Distributions echo $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@; \ 876*043036a2SApple OSS Distributions env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@; 877*043036a2SApple OSS Distributions 878*043036a2SApple OSS Distributionsinstall-subsystem_root_path_helper: subsystem_root_path_helper 879*043036a2SApple OSS Distributions mkdir -p $(INSTALLDIR) 880*043036a2SApple OSS Distributions cp $(SYMROOT)/subsystem_root_path_helper $(INSTALLDIR)/ 881*043036a2SApple OSS Distributions 882*043036a2SApple OSS DistributionsCUSTOM_TARGETS += vm_test_code_signing_helper 883*043036a2SApple OSS Distributions 884*043036a2SApple OSS Distributionsvm_test_code_signing_helper: vm_test_code_signing_helper.c 885*043036a2SApple OSS Distributions $(CC) $(OTHER_CFLAGS) $(CFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) vm_test_code_signing_helper.c -o $(SYMROOT)/vm_test_code_signing_helper; \ 886*043036a2SApple OSS Distributions echo $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@; \ 887*043036a2SApple OSS Distributions env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@; 888*043036a2SApple OSS Distributions 889*043036a2SApple OSS Distributionsinstall-vm_test_code_signing_helper: vm_test_code_signing_helper 890*043036a2SApple OSS Distributions mkdir -p $(INSTALLDIR) 891*043036a2SApple OSS Distributions cp $(SYMROOT)/vm_test_code_signing_helper $(INSTALLDIR)/ 892*043036a2SApple OSS Distributions 893*043036a2SApple OSS Distributionsvm_test_code_signing: OTHER_LDFLAGS += -ldarwintest_utils 894*043036a2SApple OSS Distributions 895*043036a2SApple OSS DistributionsINCLUDED_TEST_SOURCE_DIRS += ipc rm workq 896*043036a2SApple OSS Distributions 897*043036a2SApple OSS Distributionsinclude vm/Makefile 898*043036a2SApple OSS Distributions 899*043036a2SApple OSS Distributionsvm/vm_stress: OTHER_CXXFLAGS += -std=c++20 900*043036a2SApple OSS Distributionsvm/vm_stress: OTHER_LDFLAGS += -ldarwintest_utils 901*043036a2SApple OSS Distributionsvm/vm_stress: INVALID_ARCHS = x86_64h 902*043036a2SApple OSS Distributions 903*043036a2SApple OSS Distributions 904*043036a2SApple OSS Distributionsbig_map_test: CODE_SIGN_ENTITLEMENTS = ./big_map_test_entitlement.plist 905*043036a2SApple OSS Distributions 906*043036a2SApple OSS Distributionstask_info_28439149: CODE_SIGN_ENTITLEMENTS = ./task_for_pid_entitlement.plist 907*043036a2SApple OSS Distributions 908*043036a2SApple OSS Distributionsipc/ipc_read_inspect: CODE_SIGN_ENTITLEMENTS = ./task_for_pid_entitlement.plist 909*043036a2SApple OSS Distributions 910*043036a2SApple OSS Distributionsipc/ipc_thread_ports_race: CODE_SIGN_ENTITLEMENTS = ./task_for_pid_entitlement.plist 911*043036a2SApple OSS Distributionsipc/ipc_thread_ports_race: OTHER_LDFLAGS += -ldarwintest_utils 912*043036a2SApple OSS Distributions 913*043036a2SApple OSS Distributionsrm/pthread_setugid: OTHER_LDFLAGS += -ldarwintest_utils 914*043036a2SApple OSS Distributionsrm/coalition_info_resource_usage: OTHER_LDFLAGS += -ldarwintest_utils 915*043036a2SApple OSS Distributions 916*043036a2SApple OSS Distributionsproc_info: recount/recount_test_utils.c 917*043036a2SApple OSS Distributionsproc_info: CODE_SIGN_ENTITLEMENTS = ./task_for_pid_entitlement.plist 918*043036a2SApple OSS Distributionsproc_info: OTHER_LDFLAGS += -ldarwintest_utils 919*043036a2SApple OSS Distributions 920*043036a2SApple OSS Distributionsproc_info_list_kthreads: CODE_SIGN_ENTITLEMENTS = ./proc_info_list_kthreads.entitlements 921*043036a2SApple OSS Distributions 922*043036a2SApple OSS Distributionsproc_info_44873309: CODE_SIGN_ENTITLEMENTS = ./proc_info_44873309.entitlements 923*043036a2SApple OSS Distributions 924*043036a2SApple OSS Distributionsdisk_mount_conditioner: disk_mount_conditioner* 925*043036a2SApple OSS Distributionsdisk_mount_conditioner: CODE_SIGN_ENTITLEMENTS=./disk_mount_conditioner-entitlements.plist 926*043036a2SApple OSS Distributionsdisk_mount_conditioner: OTHER_LDFLAGS += -ldarwintest_utils -framework Foundation 927*043036a2SApple OSS Distributions 928*043036a2SApple OSS Distributionsdisk_mount_conditioner: OTHER_TEST_TARGETS += disk_mount_conditioner_unentitled 929*043036a2SApple OSS Distributionsdisk_mount_conditioner_unentitled: OTHER_CFLAGS += -DTEST_UNENTITLED 930*043036a2SApple OSS Distributionsdisk_mount_conditioner_unentitled: OTHER_LDFLAGS += -ldarwintest_utils -framework Foundation 931*043036a2SApple OSS Distributionsdisk_mount_conditioner_unentitled: disk_mount_conditioner.m 932*043036a2SApple OSS Distributions $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/$@ 933*043036a2SApple OSS Distributions 934*043036a2SApple OSS Distributionswork_interval_test: CODE_SIGN_ENTITLEMENTS = work_interval_test.entitlements 935*043036a2SApple OSS Distributionswork_interval_test: OTHER_CFLAGS += -DENTITLED=1 936*043036a2SApple OSS Distributions 937*043036a2SApple OSS Distributionswork_interval_data_test: CODE_SIGN_ENTITLEMENTS = work_interval_test.entitlements 938*043036a2SApple OSS Distributionswork_interval_data_test: OTHER_CFLAGS += -DENTITLED=1 939*043036a2SApple OSS Distributionswork_interval_data_test: OTHER_LDFLAGS += -lpthread 940*043036a2SApple OSS Distributions 941*043036a2SApple OSS Distributionsgame_mode: CODE_SIGN_ENTITLEMENTS = game_mode.entitlements 942*043036a2SApple OSS Distributionscarplay_mode: CODE_SIGN_ENTITLEMENTS = carplay_mode.entitlements 943*043036a2SApple OSS Distributionsrunaway_mitigation: CODE_SIGN_ENTITLEMENTS = runaway_mitigation.entitlements 944*043036a2SApple OSS Distributions 945*043036a2SApple OSS Distributionscoalition_policy: CODE_SIGN_ENTITLEMENTS = coalition_policy.entitlements 946*043036a2SApple OSS Distributionscoalition_policy: OTHER_LDFLAGS += $(SCHED_UTILS_FLAGS) 947*043036a2SApple OSS Distributionscoalition_policy: $(SCHED_UTILS) 948*043036a2SApple OSS Distributions 949*043036a2SApple OSS Distributionssettimeofday_29193041: OTHER_CFLAGS += drop_priv.c 950*043036a2SApple OSS Distributions 951*043036a2SApple OSS Distributionssettimeofday_29193041_entitled: CODE_SIGN_ENTITLEMENTS = settimeofday_29193041.entitlements 952*043036a2SApple OSS Distributionssettimeofday_29193041_entitled: OTHER_CFLAGS += drop_priv.c 953*043036a2SApple OSS Distributions 954*043036a2SApple OSS Distributionsthread_group_set_32261625: ./stackshot-entitlements.plist 955*043036a2SApple OSS Distributionsthread_group_set_32261625: CODE_SIGN_ENTITLEMENTS=./stackshot-entitlements.plist 956*043036a2SApple OSS Distributionsthread_group_set_32261625: OTHER_LDFLAGS = -framework ktrace 957*043036a2SApple OSS Distributions 958*043036a2SApple OSS Distributionstask_info: CODE_SIGN_ENTITLEMENTS = task_for_pid_entitlement.plist 959*043036a2SApple OSS Distributionstask_info: OTHER_CFLAGS += test_utils.c 960*043036a2SApple OSS Distributionstask_info: OTHER_LDFLAGS += -ldarwintest_utils 961*043036a2SApple OSS Distributions 962*043036a2SApple OSS Distributionsextract_right_soft_fail: CODE_SIGN_ENTITLEMENTS = task_for_pid_entitlement.plist 963*043036a2SApple OSS Distributions 964*043036a2SApple OSS Distributionsifneq ($(IOS_TEST_COMPAT),YES) 965*043036a2SApple OSS Distributions EXCLUDED_SOURCES += task_vm_info_decompressions.c 966*043036a2SApple OSS Distributionsendif 967*043036a2SApple OSS Distributions 968*043036a2SApple OSS Distributionsifeq ($(PLATFORM),MacOSX) 969*043036a2SApple OSS Distributions EXCLUDED_SOURCES += vm/compression_sweep.c 970*043036a2SApple OSS Distributionsendif 971*043036a2SApple OSS Distributions 972*043036a2SApple OSS Distributionsunp_sock_release: CODE_SIGN_ENTITLEMENTS = unp_sock_release-entitlements.plist 973*043036a2SApple OSS Distributions 974*043036a2SApple OSS Distributionsaccept_race: in_cksum.c net_test_lib.c 975*043036a2SApple OSS Distributionsaccept_race: CODE_SIGN_ENTITLEMENTS = network_entitlements.plist 976*043036a2SApple OSS Distributions 977*043036a2SApple OSS Distributionsflow_div_doubleconnect_55917185: in_cksum.c net_test_lib.c 978*043036a2SApple OSS Distributionsflow_div_doubleconnect_55917185: CODE_SIGN_ENTITLEMENTS = network_entitlements.plist 979*043036a2SApple OSS Distributions 980*043036a2SApple OSS Distributionsbpf_write: bpflib.c in_cksum.c net_test_lib.c 981*043036a2SApple OSS Distributionsbpf_write: OTHER_LDFLAGS += -ldarwintest_utils 982*043036a2SApple OSS Distributions 983*043036a2SApple OSS Distributionsbpf_write_batch: bpflib.c in_cksum.c net_test_lib.c 984*043036a2SApple OSS Distributionsbpf_write_batch: OTHER_LDFLAGS += -ldarwintest_utils 985*043036a2SApple OSS Distributions 986*043036a2SApple OSS Distributionsudp_disconnect: in_cksum.c net_test_lib.c 987*043036a2SApple OSS Distributionsudp_disconnect: CODE_SIGN_ENTITLEMENTS = network_entitlements.plist 988*043036a2SApple OSS Distributions 989*043036a2SApple OSS Distributionsudp_bind_connect: in_cksum.c net_test_lib.c 990*043036a2SApple OSS Distributionsudp_bind_connect: CODE_SIGN_ENTITLEMENTS = network_entitlements.plist 991*043036a2SApple OSS Distributions 992*043036a2SApple OSS Distributionstcp_bind_connect: CODE_SIGN_ENTITLEMENTS = network_entitlements.plist 993*043036a2SApple OSS Distributionstcp_send_implied_connect: CODE_SIGN_ENTITLEMENTS = network_entitlements.plist 994*043036a2SApple OSS Distributions 995*043036a2SApple OSS Distributionstcp_cache_test: CODE_SIGN_ENTITLEMENTS = tcp_cache_entitlements.plist 996*043036a2SApple OSS Distributions 997*043036a2SApple OSS Distributionssocket_bind_35243417: in_cksum.c net_test_lib.c 998*043036a2SApple OSS Distributionssocket_bind_35243417: CODE_SIGN_ENTITLEMENTS = network_entitlements.plist 999*043036a2SApple OSS Distributions 1000*043036a2SApple OSS Distributionssocket_bind_35685803: in_cksum.c net_test_lib.c 1001*043036a2SApple OSS Distributionssocket_bind_35685803: CODE_SIGN_ENTITLEMENTS = network_entitlements.plist 1002*043036a2SApple OSS Distributions 1003*043036a2SApple OSS Distributionstcp_input_outputopts_uaf_56155583: in_cksum.c net_test_lib.c 1004*043036a2SApple OSS Distributionstcp_input_outputopts_uaf_56155583: CODE_SIGN_ENTITLEMENTS = network_entitlements.plist 1005*043036a2SApple OSS Distributions 1006*043036a2SApple OSS Distributionsunp_connect_thread_uaf: in_cksum.c net_test_lib.c 1007*043036a2SApple OSS Distributionsunp_connect_thread_uaf: CODE_SIGN_ENTITLEMENTS = network_entitlements.plist 1008*043036a2SApple OSS Distributions 1009*043036a2SApple OSS Distributionsicmp_fragmetned_payload: CODE_SIGN_ENTITLEMENTS = network_entitlements.plist 1010*043036a2SApple OSS Distributionstcp_invalid_address: OTHER_CFLAGS += -Wno-int-conversion 1011*043036a2SApple OSS Distributionstcp_invalid_address: CODE_SIGN_ENTITLEMENTS = network_entitlements.plist 1012*043036a2SApple OSS Distributions 1013*043036a2SApple OSS Distributionsnet_tuntests: CODE_SIGN_ENTITLEMENTS = network_entitlements.plist 1014*043036a2SApple OSS Distributions 1015*043036a2SApple OSS Distributionsnet_bridge: inet_transfer.c bpflib.c in_cksum.c net_test_lib.c 1016*043036a2SApple OSS Distributionsnet_bridge: OTHER_LDFLAGS += -ldarwintest_utils 1017*043036a2SApple OSS Distributionsnet_bridge: CODE_SIGN_ENTITLEMENTS = network_entitlements.plist 1018*043036a2SApple OSS Distributions 1019*043036a2SApple OSS Distributionsnet_vlan: inet_transfer.c bpflib.c in_cksum.c net_test_lib.c 1020*043036a2SApple OSS Distributionsnet_vlan: OTHER_LDFLAGS += -ldarwintest_utils 1021*043036a2SApple OSS Distributionsnet_vlan: CODE_SIGN_ENTITLEMENTS = network_entitlements.plist 1022*043036a2SApple OSS Distributions 1023*043036a2SApple OSS Distributionsnet_bond: inet_transfer.c bpflib.c in_cksum.c net_test_lib.c 1024*043036a2SApple OSS Distributionsnet_bond: OTHER_LDFLAGS += -ldarwintest_utils 1025*043036a2SApple OSS Distributionsnet_bond: CODE_SIGN_ENTITLEMENTS = network_entitlements.plist 1026*043036a2SApple OSS Distributions 1027*043036a2SApple OSS Distributionsmcast_ssm: in_cksum.c net_test_lib.c 1028*043036a2SApple OSS Distributionsmcast_ssm: OTHER_LDFLAGS += -ldarwintest_utils 1029*043036a2SApple OSS Distributions 1030*043036a2SApple OSS Distributionsif_generation_id: net_test_lib.c in_cksum.c 1031*043036a2SApple OSS Distributionsif_generation_id: OTHER_LDFLAGS += -ldarwintest_utils 1032*043036a2SApple OSS Distributions 1033*043036a2SApple OSS Distributionsinet6_addr_mode: net_test_lib.c in_cksum.c 1034*043036a2SApple OSS Distributionsinet6_addr_mode: OTHER_LDFLAGS += -ldarwintest_utils 1035*043036a2SApple OSS Distributions 1036*043036a2SApple OSS Distributionsbpf_direction: bpflib.c 1037*043036a2SApple OSS Distributionsbpf_direction: OTHER_LDFLAGS += -ldarwintest_utils 1038*043036a2SApple OSS Distributionsbpf_direction: CODE_SIGN_ENTITLEMENTS = network_entitlements.plist 1039*043036a2SApple OSS Distributions 1040*043036a2SApple OSS Distributionsbpf_timestamp: bpflib.c 1041*043036a2SApple OSS Distributionsbpf_timestamp: OTHER_LDFLAGS += -ldarwintest_utils 1042*043036a2SApple OSS Distributionsbpf_timestamp: CODE_SIGN_ENTITLEMENTS = network_entitlements.plist 1043*043036a2SApple OSS Distributions 1044*043036a2SApple OSS Distributionsipv6_bind_race: in_cksum.c net_test_lib.c 1045*043036a2SApple OSS Distributionsipv6_bind_race: CODE_SIGN_ENTITLEMENTS = network_entitlements.plist 1046*043036a2SApple OSS Distributions 1047*043036a2SApple OSS Distributionsmcast_group_race_82820812: in_cksum.c net_test_lib.c 1048*043036a2SApple OSS Distributionsmcast_group_race_82820812: CODE_SIGN_ENTITLEMENTS = network_entitlements.plist 1049*043036a2SApple OSS Distributions 1050*043036a2SApple OSS Distributionsso_bindtodevice: CODE_SIGN_ENTITLEMENTS = network_entitlements.plist 1051*043036a2SApple OSS Distributions 1052*043036a2SApple OSS Distributionsrecv_link_addr_type: net_test_lib.c in_cksum.c 1053*043036a2SApple OSS Distributionsrecv_link_addr_type: CODE_SIGN_ENTITLEMENTS = network_entitlements.plist 1054*043036a2SApple OSS Distributions 1055*043036a2SApple OSS Distributionsip_pktinfo: net_test_lib.c in_cksum.c 1056*043036a2SApple OSS Distributionsip_pktinfo: CODE_SIGN_ENTITLEMENTS = network_entitlements.plist 1057*043036a2SApple OSS Distributions 1058*043036a2SApple OSS Distributionsv4mappedv6_dontfrag: net_test_lib.c in_cksum.c 1059*043036a2SApple OSS Distributionsv4mappedv6_dontfrag: OTHER_LDFLAGS += -ldarwintest_utils 1060*043036a2SApple OSS Distributionsv4mappedv6_dontfrag: CODE_SIGN_ENTITLEMENTS = network_entitlements.plist 1061*043036a2SApple OSS Distributions 1062*043036a2SApple OSS Distributionsnet_siocdifaddr: net_test_lib.c in_cksum.c 1063*043036a2SApple OSS Distributionsnet_siocdifaddr: OTHER_LDFLAGS += -ldarwintest_utils 1064*043036a2SApple OSS Distributions 1065*043036a2SApple OSS Distributionsvsock: vsock_helpers.c 1066*043036a2SApple OSS Distributionsvsock_entitled: vsock_helpers.c 1067*043036a2SApple OSS Distributionsvsock_entitled: CODE_SIGN_ENTITLEMENTS = vsock_entitlements.plist 1068*043036a2SApple OSS Distributions 1069*043036a2SApple OSS Distributionssendmsg_test: CODE_SIGN_ENTITLEMENTS = network_entitlements.plist 1070*043036a2SApple OSS Distributions 1071*043036a2SApple OSS Distributionsnetwork_elevated_logging: CODE_SIGN_ENTITLEMENTS = entitlements/network_elevated_logging.entitlements 1072*043036a2SApple OSS Distributions 1073*043036a2SApple OSS Distributionsrvi_doublefree: CODE_SIGN_ENTITLEMENTS = network_entitlements.plist 1074*043036a2SApple OSS Distributions 1075*043036a2SApple OSS Distributionsipc/platform_restrictions_entitlements: CODE_SIGN_ENTITLEMENTS = entitlements/platform-restrictions.plist 1076*043036a2SApple OSS Distributions 1077*043036a2SApple OSS Distributionsipc/tpro_entitlements: CODE_SIGN_ENTITLEMENTS = entitlements/tpro.plist 1078*043036a2SApple OSS Distributions 1079*043036a2SApple OSS DistributionsEXCLUDED_SOURCES += ipc/control_port_movability_common.c 1080*043036a2SApple OSS Distributions 1081*043036a2SApple OSS Distributionsipc/entitled_control_port_movability: CODE_SIGN_ENTITLEMENTS = entitlements/entitled_control_port_movability.entitlements 1082*043036a2SApple OSS Distributionsipc/entitled_control_port_movability: ipc/control_port_movability_common.c 1083*043036a2SApple OSS Distributionsipc/entitled_control_port_movability: $(IPC_UTILS) 1084*043036a2SApple OSS Distributions 1085*043036a2SApple OSS Distributions 1086*043036a2SApple OSS Distributionsifeq ($(PLATFORM),MacOSX) 1087*043036a2SApple OSS Distributions 1088*043036a2SApple OSS Distributionsipc/rosetta_control_port_movability: INVALID_ARCHS = arm64 arm64e arm 1089*043036a2SApple OSS Distributionsipc/rosetta_control_port_movability: ipc/control_port_movability_common.c $(IPC_UTILS) 1090*043036a2SApple OSS Distributions 1091*043036a2SApple OSS Distributionselse 1092*043036a2SApple OSS DistributionsEXCLUDED_SOURCES += ipc/rosetta_control_port_movability.c 1093*043036a2SApple OSS Distributionsendif 1094*043036a2SApple OSS Distributions 1095*043036a2SApple OSS Distributionsipc/guard_objects_disabled_entitlement: CODE_SIGN_ENTITLEMENTS = entitlements/guard-objects-disabled.plist 1096*043036a2SApple OSS Distributions 1097*043036a2SApple OSS Distributionsipc/guard_objects_enabled_entitlement: CODE_SIGN_ENTITLEMENTS = entitlements/hardened-proc.entitlements 1098*043036a2SApple OSS Distributions 1099*043036a2SApple OSS Distributionsipc/hardened_process_version_entitlement: CODE_SIGN_ENTITLEMENTS = entitlements/hardened-proc-version.entitlements 1100*043036a2SApple OSS Distributions 1101*043036a2SApple OSS DistributionsCUSTOM_TARGETS += posix_spawn_archpref_helper 1102*043036a2SApple OSS Distributions 1103*043036a2SApple OSS Distributionsposix_spawn_archpref_helper: posix_spawn_archpref_helper.c 1104*043036a2SApple OSS Distributions $(CC) $(LDFLAGS) $(CFLAGS) posix_spawn_archpref_helper.c -o $(SYMROOT)/$@; 1105*043036a2SApple OSS Distributions env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@; 1106*043036a2SApple OSS Distributions 1107*043036a2SApple OSS Distributionsinstall-posix_spawn_archpref_helper: posix_spawn_archpref_helper 1108*043036a2SApple OSS Distributions mkdir -p $(INSTALLDIR) 1109*043036a2SApple OSS Distributions cp $(SYMROOT)/posix_spawn_archpref_helper $(INSTALLDIR)/ 1110*043036a2SApple OSS Distributions 1111*043036a2SApple OSS DistributionsCUSTOM_TARGETS += posix_spawn_alt_rosetta_helper 1112*043036a2SApple OSS Distributions 1113*043036a2SApple OSS Distributionsposix_spawn_alt_rosetta_helper: posix_spawn_alt_rosetta_helper.c 1114*043036a2SApple OSS Distributions $(CC) $(LDFLAGS) $(CFLAGS) posix_spawn_alt_rosetta_helper.c -o $(SYMROOT)/$@; 1115*043036a2SApple OSS Distributions env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@; 1116*043036a2SApple OSS Distributions 1117*043036a2SApple OSS Distributionsinstall-posix_spawn_alt_rosetta_helper: posix_spawn_alt_rosetta_helper 1118*043036a2SApple OSS Distributions mkdir -p $(INSTALLDIR) 1119*043036a2SApple OSS Distributions cp $(SYMROOT)/posix_spawn_alt_rosetta_helper $(INSTALLDIR)/ 1120*043036a2SApple OSS Distributions 1121*043036a2SApple OSS DistributionsMIG:=SDKROOT=$(SDKROOT) $(shell xcrun -sdk "$(TARGETSDK)" -find mig) 1122*043036a2SApple OSS Distributions 1123*043036a2SApple OSS DistributionsCUSTOM_TARGETS += excserver 1124*043036a2SApple OSS Distributions 1125*043036a2SApple OSS Distributionsexcserver: 1126*043036a2SApple OSS Distributions $(MIG) $(CFLAGS) \ 1127*043036a2SApple OSS Distributions -sheader $(OBJROOT)/excserver.h \ 1128*043036a2SApple OSS Distributions -server $(OBJROOT)/excserver.c \ 1129*043036a2SApple OSS Distributions -header /dev/null -user /dev/null \ 1130*043036a2SApple OSS Distributions excserver.defs 1131*043036a2SApple OSS Distributionsinstall-excserver: ; 1132*043036a2SApple OSS Distributions 1133*043036a2SApple OSS Distributionsexcserver_protect: 1134*043036a2SApple OSS Distributions $(MIG) $(CFLAGS) \ 1135*043036a2SApple OSS Distributions -DMACH_EXC_SERVER_TASKIDTOKEN \ 1136*043036a2SApple OSS Distributions -sheader $(OBJROOT)/excserver_protect.h \ 1137*043036a2SApple OSS Distributions -server $(OBJROOT)/excserver_protect.c \ 1138*043036a2SApple OSS Distributions -header /dev/null -user /dev/null \ 1139*043036a2SApple OSS Distributions excserver_protect.defs 1140*043036a2SApple OSS Distributionsinstall-excserver_protect: ; 1141*043036a2SApple OSS Distributions 1142*043036a2SApple OSS Distributionsexcserver_protect_state: 1143*043036a2SApple OSS Distributions $(MIG) $(CFLAGS) \ 1144*043036a2SApple OSS Distributions -DMACH_EXC_SERVER_TASKIDTOKEN_STATE \ 1145*043036a2SApple OSS Distributions -DMACH_EXC_SERVER_TASKIDTOKEN \ 1146*043036a2SApple OSS Distributions -sheader $(OBJROOT)/excserver_protect_state.h \ 1147*043036a2SApple OSS Distributions -server $(OBJROOT)/excserver_protect_state.c \ 1148*043036a2SApple OSS Distributions -header /dev/null -user /dev/null \ 1149*043036a2SApple OSS Distributions excserver_protect.defs 1150*043036a2SApple OSS Distributionsinstall-excserver_protect_state: ; 1151*043036a2SApple OSS Distributions 1152*043036a2SApple OSS DistributionsEXCLUDED_SOURCES += exc_helpers.c 1153*043036a2SApple OSS Distributions 1154*043036a2SApple OSS DistributionsCUSTOM_TARGETS += notifyserver 1155*043036a2SApple OSS Distributions 1156*043036a2SApple OSS Distributionsnotifyserver: 1157*043036a2SApple OSS Distributions $(MIG) $(CFLAGS) \ 1158*043036a2SApple OSS Distributions -user /dev/null \ 1159*043036a2SApple OSS Distributions -header $(OBJROOT)/notify.h \ 1160*043036a2SApple OSS Distributions -sheader $(OBJROOT)/notifyServer.h \ 1161*043036a2SApple OSS Distributions -server $(OBJROOT)/notifyServer.c \ 1162*043036a2SApple OSS Distributions notifyserver.defs 1163*043036a2SApple OSS Distributionsinstall-notifyserver: ; 1164*043036a2SApple OSS Distributions 1165*043036a2SApple OSS DistributionsCUSTOM_TARGETS += rnserver 1166*043036a2SApple OSS Distributions 1167*043036a2SApple OSS Distributionsrnserver: 1168*043036a2SApple OSS Distributions $(MIG) $(CFLAGS) \ 1169*043036a2SApple OSS Distributions -user /dev/null \ 1170*043036a2SApple OSS Distributions -header $(OBJROOT)/rn.h \ 1171*043036a2SApple OSS Distributions -sheader $(OBJROOT)/rnServer.h \ 1172*043036a2SApple OSS Distributions -server $(OBJROOT)/rnServer.c \ 1173*043036a2SApple OSS Distributions rnserver.defs 1174*043036a2SApple OSS Distributionsinstall-rnserver: ; 1175*043036a2SApple OSS Distributions 1176*043036a2SApple OSS DistributionsSKYWALK_COMMON_FILES := \ 1177*043036a2SApple OSS Distributions skywalk/skywalk_test_common.c \ 1178*043036a2SApple OSS Distributions skywalk/skywalk_test_utils.c 1179*043036a2SApple OSS DistributionsSKYWALK_TEST_FILES := \ 1180*043036a2SApple OSS Distributions skywalk/skywalk_test_driver.c \ 1181*043036a2SApple OSS Distributions skywalk/skt_simple.c \ 1182*043036a2SApple OSS Distributions skywalk/skt_features.c \ 1183*043036a2SApple OSS Distributions skywalk/skt_oneslot.c \ 1184*043036a2SApple OSS Distributions skywalk/skt_shutdown.c \ 1185*043036a2SApple OSS Distributions skywalk/skt_shutdown2.c \ 1186*043036a2SApple OSS Distributions skywalk/skt_nslots.c \ 1187*043036a2SApple OSS Distributions skywalk/skt_closecfd.c \ 1188*043036a2SApple OSS Distributions skywalk/skt_closenfd.c \ 1189*043036a2SApple OSS Distributions skywalk/skt_badring.c \ 1190*043036a2SApple OSS Distributions skywalk/skt_kqueue.c \ 1191*043036a2SApple OSS Distributions skywalk/skt_mangle.c \ 1192*043036a2SApple OSS Distributions skywalk/skt_features.c \ 1193*043036a2SApple OSS Distributions skywalk/skt_ringid.c \ 1194*043036a2SApple OSS Distributions skywalk/skt_closekq.c \ 1195*043036a2SApple OSS Distributions skywalk/skt_writemem.c \ 1196*043036a2SApple OSS Distributions skywalk/skt_debug_verify.c \ 1197*043036a2SApple OSS Distributions skywalk/skt_utun27302538.c \ 1198*043036a2SApple OSS Distributions skywalk/skt_utunleak.c \ 1199*043036a2SApple OSS Distributions skywalk/skt_utunloop.c \ 1200*043036a2SApple OSS Distributions skywalk/skt_flowswitch_ns_reserve.c \ 1201*043036a2SApple OSS Distributions skywalk/skt_netifcompat.c \ 1202*043036a2SApple OSS Distributions skywalk/skt_fswloop.c \ 1203*043036a2SApple OSS Distributions skywalk/skt_teardown.c \ 1204*043036a2SApple OSS Distributions skywalk/skt_bind.c \ 1205*043036a2SApple OSS Distributions skywalk/skt_fsw29301703.c \ 1206*043036a2SApple OSS Distributions skywalk/skt_fswbinds.c \ 1207*043036a2SApple OSS Distributions skywalk/skt_manyflows.c \ 1208*043036a2SApple OSS Distributions skywalk/skt_pllupipe.c \ 1209*043036a2SApple OSS Distributions skywalk/skt_fullupipe.c \ 1210*043036a2SApple OSS Distributions skywalk/skt_listener.c \ 1211*043036a2SApple OSS Distributions skywalk/skt_copy_cksum.c \ 1212*043036a2SApple OSS Distributions skywalk/skt_reass.c \ 1213*043036a2SApple OSS Distributions skywalk/skt_memory.c \ 1214*043036a2SApple OSS Distributions skywalk/skt_flow.c \ 1215*043036a2SApple OSS Distributions skywalk/skt_flowlookup.c \ 1216*043036a2SApple OSS Distributions skywalk/skt_libcuckoo.c \ 1217*043036a2SApple OSS Distributions skywalk/skt_restricted_port.c \ 1218*043036a2SApple OSS Distributions skywalk/skt_steering.c 1219*043036a2SApple OSS DistributionsSKYWALK_MPTEST_FILES := \ 1220*043036a2SApple OSS Distributions skywalk/skywalk_mptests.c \ 1221*043036a2SApple OSS Distributions skywalk/skywalk_mptest_driver.c \ 1222*043036a2SApple OSS Distributions skywalk/skt_mpsimple.c \ 1223*043036a2SApple OSS Distributions skywalk/skt_mpprotons.c \ 1224*043036a2SApple OSS Distributions skywalk/skt_xfer.c \ 1225*043036a2SApple OSS Distributions skywalk/skt_netifdirect.c \ 1226*043036a2SApple OSS Distributions skywalk/skt_filter.c 1227*043036a2SApple OSS DistributionsEXCLUDED_SOURCES += $(SKYWALK_COMMON_FILES) $(SKYWALK_TEST_FILES) $(SKYWALK_MPTEST_FILES) 1228*043036a2SApple OSS Distributions 1229*043036a2SApple OSS Distributionsskywalk_tests: excserver 1230*043036a2SApple OSS Distributionsskywalk_tests: OTHER_CFLAGS += $(OBJROOT)/excserver.c -I $(OBJROOT) 1231*043036a2SApple OSS Distributionsskywalk_tests: CODE_SIGN_ENTITLEMENTS = skywalk_test.entitlements 1232*043036a2SApple OSS Distributionsskywalk_tests: $(SKYWALK_COMMON_FILES) $(SKYWALK_TEST_FILES) $(SKYWALK_MPTEST_FILES) $(SDKROOT)/usr/local/lib/libCrashReporterClient.a 1233*043036a2SApple OSS Distributions 1234*043036a2SApple OSS DistributionsEXCLUDED_SOURCES += arm_matrix_sme.c 1235*043036a2SApple OSS Distributions 1236*043036a2SApple OSS Distributionsarm_matrix: INVALID_ARCHS = $(filter-out arm64%,$(ARCH_CONFIGS)) 1237*043036a2SApple OSS Distributionsarm_matrix: excserver exc_helpers.c arm_matrix_sme.c 1238*043036a2SApple OSS Distributionsarm_matrix: OTHER_CFLAGS += $(OBJROOT)/excserver.c -I $(OBJROOT) -Wno-language-extension-token -Wno-c++98-compat -mcpu=firestorm+nofp+sme2 1239*043036a2SApple OSS Distributionsarm_matrix: CODE_SIGN_ENTITLEMENTS = arm_matrix.entitlements 1240*043036a2SApple OSS Distributions 1241*043036a2SApple OSS DistributionsMTE_CFLAGS = -march=armv8.5a+memtag -Wno-declaration-after-statement -Wno-format-pedantic -Wno-language-extension-token 1242*043036a2SApple OSS Distributions 1243*043036a2SApple OSS Distributionsarm_mte: arm_mte_spawn_client_with_hardened_process_entitlement arm_mte_spawn_client_without_hardened_process_entitlement arm_mte_utilities.c 1244*043036a2SApple OSS Distributionsarm_mte: INVALID_ARCHS = $(filter-out arm64%,$(ARCH_CONFIGS)) 1245*043036a2SApple OSS Distributionsarm_mte: OTHER_CFLAGS += $(MTE_CFLAGS) 1246*043036a2SApple OSS Distributionsarm_mte: OTHER_LDFLAGS += -ldarwintest_utils 1247*043036a2SApple OSS Distributionsarm_mte: CODE_SIGN_ENTITLEMENTS = arm_mte.entitlements 1248*043036a2SApple OSS Distributions 1249*043036a2SApple OSS Distributionsproc_core_name_mte: proc_core_name_mte.c 1250*043036a2SApple OSS Distributionsproc_core_name_mte: INVALID_ARCHS = $(filter-out arm64%,$(ARCH_CONFIGS)) 1251*043036a2SApple OSS Distributionsproc_core_name_mte: OTHER_CFLAGS += $(MTE_CFLAGS) 1252*043036a2SApple OSS Distributionsproc_core_name_mte: OTHER_LDFLAGS += -ldarwintest_utils 1253*043036a2SApple OSS Distributionsproc_core_name_mte: CODE_SIGN_ENTITLEMENTS = arm_mte.entitlements 1254*043036a2SApple OSS Distributions 1255*043036a2SApple OSS Distributions 1256*043036a2SApple OSS Distributionsarm_mte_compress: arm_mte_utilities.c 1257*043036a2SApple OSS Distributionsarm_mte_compress: INVALID_ARCHS = $(filter-out arm64%,$(ARCH_CONFIGS)) 1258*043036a2SApple OSS Distributionsarm_mte_compress: OTHER_CFLAGS += $(MTE_CFLAGS) 1259*043036a2SApple OSS Distributionsarm_mte_compress: CODE_SIGN_ENTITLEMENTS = arm_mte.entitlements 1260*043036a2SApple OSS Distributions 1261*043036a2SApple OSS Distributionsarm_mte_unentitled: arm_mte_utilities.c arm_mte_debugger_helper 1262*043036a2SApple OSS Distributionsarm_mte_unentitled: INVALID_ARCHS = $(filter-out arm64%,$(ARCH_CONFIGS)) 1263*043036a2SApple OSS Distributionsarm_mte_unentitled: OTHER_CFLAGS += $(MTE_CFLAGS) 1264*043036a2SApple OSS Distributions 1265*043036a2SApple OSS Distributionsarm_mte_stress: arm_mte_utilities.c 1266*043036a2SApple OSS Distributionsarm_mte_stress: INVALID_ARCHS = $(filter-out arm64%,$(ARCH_CONFIGS)) 1267*043036a2SApple OSS Distributionsarm_mte_stress: OTHER_CFLAGS += $(MTE_CFLAGS) 1268*043036a2SApple OSS Distributionsarm_mte_stress: OTHER_LDFLAGS += -ldarwintest_utils 1269*043036a2SApple OSS Distributionsarm_mte_stress: CODE_SIGN_ENTITLEMENTS = arm_mte.entitlements 1270*043036a2SApple OSS Distributions 1271*043036a2SApple OSS DistributionsEXCLUDED_SOURCES += arm_mte_debugger_helper.c 1272*043036a2SApple OSS DistributionsCUSTOM_TARGETS += arm_mte_debugger_helper 1273*043036a2SApple OSS Distributionsarm_mte_debugger_helper: INVALID_ARCHS = $(filter-out arm64%,$(ARCH_CONFIGS)) 1274*043036a2SApple OSS Distributionsarm_mte_debugger_helper: OTHER_CFLAGS += -march=armv8.5a+memtag 1275*043036a2SApple OSS Distributionsarm_mte_debugger_helper: CODE_SIGN_ENTITLEMENTS = arm_mte.entitlements 1276*043036a2SApple OSS Distributionsarm_mte_debugger_helper: arm_mte_debugger_helper.c 1277*043036a2SApple OSS Distributions $(CC) $(DT_CFLAGS) -I $(OBJROOT) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) -I$(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders \ 1278*043036a2SApple OSS Distributions $^ -o $(SYMROOT)/$@ 1279*043036a2SApple OSS Distributions $(CODESIGN) -f -s- --entitlements $(SRCROOT)/$(CODE_SIGN_ENTITLEMENTS) $(SYMROOT)/$@ 1280*043036a2SApple OSS Distributions 1281*043036a2SApple OSS Distributionsinstall-arm_mte_debugger_helper: arm_mte_debugger_helper 1282*043036a2SApple OSS Distributions mkdir -p $(INSTALLDIR) 1283*043036a2SApple OSS Distributions cp $(SYMROOT)/$< $(INSTALLDIR)/ 1284*043036a2SApple OSS Distributions 1285*043036a2SApple OSS Distributionsarm_mte_mach_msg: arm_mte_utilities.c 1286*043036a2SApple OSS Distributionsarm_mte_mach_msg: INVALID_ARCHS = $(filter-out arm64%,$(ARCH_CONFIGS)) 1287*043036a2SApple OSS Distributionsarm_mte_mach_msg: OTHER_CFLAGS += $(MTE_CFLAGS) 1288*043036a2SApple OSS Distributionsarm_mte_mach_msg: OTHER_LDFLAGS += -ldarwintest_utils 1289*043036a2SApple OSS Distributions 1290*043036a2SApple OSS Distributionsarm_mte_knobs_policies: arm_mte_utilities.c 1291*043036a2SApple OSS Distributionsarm_mte_knobs_policies: arm_mte_spawn_client_with_top_level_hardened_proc_entitlement_and_in_amfi_opt_out 1292*043036a2SApple OSS Distributionsarm_mte_knobs_policies: INVALID_ARCHS = $(filter-out arm64%,$(ARCH_CONFIGS)) 1293*043036a2SApple OSS Distributionsarm_mte_knobs_policies: OTHER_CFLAGS += -march=armv8.5a+memtag -Wno-declaration-after-statement -Wno-format-pedantic -Wno-language-extension-token -Wno-bad-function-cast 1294*043036a2SApple OSS Distributionsarm_mte_knobs_policies: OTHER_LDFLAGS += -ldarwintest_utils 1295*043036a2SApple OSS Distributionsarm_mte_knobs_policies: CODE_SIGN_ENTITLEMENTS = arm_mte.entitlements 1296*043036a2SApple OSS Distributions 1297*043036a2SApple OSS Distributionsarm_mte_launchd: arm_mte_launchd.c 1298*043036a2SApple OSS Distributionsarm_mte_launchd: INVALID_ARCHS = $(filter-out arm64%,$(ARCH_CONFIGS)) 1299*043036a2SApple OSS Distributionsarm_mte_launchd: OTHER_CFLAGS += -march=armv8.5a+memtag -Wno-declaration-after-statement -Wno-format-pedantic -Wno-language-extension-token 1300*043036a2SApple OSS Distributionsarm_mte_launchd: OTHER_LDFLAGS += -ldarwintest_utils 1301*043036a2SApple OSS Distributionsarm_mte_launchd: CODE_SIGN_ENTITLEMENTS = arm_mte.entitlements 1302*043036a2SApple OSS Distributions 1303*043036a2SApple OSS Distributionsarm_mte_spawn_policies: arm_mte_utilities.c 1304*043036a2SApple OSS Distributionsarm_mte_spawn_policies: arm_mte_spawn_client_without_hardened_process_entitlement 1305*043036a2SApple OSS Distributionsarm_mte_spawn_policies: arm_mte_spawn_client_with_hardened_process_entitlement 1306*043036a2SApple OSS Distributionsarm_mte_spawn_policies: arm_mte_spawn_client_with_top_level_hardened_proc_entitlement_and_in_amfi_opt_out 1307*043036a2SApple OSS Distributionsarm_mte_spawn_policies: arm_mte_driverkit_standin 1308*043036a2SApple OSS Distributionsarm_mte_spawn_policies: arm_mte_spawn_client_with_invalid_entitlement_setting 1309*043036a2SApple OSS Distributionsarm_mte_spawn_policies: INVALID_ARCHS = $(filter-out arm64%,$(ARCH_CONFIGS)) 1310*043036a2SApple OSS Distributionsarm_mte_spawn_policies: OTHER_CFLAGS += $(MTE_CFLAGS) 1311*043036a2SApple OSS Distributions 1312*043036a2SApple OSS DistributionsEXCLUDED_SOURCES += arm_mte_spawn_policies_helper.c 1313*043036a2SApple OSS DistributionsEXCLUDED_SOURCES += arm_mte_utilities.c 1314*043036a2SApple OSS Distributions 1315*043036a2SApple OSS DistributionsCUSTOM_TARGETS += arm_mte_spawn_client_without_hardened_process_entitlement 1316*043036a2SApple OSS Distributionsarm_mte_spawn_client_without_hardened_process_entitlement: INVALID_ARCHS = $(filter-out arm64%,$(ARCH_CONFIGS)) 1317*043036a2SApple OSS Distributionsarm_mte_spawn_client_without_hardened_process_entitlement: OTHER_CFLAGS += -march=armv8.5a+memtag 1318*043036a2SApple OSS Distributionsarm_mte_spawn_client_without_hardened_process_entitlement: arm_mte_spawn_policies_helper.c arm_mte_utilities.c 1319*043036a2SApple OSS Distributions $(CC) $(DT_CFLAGS) -I $(OBJROOT) $(MTE_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) -I$(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders \ 1320*043036a2SApple OSS Distributions $^ -o $(SYMROOT)/$@ 1321*043036a2SApple OSS Distributions $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@ 1322*043036a2SApple OSS Distributions 1323*043036a2SApple OSS DistributionsCUSTOM_TARGETS += arm_mte_spawn_client_with_hardened_process_entitlement 1324*043036a2SApple OSS Distributionsarm_mte_spawn_client_with_hardened_process_entitlement: INVALID_ARCHS = $(filter-out arm64%,$(ARCH_CONFIGS)) 1325*043036a2SApple OSS Distributionsarm_mte_spawn_client_with_hardened_process_entitlement: OTHER_CFLAGS += -march=armv8.5a+memtag 1326*043036a2SApple OSS Distributionsarm_mte_spawn_client_with_hardened_process_entitlement: arm_mte_spawn_policies_helper.c arm_mte_utilities.c 1327*043036a2SApple OSS Distributions $(CC) $(DT_CFLAGS) -I $(OBJROOT) $(MTE_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) -I$(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders \ 1328*043036a2SApple OSS Distributions $^ -o $(SYMROOT)/$@ 1329*043036a2SApple OSS Distributions $(CODESIGN) -f -s- --entitlements $(SRCROOT)/entitlements/hardened-proc.entitlements $(SYMROOT)/$@ 1330*043036a2SApple OSS Distributions 1331*043036a2SApple OSS DistributionsCUSTOM_TARGETS += arm_mte_spawn_client_with_top_level_hardened_proc_entitlement_and_in_amfi_opt_out 1332*043036a2SApple OSS Distributionsarm_mte_spawn_client_with_top_level_hardened_proc_entitlement_and_in_amfi_opt_out: INVALID_ARCHS = $(filter-out arm64%,$(ARCH_CONFIGS)) 1333*043036a2SApple OSS Distributionsarm_mte_spawn_client_with_top_level_hardened_proc_entitlement_and_in_amfi_opt_out: OTHER_CFLAGS += -march=armv8.5a+memtag 1334*043036a2SApple OSS Distributionsarm_mte_spawn_client_with_top_level_hardened_proc_entitlement_and_in_amfi_opt_out: arm_mte_spawn_policies_helper.c arm_mte_utilities.c 1335*043036a2SApple OSS Distributions $(CC) $(DT_CFLAGS) -I $(OBJROOT) $(MTE_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) -I$(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders \ 1336*043036a2SApple OSS Distributions $^ -o $(SYMROOT)/$@ 1337*043036a2SApple OSS Distributions $(CODESIGN) -i com.apple.internal.arm_mte_opt_out_test -s- -f --entitlements $(SRCROOT)/entitlements/hardened-proc.entitlements $(SYMROOT)/$@ 1338*043036a2SApple OSS Distributions 1339*043036a2SApple OSS DistributionsCUSTOM_TARGETS += arm_mte_spawn_client_with_invalid_entitlement_setting 1340*043036a2SApple OSS Distributionsarm_mte_spawn_client_with_invalid_entitlement_setting: INVALID_ARCHS = $(filter-out arm64%,$(ARCH_CONFIGS)) 1341*043036a2SApple OSS Distributionsarm_mte_spawn_client_with_invalid_entitlement_setting: OTHER_CFLAGS += -march=armv8.5a+memtag 1342*043036a2SApple OSS Distributionsarm_mte_spawn_client_with_invalid_entitlement_setting: arm_mte_spawn_policies_helper.c arm_mte_utilities.c 1343*043036a2SApple OSS Distributions $(CC) $(DT_CFLAGS) -I $(OBJROOT) $(MTE_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) -I$(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders \ 1344*043036a2SApple OSS Distributions $^ -o $(SYMROOT)/$@ 1345*043036a2SApple OSS Distributions $(CODESIGN) -s- -f --entitlements $(SRCROOT)/entitlements/hardened-proc-invalid.entitlements $(SYMROOT)/$@ 1346*043036a2SApple OSS Distributions 1347*043036a2SApple OSS DistributionsCUSTOM_TARGETS += mte_posix_spawn_tool 1348*043036a2SApple OSS Distributionsmte_posix_spawn_tool: INVALID_ARCHS = i386 1349*043036a2SApple OSS Distributionsmte_posix_spawn_tool: mte_posix_spawn_tool.c 1350*043036a2SApple OSS Distributions $(CC) $(DT_CFLAGS) -I $(OBJROOT) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) mte_posix_spawn_tool.c -o $(SYMROOT)/mte_posix_spawn_tool -I$(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders 1351*043036a2SApple OSS Distributions $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@ 1352*043036a2SApple OSS Distributions 1353*043036a2SApple OSS Distributionsinstall-mte_posix_spawn_tool: mte_posix_spawn_tool 1354*043036a2SApple OSS Distributions mkdir -p $(INSTALLDIR)/tools 1355*043036a2SApple OSS Distributions cp $(SYMROOT)/mte_posix_spawn_tool $(INSTALLDIR)/tools/ 1356*043036a2SApple OSS Distributions 1357*043036a2SApple OSS Distributionsinstall-arm_mte_spawn_client_without_hardened_process_entitlement: arm_mte_spawn_client_without_hardened_process_entitlement 1358*043036a2SApple OSS Distributions mkdir -p $(INSTALLDIR) 1359*043036a2SApple OSS Distributions cp $(SYMROOT)/$< $(INSTALLDIR)/ 1360*043036a2SApple OSS Distributions 1361*043036a2SApple OSS Distributionsinstall-arm_mte_spawn_client_with_hardened_process_entitlement: arm_mte_spawn_client_with_hardened_process_entitlement 1362*043036a2SApple OSS Distributions mkdir -p $(INSTALLDIR) 1363*043036a2SApple OSS Distributions cp $(SYMROOT)/$< $(INSTALLDIR)/ 1364*043036a2SApple OSS Distributions 1365*043036a2SApple OSS Distributionsinstall-arm_mte_spawn_client_with_top_level_hardened_proc_entitlement_and_in_amfi_opt_out: arm_mte_spawn_client_with_top_level_hardened_proc_entitlement_and_in_amfi_opt_out 1366*043036a2SApple OSS Distributions mkdir -p $(INSTALLDIR) 1367*043036a2SApple OSS Distributions cp $(SYMROOT)/$< $(INSTALLDIR)/ 1368*043036a2SApple OSS Distributions 1369*043036a2SApple OSS Distributionsinstall-arm_mte_spawn_client_with_invalid_entitlement_setting: arm_mte_spawn_client_with_invalid_entitlement_setting 1370*043036a2SApple OSS Distributions mkdir -p $(INSTALLDIR)/tools 1371*043036a2SApple OSS Distributions cp $(SYMROOT)/$< $(INSTALLDIR)/tools/ 1372*043036a2SApple OSS Distributions 1373*043036a2SApple OSS Distributionsvm/vm_mteinfo: INVALID_ARCHS = $(filter-out arm64%,$(ARCH_CONFIGS)) 1374*043036a2SApple OSS Distributionsvm/vm_mteinfo: OTHER_CFLAGS += -Wno-implicit-int-conversion -Wno-sign-conversion -Wno-sign-compare -Wno-format-pedantic 1375*043036a2SApple OSS Distributions 1376*043036a2SApple OSS Distributionsvm/vm_mte_reclamation_withmte: arm_mte_utilities.c 1377*043036a2SApple OSS Distributionsvm/vm_mte_reclamation_withmte: INVALID_ARCHS = $(filter-out arm64%,$(ARCH_CONFIGS)) 1378*043036a2SApple OSS Distributionsvm/vm_mte_reclamation_withmte: OTHER_CFLAGS += $(MTE_CFLAGS) 1379*043036a2SApple OSS Distributionsvm/vm_mte_reclamation_withmte: OTHER_LDFLAGS += -ldarwintest_utils 1380*043036a2SApple OSS Distributionsvm/vm_mte_reclamation_withmte: CODE_SIGN_ENTITLEMENTS = arm_mte.entitlements 1381*043036a2SApple OSS Distributions 1382*043036a2SApple OSS DistributionsCODESIGN_MTE_SOFT:=$(CODESIGN) -i com.apple.internal.arm_mte_soft_mode_test 1383*043036a2SApple OSS Distributionsarm_mte_soft_mode: arm_mte_utilities.c 1384*043036a2SApple OSS Distributionsarm_mte_soft_mode: INVALID_ARCHS = $(filter-out arm64%,$(ARCH_CONFIGS)) 1385*043036a2SApple OSS Distributionsarm_mte_soft_mode: OTHER_CFLAGS += $(MTE_CFLAGS) 1386*043036a2SApple OSS Distributionsarm_mte_soft_mode: CODE_SIGN_ENTITLEMENTS = arm_mte.entitlements 1387*043036a2SApple OSS Distributionsarm_mte_soft_mode: CODESIGN = $(CODESIGN_MTE_SOFT) 1388*043036a2SApple OSS Distributions 1389*043036a2SApple OSS Distributionsarm_mte_soft_mode_traced: arm_mte_utilities.c 1390*043036a2SApple OSS Distributionsarm_mte_soft_mode_traced: INVALID_ARCHS = $(filter-out arm64%,$(ARCH_CONFIGS)) 1391*043036a2SApple OSS Distributionsarm_mte_soft_mode_traced: OTHER_CFLAGS += $(MTE_CFLAGS) 1392*043036a2SApple OSS Distributionsarm_mte_soft_mode_traced: CODE_SIGN_ENTITLEMENTS = arm_mte_soft_mode_traced.entitlements 1393*043036a2SApple OSS Distributionsarm_mte_soft_mode_traced: CODESIGN = $(CODESIGN_MTE_SOFT) 1394*043036a2SApple OSS Distributions 1395*043036a2SApple OSS DistributionsCODESIGN_MTE_PREFLIGHT:=$(CODESIGN) -i com.apple.internal.arm_mte_preflight_test 1396*043036a2SApple OSS Distributionsarm_mte_preflight: arm_mte_utilities.c 1397*043036a2SApple OSS Distributionsarm_mte_preflight: INVALID_ARCHS = $(filter-out arm64%,$(ARCH_CONFIGS)) 1398*043036a2SApple OSS Distributionsarm_mte_preflight: OTHER_CFLAGS += $(MTE_CFLAGS) 1399*043036a2SApple OSS Distributionsarm_mte_preflight: CODESIGN = $(CODESIGN_MTE_PREFLIGHT) 1400*043036a2SApple OSS Distributions 1401*043036a2SApple OSS DistributionsCODESIGN_MTE_API:=$(CODESIGN) -i com.apple.internal.arm_mte_api_test 1402*043036a2SApple OSS Distributionsarm_mte_api: arm_mte_utilities.c 1403*043036a2SApple OSS Distributionsarm_mte_api: INVALID_ARCHS = $(filter-out arm64%,$(ARCH_CONFIGS)) 1404*043036a2SApple OSS Distributionsarm_mte_api: OTHER_CFLAGS += $(MTE_CFLAGS) 1405*043036a2SApple OSS Distributionsarm_mte_api: CODE_SIGN_ENTITLEMENTS = arm_mte.entitlements 1406*043036a2SApple OSS Distributionsarm_mte_api: CODESIGN = $(CODESIGN_MTE_API) 1407*043036a2SApple OSS Distributions 1408*043036a2SApple OSS DistributionsCUSTOM_TARGETS += arm_mte_alias_restriction 1409*043036a2SApple OSS Distributionsarm_mte_alias_restriction: arm_mte_utilities.c 1410*043036a2SApple OSS Distributionsarm_mte_alias_restriction: INVALID_ARCHS = $(filter-out arm64%,$(ARCH_CONFIGS)) 1411*043036a2SApple OSS Distributionsarm_mte_alias_restriction: CODE_SIGN_ENTITLEMENTS = arm_mte.entitlements 1412*043036a2SApple OSS Distributionsarm_mte_alias_restriction: OTHER_CFLAGS += $(MTE_CFLAGS) 1413*043036a2SApple OSS Distributionsarm_mte_alias_restriction: arm_mte_alias_restriction.c 1414*043036a2SApple OSS Distributions $(CC) $(DT_CFLAGS) -I $(OBJROOT) $(MTE_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) -I$(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders \ 1415*043036a2SApple OSS Distributions arm_mte_alias_restriction.c arm_mte_utilities.c -o $(SYMROOT)/$@ 1416*043036a2SApple OSS Distributions $(CODESIGN) -f -s- --entitlements $(SRCROOT)/$(CODE_SIGN_ENTITLEMENTS) $(SYMROOT)/$@ 1417*043036a2SApple OSS Distributions 1418*043036a2SApple OSS Distributionsinstall-arm_mte_alias_restriction: arm_mte_alias_restriction 1419*043036a2SApple OSS Distributions mkdir -p $(INSTALLDIR) 1420*043036a2SApple OSS Distributions cp $(SYMROOT)/$< $(INSTALLDIR)/ 1421*043036a2SApple OSS Distributions 1422*043036a2SApple OSS DistributionsCUSTOM_TARGETS += arm_mte_alias_restriction_helper 1423*043036a2SApple OSS DistributionsEXCLUDED_SOURCES += arm_mte_alias_restriction_helper.c 1424*043036a2SApple OSS DistributionsCODESIGN_MTE_ALIAS_RESTRICTION:=$(CODESIGN) -i com.apple.internal.arm_mte_alias_restriction_opt_in_test 1425*043036a2SApple OSS Distributionsarm_mte_alias_restriction_helper: CODESIGN = $(CODESIGN_MTE_ALIAS_RESTRICTION) 1426*043036a2SApple OSS Distributionsarm_mte_alias_restriction_helper: INVALID_ARCHS = $(filter-out arm64%,$(ARCH_CONFIGS)) 1427*043036a2SApple OSS Distributionsarm_mte_alias_restriction_helper: CODE_SIGN_ENTITLEMENTS = arm_mte.entitlements 1428*043036a2SApple OSS Distributionsarm_mte_alias_restriction_helper: arm_mte_alias_restriction_helper.c 1429*043036a2SApple OSS Distributions 1430*043036a2SApple OSS Distributionsinstall-arm_mte_alias_restriction_helper: arm_mte_alias_restriction_helper 1431*043036a2SApple OSS Distributions mkdir -p $(INSTALLDIR) 1432*043036a2SApple OSS Distributions cp $(SYMROOT)/$< $(INSTALLDIR)/ 1433*043036a2SApple OSS Distributions 1434*043036a2SApple OSS DistributionsCUSTOM_TARGETS += arm_mte_driverkit_standin 1435*043036a2SApple OSS DistributionsEXCLUDED_SOURCES += arm_mte_driverkit_standin.c 1436*043036a2SApple OSS Distributionsarm_mte_driverkit_standin: INVALID_ARCHS = $(filter-out arm64%,$(ARCH_CONFIGS)) 1437*043036a2SApple OSS Distributionsarm_mte_driverkit_standin: CODE_SIGN_ENTITLEMENTS = arm_mte_driverkit_standin.entitlements 1438*043036a2SApple OSS Distributionsarm_mte_driverkit_standin: arm_mte_driverkit_standin.c 1439*043036a2SApple OSS Distributions $(CC) $(DT_CFLAGS) -I $(OBJROOT) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) -I$(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders \ 1440*043036a2SApple OSS Distributions $^ -o $(SYMROOT)/$@ 1441*043036a2SApple OSS Distributions $(CODESIGN) -f -s- --entitlements $(SRCROOT)/$(CODE_SIGN_ENTITLEMENTS) $(SYMROOT)/$@ 1442*043036a2SApple OSS Distributions 1443*043036a2SApple OSS Distributionsinstall-arm_mte_driverkit_standin: arm_mte_driverkit_standin 1444*043036a2SApple OSS Distributions mkdir -p $(INSTALLDIR) 1445*043036a2SApple OSS Distributions cp $(SYMROOT)/$< $(INSTALLDIR)/ 1446*043036a2SApple OSS Distributions 1447*043036a2SApple OSS Distributionsx18_entitled: OTHER_CFLAGS += -ffixed-x18 -Wno-language-extension-token 1448*043036a2SApple OSS Distributionsx18_entitled: CODE_SIGN_ENTITLEMENTS = x18-entitlements.plist 1449*043036a2SApple OSS Distributionsx18_unentitled: OTHER_CFLAGS += -ffixed-x18 -Wno-language-extension-token 1450*043036a2SApple OSS Distributionsifneq ($(PLATFORM),MacOSX) 1451*043036a2SApple OSS DistributionsEXCLUDED_SOURCES += x18_legacy.c 1452*043036a2SApple OSS Distributionselse 1453*043036a2SApple OSS Distributionsx18_legacy: OTHER_CFLAGS += -ffixed-x18 -Wno-language-extension-token -Wl,-platform_version -Wl,macos -Wl,10.12 -Wl,10.12 1454*043036a2SApple OSS Distributionsendif 1455*043036a2SApple OSS Distributions 1456*043036a2SApple OSS Distributionsifeq ($(findstring arm64,$(ARCH_CONFIGS)),) 1457*043036a2SApple OSS DistributionsEXCLUDED_SOURCES += apple_generic_timer.c apple_generic_timer_legacy.c 1458*043036a2SApple OSS Distributionselse 1459*043036a2SApple OSS Distributionsapple_generic_timer: INVALID_ARCHS = armv7k x86_64 x86_64h 1460*043036a2SApple OSS Distributions 1461*043036a2SApple OSS Distributionsapple_generic_timer_legacy: INVALID_ARCHS = armv7k x86_64 x86_64h 1462*043036a2SApple OSS Distributionsifeq ($(PLATFORM),MacOSX) 1463*043036a2SApple OSS Distributionsapple_generic_timer_legacy: OTHER_CFLAGS += -Wl,-platform_version,macos,14.6,14.6 1464*043036a2SApple OSS Distributionselse ifeq ($(PLATFORM),iPhoneOS) 1465*043036a2SApple OSS Distributionsapple_generic_timer_legacy: OTHER_CFLAGS += -Wl,-platform_version,ios,14.6,14.6 1466*043036a2SApple OSS Distributionselse ifeq ($(PLATFORM),tvOS) 1467*043036a2SApple OSS Distributionsapple_generic_timer_legacy: OTHER_CFLAGS += -Wl,-platform_version,tvos,14.6,14.6 1468*043036a2SApple OSS Distributionselse ifeq ($(PLATFORM),WatchOS) 1469*043036a2SApple OSS Distributionsapple_generic_timer_legacy: OTHER_CFLAGS += -Wl,-platform_version,watchos,10.6,10.6 1470*043036a2SApple OSS Distributionselse 1471*043036a2SApple OSS DistributionsEXCLUDED_SOURCES += apple_generic_timer_legacy.c 1472*043036a2SApple OSS Distributionsendif 1473*043036a2SApple OSS Distributions 1474*043036a2SApple OSS Distributionsifneq ($(PLATFORM),MacOSX) 1475*043036a2SApple OSS DistributionsEXCLUDED_SOURCES += apple_generic_timer_vmm.c 1476*043036a2SApple OSS Distributionselse 1477*043036a2SApple OSS Distributionsapple_generic_timer_vmm: INVALID_ARCHS = armv7k x86_64 x86_64h 1478*043036a2SApple OSS Distributionsapple_generic_timer_vmm: CODE_SIGN_ENTITLEMENTS = hv_private.entitlements 1479*043036a2SApple OSS Distributionsendif 1480*043036a2SApple OSS Distributions 1481*043036a2SApple OSS Distributionsendif 1482*043036a2SApple OSS Distributions 1483*043036a2SApple OSS Distributionsbingrade: bingrade_helper_arm32 bingrade_helper_arm64 bingrade_helper_arm_fat 1484*043036a2SApple OSS Distributionsbingrade: INVALID_ARCHS = x86_64 x86_64h 1485*043036a2SApple OSS Distributions# libdarwintest.a doesn't have an arm64 slice on watchOS 1486*043036a2SApple OSS Distributionsifeq ($(PLATFORM),WatchOS) 1487*043036a2SApple OSS Distributionsbingrade: INVALID_ARCHS += arm64 1488*043036a2SApple OSS Distributionsendif 1489*043036a2SApple OSS Distributions 1490*043036a2SApple OSS DistributionsEXCLUDED_SOURCES += bingrade_helper.c 1491*043036a2SApple OSS DistributionsCUSTOM_TARGETS += bingrade_helper_arm32 1492*043036a2SApple OSS Distributionsbingrade_helper_arm32: CFLAGS = -arch arm64_32 -static -nostdlib 1493*043036a2SApple OSS Distributionsbingrade_helper_arm32: bingrade_helper.c 1494*043036a2SApple OSS Distributions $(CC) $(CFLAGS) $< -o $(SYMROOT)/$@ 1495*043036a2SApple OSS Distributions $(CODESIGN) -f -s- $(SYMROOT)/$@ 1496*043036a2SApple OSS Distributions 1497*043036a2SApple OSS Distributionsinstall-bingrade_helper_arm32: bingrade_helper_arm32 1498*043036a2SApple OSS Distributions mkdir -p $(INSTALLDIR) 1499*043036a2SApple OSS Distributions cp $(SYMROOT)/$< $(INSTALLDIR)/ 1500*043036a2SApple OSS Distributions 1501*043036a2SApple OSS DistributionsCUSTOM_TARGETS += bingrade_helper_arm64 1502*043036a2SApple OSS Distributionsbingrade_helper_arm64: CFLAGS = -arch arm64 -static -nostdlib 1503*043036a2SApple OSS Distributionsbingrade_helper_arm64: bingrade_helper.c 1504*043036a2SApple OSS Distributions $(CC) $(CFLAGS) $< -o $(SYMROOT)/$@ 1505*043036a2SApple OSS Distributions $(CODESIGN) -f -s- $(SYMROOT)/$@ 1506*043036a2SApple OSS Distributions 1507*043036a2SApple OSS Distributionsinstall-bingrade_helper_arm64: bingrade_helper_arm64 1508*043036a2SApple OSS Distributions mkdir -p $(INSTALLDIR) 1509*043036a2SApple OSS Distributions cp $(SYMROOT)/$< $(INSTALLDIR)/ 1510*043036a2SApple OSS Distributions 1511*043036a2SApple OSS DistributionsCUSTOM_TARGETS += bingrade_helper_arm_fat 1512*043036a2SApple OSS Distributionsbingrade_helper_arm_fat: CFLAGS = -arch arm64 -arch arm64_32 -arch arm64e -static -nostdlib 1513*043036a2SApple OSS Distributionsbingrade_helper_arm_fat: bingrade_helper.c 1514*043036a2SApple OSS Distributions $(CC) $(CFLAGS) $< -o $(SYMROOT)/$@ 1515*043036a2SApple OSS Distributions $(CODESIGN) -f -s- $(SYMROOT)/$@ 1516*043036a2SApple OSS Distributions 1517*043036a2SApple OSS Distributionsinstall-bingrade_helper_arm_fat: bingrade_helper_arm_fat 1518*043036a2SApple OSS Distributions mkdir -p $(INSTALLDIR) 1519*043036a2SApple OSS Distributions cp $(SYMROOT)/$< $(INSTALLDIR)/ 1520*043036a2SApple OSS Distributions 1521*043036a2SApple OSS Distributionspmap_bench: INVALID_ARCHS = $(filter-out arm%,$(ARCH_CONFIGS)) 1522*043036a2SApple OSS Distributionspmap_stress: INVALID_ARCHS = $(filter-out arm%,$(ARCH_CONFIGS)) 1523*043036a2SApple OSS Distributionspmap_fault_on_commpage: INVALID_ARCHS = $(filter-out arm%,$(ARCH_CONFIGS)) 1524*043036a2SApple OSS Distributions 1525*043036a2SApple OSS Distributionshw_breakpoint_step_arm64: CODE_SIGN_ENTITLEMENTS = hw_breakpoint_step_arm64_entitlements.plist 1526*043036a2SApple OSS Distributionshw_breakpoint_step_arm64: INVALID_ARCHS = $(filter-out arm64%,$(ARCH_CONFIGS)) 1527*043036a2SApple OSS Distributionshw_breakpoint_step_arm64: excserver 1528*043036a2SApple OSS Distributionshw_breakpoint_step_arm64: OTHER_CFLAGS += $(OBJROOT)/excserver.c -I $(OBJROOT) 1529*043036a2SApple OSS Distributions 1530*043036a2SApple OSS Distributionsexc_resource_threads: excserver 1531*043036a2SApple OSS Distributionsexc_resource_threads: OTHER_CFLAGS += $(OBJROOT)/excserver.c -I $(OBJROOT) 1532*043036a2SApple OSS Distributionsexc_resource_threads: CODE_SIGN_ENTITLEMENTS = entitlements/set_exception_port.entitlement 1533*043036a2SApple OSS Distributions 1534*043036a2SApple OSS Distributionsmach_service_port: notifyserver 1535*043036a2SApple OSS Distributionsmach_service_port: OTHER_CFLAGS += $(OBJROOT)/notifyServer.c -I $(OBJROOT) 1536*043036a2SApple OSS Distributions 1537*043036a2SApple OSS Distributionsfp_exception: excserver exc_helpers.c 1538*043036a2SApple OSS Distributionsfp_exception: OTHER_CFLAGS += $(OBJROOT)/excserver.c -I $(OBJROOT) 1539*043036a2SApple OSS Distributionsfp_exception: CODE_SIGN_ENTITLEMENTS = entitlements/set_exception_port.entitlement 1540*043036a2SApple OSS Distributions 1541*043036a2SApple OSS Distributionsptrauth_failure: excserver exc_helpers.c 1542*043036a2SApple OSS Distributionsptrauth_failure: OTHER_CFLAGS += $(OBJROOT)/excserver.c -I $(OBJROOT) -Wno-language-extension-token 1543*043036a2SApple OSS Distributionsptrauth_failure: CODESIGN = $(CODESIGN_HARDENED_RUNTIME) 1544*043036a2SApple OSS Distributionsptrauth_failure: CODE_SIGN_ENTITLEMENTS = entitlements/set_state_and_exception_port.entitlement 1545*043036a2SApple OSS Distributions 1546*043036a2SApple OSS Distributionsdecompression_failure: excserver exc_helpers.c try_read_write.c 1547*043036a2SApple OSS Distributionsdecompression_failure: OTHER_CFLAGS += $(OBJROOT)/excserver.c -I $(OBJROOT) 1548*043036a2SApple OSS Distributionsdecompression_failure: CODE_SIGN_ENTITLEMENTS = entitlements/set_exception_port.entitlement 1549*043036a2SApple OSS Distributions 1550*043036a2SApple OSS Distributionsipc/kernel_signed_pac_thread_state: excserver 1551*043036a2SApple OSS Distributionsipc/kernel_signed_pac_thread_state: OTHER_CFLAGS += $(OBJROOT)/excserver.c -I $(OBJROOT) 1552*043036a2SApple OSS Distributionsipc/kernel_signed_pac_thread_state: CODE_SIGN_ENTITLEMENTS = pac_exception_entitlement.plist 1553*043036a2SApple OSS Distributions 1554*043036a2SApple OSS Distributionsifeq ($(findstring arm64e,$(ARCH_CONFIGS)),) 1555*043036a2SApple OSS DistributionsEXCLUDED_SOURCES += pac_exception_entitlement.c 1556*043036a2SApple OSS Distributionselse 1557*043036a2SApple OSS Distributionspac_exception_entitlement: excserver exc_helpers.c 1558*043036a2SApple OSS Distributionspac_exception_entitlement: OTHER_CFLAGS += $(OBJROOT)/excserver.c -Wno-language-extension-token 1559*043036a2SApple OSS Distributionspac_exception_entitlement: CODE_SIGN_ENTITLEMENTS = pac_exception_entitlement.plist 1560*043036a2SApple OSS Distributionsendif 1561*043036a2SApple OSS Distributions 1562*043036a2SApple OSS Distributionsunrecoverable_trap_test: excserver exc_helpers.c 1563*043036a2SApple OSS Distributionsunrecoverable_trap_test: OTHER_CFLAGS += $(OBJROOT)/excserver.c -Wno-language-extension-token 1564*043036a2SApple OSS Distributionsunrecoverable_trap_test: CODE_SIGN_ENTITLEMENTS = entitlements/set_exception_port.entitlement 1565*043036a2SApple OSS Distributions# libdarwintest.a doesn't have an arm64 slice on watchOS 1566*043036a2SApple OSS Distributionsifeq ($(PLATFORM),WatchOS) 1567*043036a2SApple OSS Distributionsunrecoverable_trap_test: INVALID_ARCHS += arm64 1568*043036a2SApple OSS Distributionsendif 1569*043036a2SApple OSS Distributions 1570*043036a2SApple OSS Distributionsifeq ($(findstring arm64,$(ARCH_CONFIGS)),) 1571*043036a2SApple OSS DistributionsEXCLUDED_SOURCES += arm_cpu_capabilities.c 1572*043036a2SApple OSS Distributionselse 1573*043036a2SApple OSS Distributionsarm_cpu_capabilities: INVALID_ARCHS = armv7k x86_64 x86_64h 1574*043036a2SApple OSS Distributionsarm_cpu_capabilities: excserver exc_helpers.c 1575*043036a2SApple OSS Distributionsarm_cpu_capabilities: OTHER_CFLAGS += $(OBJROOT)/excserver.c -Wno-language-extension-token -mcpu=apple-a15 1576*043036a2SApple OSS Distributions#if HAS_ARM_FEAT_SME 1577*043036a2SApple OSS Distributionsarm_cpu_capabilities: OTHER_CFLAGS += -mcpu=apple-a15+sme2 1578*043036a2SApple OSS Distributions#endif 1579*043036a2SApple OSS Distributions# Including PrivateHeaders from both Kernel.framework and System.framework makes 1580*043036a2SApple OSS Distributions# a mess out of the Mach headers we need to build exception handling support. 1581*043036a2SApple OSS Distributions# Work around this by only including the arm/ directory. 1582*043036a2SApple OSS Distributionsarm_cpu_capabilities: OTHER_CFLAGS += -isystem $(SDKROOT)/System/Library/Frameworks/Kernel.framework/PrivateHeaders/arm 1583*043036a2SApple OSS Distributionsarm_cpu_capabilities: CODE_SIGN_ENTITLEMENTS = entitlements/set_exception_port.entitlement 1584*043036a2SApple OSS Distributionsendif 1585*043036a2SApple OSS Distributions 1586*043036a2SApple OSS Distributions# Disabling building of ldt files as dt_extractmeta crashes 1587*043036a2SApple OSS Distributions# in build systems. Ref rdar://110251082 1588*043036a2SApple OSS Distributions# Leaving commented bits for future re-enablement 1589*043036a2SApple OSS DistributionsEXCLUDED_SOURCES += ldt_code32.s ldt.c 1590*043036a2SApple OSS Distributions 1591*043036a2SApple OSS Distributions#\ifeq ($(findstring x86_64,$(ARCH_CONFIGS)),) 1592*043036a2SApple OSS Distributions#EXCLUDED_SOURCES += ldt_code32.s ldt.c 1593*043036a2SApple OSS Distributions#\else # target = osx 1594*043036a2SApple OSS Distributions#$(OBJROOT)/ldt_mach_exc_server.c: 1595*043036a2SApple OSS Distributions# $(MIG) $(CFLAGS) \ 1596*043036a2SApple OSS Distributions# -user /dev/null \ 1597*043036a2SApple OSS Distributions# -server $(OBJROOT)/ldt_mach_exc_server.c \ 1598*043036a2SApple OSS Distributions# -header $(OBJROOT)/ldt_mach_exc.h \ 1599*043036a2SApple OSS Distributions# mach_exc.defs 1600*043036a2SApple OSS Distributions# 1601*043036a2SApple OSS Distributions#ldt: INVALID_ARCHS = $(ARCH_CONFIGS) 1602*043036a2SApple OSS Distributions#ldt: $(OBJROOT)/ldt_mach_exc_server.c 1603*043036a2SApple OSS Distributions#ldt: OTHER_CFLAGS += -arch x86_64 -I $(OBJROOT) $(SRCROOT)/ldt_code32.s -Wl,-pagezero_size,0x1000 -Wno-missing-variable-declarations 1604*043036a2SApple OSS Distributions#ldt: CODE_SIGN_ENTITLEMENTS=ldt_entitlement.plist 1605*043036a2SApple OSS Distributions#\endif 1606*043036a2SApple OSS Distributions 1607*043036a2SApple OSS Distributionsifneq ($(PLATFORM),BridgeOS) 1608*043036a2SApple OSS DistributionsEXCLUDED_SOURCES += remote_time.c 1609*043036a2SApple OSS Distributionselse 1610*043036a2SApple OSS Distributionsremote_time: INVALID_ARCHS = armv7 armv7s arm64_32 1611*043036a2SApple OSS Distributionsendif 1612*043036a2SApple OSS Distributions 1613*043036a2SApple OSS Distributionsvm_phys_footprint: OTHER_LDFLAGS += -framework CoreFoundation -framework IOSurface 1614*043036a2SApple OSS Distributions 1615*043036a2SApple OSS Distributionsvm_kern_count_wired_kernelcache: OTHER_CFLAGS += -I$(SDKROOT)/System/Library/Frameworks/Kernel.framework/PrivateHeaders/mach 1616*043036a2SApple OSS Distributions 1617*043036a2SApple OSS Distributionsdebug_control_port_for_pid: CODE_SIGN_ENTITLEMENTS = ./debug_control_port_for_pid_entitlement.plist 1618*043036a2SApple OSS Distributions 1619*043036a2SApple OSS Distributionsprng: OTHER_LDFLAGS += -ldarwintest_utils 1620*043036a2SApple OSS Distributions 1621*043036a2SApple OSS Distributionspreoslog: OTHER_LDFLAGS += -ldarwintest_utils 1622*043036a2SApple OSS Distributionspreoslog: OTHER_CFLAGS += test_utils.c 1623*043036a2SApple OSS Distributions 1624*043036a2SApple OSS Distributionstask_policy: CODE_SIGN_ENTITLEMENTS = ./task_policy_entitlement.plist 1625*043036a2SApple OSS Distributions 1626*043036a2SApple OSS DistributionsOTHER_TEST_TARGETS += task_policy_unentitled 1627*043036a2SApple OSS Distributionstask_policy_unentitled: CODE_SIGN_ENTITLEMENTS = task_for_pid_entitlement.plist 1628*043036a2SApple OSS Distributionstask_policy_unentitled: OTHER_CFLAGS += -DUNENTITLED 1629*043036a2SApple OSS Distributionstask_policy_unentitled: task_policy.c 1630*043036a2SApple OSS Distributions $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/$@ 1631*043036a2SApple OSS Distributions $(CODESIGN) --force --sign - --timestamp=none --entitlements $(CODE_SIGN_ENTITLEMENTS) $(SYMROOT)/$@ 1632*043036a2SApple OSS Distributions 1633*043036a2SApple OSS Distributions 1634*043036a2SApple OSS DistributionsEXCLUDED_SOURCES += get_shared_cache_address.c 1635*043036a2SApple OSS Distributions 1636*043036a2SApple OSS Distributions 1637*043036a2SApple OSS Distributionsifneq ($(filter iPhoneOS MacOSX, $(PLATFORM)),) 1638*043036a2SApple OSS DistributionsCUSTOM_TARGETS += get_shared_cache_address 1639*043036a2SApple OSS Distributions 1640*043036a2SApple OSS Distributionsget_shared_cache_address: INVALID_ARCHS = arm64 i386 x86_64 1641*043036a2SApple OSS Distributionsget_shared_cache_address: get_shared_cache_address.c 1642*043036a2SApple OSS Distributions $(CC) $(OTHER_CFLAGS) $(CFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/get_shared_cache_address 1643*043036a2SApple OSS Distributions 1644*043036a2SApple OSS Distributionsinstall-get_shared_cache_address: get_shared_cache_address 1645*043036a2SApple OSS Distributions $(CODESIGN) --force --sign - --timestamp=none --identifier=com.apple.get_shared_cache_address $(SYMROOT)/get_shared_cache_address 1646*043036a2SApple OSS Distributions mkdir -p $(INSTALLDIR) 1647*043036a2SApple OSS Distributions cp $(SYMROOT)/get_shared_cache_address $(INSTALLDIR)/ 1648*043036a2SApple OSS Distributionsendif 1649*043036a2SApple OSS Distributions 1650*043036a2SApple OSS Distributions 1651*043036a2SApple OSS DistributionsOTHER_TEST_TARGETS += vm_memory_share_tests 1652*043036a2SApple OSS Distributions 1653*043036a2SApple OSS Distributionsvm_memory_share_tests: INVALID_ARCHS = i386 1654*043036a2SApple OSS Distributionsvm_memory_share_tests: CODE_SIGN_ENTITLEMENTS = ./task_for_pid_entitlement.plist 1655*043036a2SApple OSS Distributionsvm_memory_share_tests: vm_memory_tests_src/main.c vm_memory_tests_src/common.c vm_memory_tests_src/vm_tests.c 1656*043036a2SApple OSS Distributions $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $^ -o $(SYMROOT)/$@ 1657*043036a2SApple OSS Distributions echo $(CODESIGN) --force --sign - --timestamp=none --entitlements $(SRCROOT)/$(CODE_SIGN_ENTITLEMENTS) $(SYMROOT)/$@; 1658*043036a2SApple OSS Distributions env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none --entitlements "$(SRCROOT)/$(CODE_SIGN_ENTITLEMENTS)" $(SYMROOT)/$@; 1659*043036a2SApple OSS Distributions 1660*043036a2SApple OSS Distributions# build the mach server as individual helper which does not use libdarwintest 1661*043036a2SApple OSS DistributionsCUSTOM_TARGETS += vm_memory_share_tests_server 1662*043036a2SApple OSS Distributionsvm_memory_share_tests_server: CODE_SIGN_ENTITLEMENTS = ./task_for_pid_entitlement.plist 1663*043036a2SApple OSS Distributionsvm_memory_share_tests_server: vm_memory_tests_src/server.c vm_memory_tests_src/common.c vm_memory_tests_src/vm_tests.c 1664*043036a2SApple OSS Distributions $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $^ -o $(SYMROOT)/vm_memory_share_tests_server 1665*043036a2SApple OSS Distributions echo $(CODESIGN) --force --sign - --timestamp=none --entitlements $(SRCROOT)/$(CODE_SIGN_ENTITLEMENTS) $(SYMROOT)/$@; 1666*043036a2SApple OSS Distributions env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none --entitlements "$(SRCROOT)/$(CODE_SIGN_ENTITLEMENTS)" $(SYMROOT)/$@; 1667*043036a2SApple OSS Distributions 1668*043036a2SApple OSS Distributionsinstall-vm_memory_share_tests_server: vm_memory_share_tests_server 1669*043036a2SApple OSS Distributions mkdir -p $(INSTALLDIR) 1670*043036a2SApple OSS Distributions cp $(SYMROOT)/vm_memory_share_tests_server $(INSTALLDIR)/ 1671*043036a2SApple OSS Distributions 1672*043036a2SApple OSS Distributionsifeq ($(PLATFORM),MacOSX) 1673*043036a2SApple OSS DistributionsEXCLUDED_SOURCES += vm/kern_max_task_pmem.c 1674*043036a2SApple OSS Distributionsendif 1675*043036a2SApple OSS Distributions 1676*043036a2SApple OSS DistributionsEXCLUDED_SOURCES += benchmark/helpers.c 1677*043036a2SApple OSS Distributions 1678*043036a2SApple OSS Distributionsvm/fault_throughput: OTHER_CFLAGS += benchmark/helpers.c 1679*043036a2SApple OSS Distributionsvm/fault_throughput: CODE_SIGN_ENTITLEMENTS = arm_mte.entitlements 1680*043036a2SApple OSS Distributions 1681*043036a2SApple OSS Distributions.PHONY: install-vm/fault_throughput 1682*043036a2SApple OSS Distributionsinstall-vm/fault_throughput: vm/fault_throughput 1683*043036a2SApple OSS Distributions mkdir -p $(INSTALLDIR)/vm 1684*043036a2SApple OSS Distributions cp $(SYMROOT)/vm/fault_throughput $(INSTALLDIR)/vm/ 1685*043036a2SApple OSS Distributions 1686*043036a2SApple OSS Distributions$(SYMROOT)/vm/fault_throughput.lua: $(SRCROOT)/vm/fault_throughput.lua 1687*043036a2SApple OSS Distributions mkdir -p $(SYMROOT)/vm 1688*043036a2SApple OSS Distributions cp $< $@ 1689*043036a2SApple OSS Distributions chmod +x $@ 1690*043036a2SApple OSS Distributions 1691*043036a2SApple OSS Distributions.PHONY: install-fault_throughput_benchrun 1692*043036a2SApple OSS Distributionsinstall-$(SYMROOT)/vm/fault_throughput.lua: $(SYMROOT)/vm/fault_throughput.lua 1693*043036a2SApple OSS Distributions mkdir -p $(INSTALLDIR)/vm 1694*043036a2SApple OSS Distributions cp $(SYMROOT)/vm/fault_throughput.lua $(INSTALLDIR)/vm/ 1695*043036a2SApple OSS Distributions chmod +x $(INSTALLDIR)/vm/fault_throughput.lua 1696*043036a2SApple OSS Distributions 1697*043036a2SApple OSS DistributionsEXCLUDED_SOURCES += vm/fault_throughput.plist 1698*043036a2SApple OSS Distributions 1699*043036a2SApple OSS DistributionsCUSTOM_TARGETS += $(SYMROOT)/vm/fault_throughput.lua vm/fault_throughput 1700*043036a2SApple OSS Distributions 1701*043036a2SApple OSS Distributionsifeq ($(PLATFORM),MacOSX) 1702*043036a2SApple OSS Distributionsmixed_pagesize: vm/mixed_pagesize.c 1703*043036a2SApple OSS Distributions mkdir -p $(SYMROOT)/vm 1704*043036a2SApple OSS Distributions $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/vm/$@ 1705*043036a2SApple OSS Distributions 1706*043036a2SApple OSS Distributionsinstall-mixed_pagesize: mixed_pagesize 1707*043036a2SApple OSS Distributions mkdir -p $(INSTALLDIR)/vm 1708*043036a2SApple OSS Distributions cp $(SYMROOT)/vm/mixed_pagesize $(INSTALLDIR)/vm/ 1709*043036a2SApple OSS Distributions 1710*043036a2SApple OSS DistributionsBATS_PLISTS += $(SRCROOT)/vm/mixed_pagesize.plist 1711*043036a2SApple OSS Distributions 1712*043036a2SApple OSS DistributionsEXCLUDED_SOURCES += vm/mixed_pagesize.c vm/mixed_pagesize.plist 1713*043036a2SApple OSS DistributionsCUSTOM_TARGETS += mixed_pagesize 1714*043036a2SApple OSS Distributionselse 1715*043036a2SApple OSS DistributionsEXCLUDED_SOURCES += vm/mixed_pagesize.c vm/mixed_pagesize.plist 1716*043036a2SApple OSS Distributionsendif 1717*043036a2SApple OSS Distributions 1718*043036a2SApple OSS Distributionsmanual_wq_cooperative: manual_wq_cooperative.c 1719*043036a2SApple OSS Distributions mkdir -p $(SYMROOT) 1720*043036a2SApple OSS Distributions $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/$@ 1721*043036a2SApple OSS Distributions 1722*043036a2SApple OSS Distributionsinstall-manual_wq_cooperative: manual_wq_cooperative 1723*043036a2SApple OSS Distributions mkdir -p $(INSTALLDIR) 1724*043036a2SApple OSS Distributions cp $(SYMROOT)/manual_wq_cooperative $(INSTALLDIR) 1725*043036a2SApple OSS Distributions 1726*043036a2SApple OSS DistributionsBATS_PLISTS += $(SRCROOT)/workqueue.plist 1727*043036a2SApple OSS DistributionsEXCLUDED_SOURCES += manual_wq_cooperative.c workqueue.plist 1728*043036a2SApple OSS DistributionsCUSTOM_TARGETS += manual_wq_cooperative 1729*043036a2SApple OSS Distributions 1730*043036a2SApple OSS Distributions# VM madvise(2) benchmark 1731*043036a2SApple OSS Distributions 1732*043036a2SApple OSS DistributionsBATS_PLISTS += $(SRCROOT)/vm/perf_madvise.plist 1733*043036a2SApple OSS Distributions 1734*043036a2SApple OSS Distributionsvm/perf_madvise: OTHER_CFLAGS += benchmark/helpers.c 1735*043036a2SApple OSS Distributionsvm/perf_madvise: CODE_SIGN_ENTITLEMENTS = arm_mte.entitlements 1736*043036a2SApple OSS Distributions 1737*043036a2SApple OSS Distributions.PHONY: install-vm/perf_madvise 1738*043036a2SApple OSS Distributionsinstall-vm/perf_madvise: vm/perf_madvise 1739*043036a2SApple OSS Distributions mkdir -p $(INSTALLDIR)/vm 1740*043036a2SApple OSS Distributions cp $(SYMROOT)/vm/perf_madvise $(INSTALLDIR)/vm/ 1741*043036a2SApple OSS Distributions 1742*043036a2SApple OSS Distributions$(SYMROOT)/vm/perf_madvise.lua: $(SRCROOT)/vm/perf_madvise.lua 1743*043036a2SApple OSS Distributions mkdir -p $(SYMROOT)/vm 1744*043036a2SApple OSS Distributions cp $< $@ 1745*043036a2SApple OSS Distributions chmod +x $@ 1746*043036a2SApple OSS Distributions 1747*043036a2SApple OSS Distributions.PHONY: install-perf_madvise_benchrun 1748*043036a2SApple OSS Distributionsinstall-$(SYMROOT)/vm/perf_madvise.lua: $(SYMROOT)/vm/perf_madvise.lua 1749*043036a2SApple OSS Distributions mkdir -p $(INSTALLDIR)/vm 1750*043036a2SApple OSS Distributions cp $(SYMROOT)/vm/perf_madvise.lua $(INSTALLDIR)/vm 1751*043036a2SApple OSS Distributions chmod +x $(INSTALLDIR)/vm/perf_madvise.lua 1752*043036a2SApple OSS Distributions 1753*043036a2SApple OSS DistributionsCUSTOM_TARGETS += $(SYMROOT)/vm/perf_madvise.lua vm/perf_madvise 1754*043036a2SApple OSS Distributions 1755*043036a2SApple OSS DistributionsBATS_PLISTS += $(SRCROOT)/vm/perf_compressor.plist 1756*043036a2SApple OSS DistributionsEXCLUDED_SOURCES += vm/perf_compressor.plist 1757*043036a2SApple OSS Distributions 1758*043036a2SApple OSS Distributionsvm/perf_compressor: OTHER_CFLAGS += benchmark/helpers.c 1759*043036a2SApple OSS Distributionsvm/perf_compressor: CODE_SIGN_ENTITLEMENTS = arm_mte.entitlements 1760*043036a2SApple OSS Distributions 1761*043036a2SApple OSS Distributions.PHONY: install-vm/perf_compressor 1762*043036a2SApple OSS Distributionsinstall-vm/perf_compressor: vm/perf_compressor 1763*043036a2SApple OSS Distributions mkdir -p $(INSTALLDIR)/vm 1764*043036a2SApple OSS Distributions cp $(SYMROOT)/vm/perf_compressor $(INSTALLDIR)/vm/ 1765*043036a2SApple OSS Distributions 1766*043036a2SApple OSS Distributions$(SYMROOT)/vm/perf_compressor.lua: $(SRCROOT)/vm/perf_compressor.lua 1767*043036a2SApple OSS Distributions mkdir -p $(SYMROOT)/vm 1768*043036a2SApple OSS Distributions cp $< $@ 1769*043036a2SApple OSS Distributions chmod +x $@ 1770*043036a2SApple OSS Distributions 1771*043036a2SApple OSS Distributions.PHONY: install-$(SYMROOT)/vm/perf_compressor_benchrun 1772*043036a2SApple OSS Distributionsinstall-$(SYMROOT)/vm/perf_compressor.lua: $(SYMROOT)/vm/perf_compressor.lua 1773*043036a2SApple OSS Distributions mkdir -p $(INSTALLDIR)/vm 1774*043036a2SApple OSS Distributions cp $(SYMROOT)/vm/perf_compressor.lua $(INSTALLDIR)/vm/ 1775*043036a2SApple OSS Distributions chmod +x $(INSTALLDIR)/vm/perf_compressor.lua 1776*043036a2SApple OSS Distributions 1777*043036a2SApple OSS DistributionsCUSTOM_TARGETS += $(SYMROOT)/vm/perf_compressor.lua vm/perf_compressor 1778*043036a2SApple OSS Distributions 1779*043036a2SApple OSS Distributionsioconnectasyncmethod_57641955: OTHER_LDFLAGS += -framework IOKit 1780*043036a2SApple OSS Distributions 1781*043036a2SApple OSS Distributionsifeq ($(PLATFORM),BridgeOS) 1782*043036a2SApple OSS DistributionsEXCLUDED_SOURCES += ipsec.m 1783*043036a2SApple OSS Distributionselse 1784*043036a2SApple OSS Distributionsipsec: OTHER_LDFLAGS += -framework Foundation -framework CoreFoundation -framework NetworkExtension 1785*043036a2SApple OSS Distributionsipsec: CODE_SIGN_ENTITLEMENTS = ipsec.entitlements 1786*043036a2SApple OSS Distributionsendif 1787*043036a2SApple OSS Distributions 1788*043036a2SApple OSS Distributionstest_sysctl_kern_procargs_25397314: OTHER_LDFLAGS += -framework Foundation -ldarwintest_utils 1789*043036a2SApple OSS Distributions 1790*043036a2SApple OSS DistributionsINCLUDED_TEST_SOURCE_DIRS += counter 1791*043036a2SApple OSS Distributions 1792*043036a2SApple OSS DistributionsEXCLUDED_SOURCES += counter/common.c 1793*043036a2SApple OSS Distributionscounter/counter: OTHER_CFLAGS += counter/common.c test_utils.c 1794*043036a2SApple OSS Distributionscounter/counter: OTHER_LDFLAGS += -ldarwintest_utils -ldarwintest 1795*043036a2SApple OSS Distributions 1796*043036a2SApple OSS Distributionscounter/benchmark: OTHER_CFLAGS += counter/common.c benchmark/helpers.c 1797*043036a2SApple OSS Distributions 1798*043036a2SApple OSS Distributions.PHONY: install-counter/benchmark 1799*043036a2SApple OSS Distributionsinstall-counter/benchmark: counter/benchmark 1800*043036a2SApple OSS Distributions mkdir -p $(INSTALLDIR)/counter 1801*043036a2SApple OSS Distributions cp $(SYMROOT)/counter/benchmark $(INSTALLDIR)/counter/ 1802*043036a2SApple OSS Distributions 1803*043036a2SApple OSS Distributions$(SYMROOT)/counter/benchmark.lua: $(SRCROOT)/counter/benchmark.lua 1804*043036a2SApple OSS Distributions mkdir -p $(SYMROOT)/counter 1805*043036a2SApple OSS Distributions cp $< $@ 1806*043036a2SApple OSS Distributions chmod +x $@ 1807*043036a2SApple OSS Distributions 1808*043036a2SApple OSS Distributions.PHONY: install-counter_benchrun 1809*043036a2SApple OSS Distributionsinstall-$(SYMROOT)/counter/benchmark.lua: $(SYMROOT)/counter/benchmark.lua 1810*043036a2SApple OSS Distributions mkdir -p $(INSTALLDIR)/counter 1811*043036a2SApple OSS Distributions cp $(SYMROOT)/counter/benchmark.lua $(INSTALLDIR)/counter/ 1812*043036a2SApple OSS Distributions chmod +x $(INSTALLDIR)/counter/benchmark.lua 1813*043036a2SApple OSS Distributions 1814*043036a2SApple OSS DistributionsCUSTOM_TARGETS += $(SYMROOT)/counter/benchmark.lua counter/benchmark 1815*043036a2SApple OSS Distributions 1816*043036a2SApple OSS Distributionsifneq ($(PLATFORM),MacOSX) 1817*043036a2SApple OSS DistributionsEXCLUDED_SOURCES += vm/page_size_globals.c 1818*043036a2SApple OSS Distributionselse 1819*043036a2SApple OSS Distributionsvm/page_size_globals: INVALID_ARCHS = arm64 arm64e 1820*043036a2SApple OSS Distributionsendif 1821*043036a2SApple OSS Distributions 1822*043036a2SApple OSS Distributions# Same helper used in execperf, different build system. 1823*043036a2SApple OSS Distributionsstatic_binary: ../tools/tests/execperf/exit-asm.S 1824*043036a2SApple OSS Distributions $(CC) $(DT_CFLAGS) $(CFLAGS) $(filter-out -l%,$(DT_LDFLAGS) $(LDFLAGS) $(OTHER_LDFLAGS)) $< -o $(SYMROOT)/static_binary -static -nostartfiles -nodefaultlibs -Wl,-version_load_command -Wl,-segalign,0x4000 -e _main 1825*043036a2SApple OSS Distributions CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/static_binary 1826*043036a2SApple OSS Distributions 1827*043036a2SApple OSS Distributionsinstall-static_binary: static_binary 1828*043036a2SApple OSS Distributions mkdir -p $(INSTALLDIR) 1829*043036a2SApple OSS Distributions cp $(SYMROOT)/static_binary $(INSTALLDIR) 1830*043036a2SApple OSS Distributions 1831*043036a2SApple OSS DistributionsCUSTOM_TARGETS += static_binary 1832*043036a2SApple OSS DistributionsEXCLUDED_SOURCES += static_binary.c 1833*043036a2SApple OSS Distributions 1834*043036a2SApple OSS Distributionstest_static_binary_csflags: static_binary 1835*043036a2SApple OSS Distributionstest_static_binary_csflags: OTHER_LDFLAGS += -ldarwintest_utils 1836*043036a2SApple OSS Distributions 1837*043036a2SApple OSS Distributions 1838*043036a2SApple OSS Distributionslibmalloc_apple_array: CODE_SIGN_ENTITLEMENTS = entitlements/libmalloc_apple_array.entitlements 1839*043036a2SApple OSS Distributionslibmalloc_apple_array: OTHER_CFLAGS += -DENTITLED=1 drop_priv.c test_utils.c 1840*043036a2SApple OSS Distributionslibmalloc_apple_array: OTHER_LDFLAGS += -ldarwintest_utils 1841*043036a2SApple OSS Distributionslibmalloc_apple_array: libmalloc_apple_array.c print_apple_array print_apple_array_HR1 print_apple_array_HR2 print_apple_array_hardened_proc print_apple_array_hardened_proc_security print_apple_array_hardened_heap print_apple_array_hardened_heap_security 1842*043036a2SApple OSS Distributions $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/$@ 1843*043036a2SApple OSS Distributions env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none --entitlements $(CODE_SIGN_ENTITLEMENTS) $(SYMROOT)/$@; 1844*043036a2SApple OSS Distributions 1845*043036a2SApple OSS Distributionslibmalloc_apple_array_unentitled: OTHER_CFLAGS += drop_priv.c test_utils.c 1846*043036a2SApple OSS Distributionslibmalloc_apple_array_unentitled: OTHER_LDFLAGS += -ldarwintest_utils 1847*043036a2SApple OSS Distributionslibmalloc_apple_array_unentitled: libmalloc_apple_array.c print_apple_array print_apple_array_HR1 print_apple_array_HR2 print_apple_array_hardened_proc print_apple_array_hardened_heap 1848*043036a2SApple OSS Distributions $(CC) $(DT_CFLAGS) -I $(OBJROOT) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $(OTHER_CFLAGS) $< -o $(SYMROOT)/$@ 1849*043036a2SApple OSS Distributions env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@; 1850*043036a2SApple OSS Distributions 1851*043036a2SApple OSS DistributionsCUSTOM_TARGETS += print_apple_array 1852*043036a2SApple OSS Distributionsprint_apple_array: print_apple_array.c 1853*043036a2SApple OSS Distributions $(CC) $(DT_CFLAGS) -I $(OBJROOT) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $^ -o $(SYMROOT)/$@ 1854*043036a2SApple OSS Distributions env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@; 1855*043036a2SApple OSS Distributions 1856*043036a2SApple OSS DistributionsCUSTOM_TARGETS += print_apple_array_HR1 1857*043036a2SApple OSS Distributionsprint_apple_array_HR1: CODE_SIGN_ENTITLEMENTS=entitlements/enhanced-security-binary-entitlements-1.plist 1858*043036a2SApple OSS Distributionsprint_apple_array_HR1: print_apple_array.c 1859*043036a2SApple OSS Distributions $(CC) $(DT_CFLAGS) -I $(OBJROOT) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $^ -o $(SYMROOT)/$@ 1860*043036a2SApple OSS Distributions env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --entitlements $(SRCROOT)/$(CODE_SIGN_ENTITLEMENTS) --timestamp=none $(SYMROOT)/$@; 1861*043036a2SApple OSS Distributions 1862*043036a2SApple OSS DistributionsCUSTOM_TARGETS += print_apple_array_HR2 1863*043036a2SApple OSS Distributionsprint_apple_array_HR2: CODE_SIGN_ENTITLEMENTS=entitlements/enhanced-security-binary-entitlements-2.plist 1864*043036a2SApple OSS Distributionsprint_apple_array_HR2: print_apple_array.c 1865*043036a2SApple OSS Distributions $(CC) $(DT_CFLAGS) -I $(OBJROOT) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $^ -o $(SYMROOT)/$@ 1866*043036a2SApple OSS Distributions env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --entitlements $(SRCROOT)/$(CODE_SIGN_ENTITLEMENTS) --timestamp=none $(SYMROOT)/$@; 1867*043036a2SApple OSS Distributions 1868*043036a2SApple OSS DistributionsCUSTOM_TARGETS += print_apple_array_hardened_proc 1869*043036a2SApple OSS Distributionsprint_apple_array_hardened_proc: CODE_SIGN_ENTITLEMENTS=entitlements/hardened-proc.entitlements 1870*043036a2SApple OSS Distributionsprint_apple_array_hardened_proc: print_apple_array.c 1871*043036a2SApple OSS Distributions $(CC) $(DT_CFLAGS) -I $(OBJROOT) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $^ -o $(SYMROOT)/$@ 1872*043036a2SApple OSS Distributions env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --entitlements $(SRCROOT)/$(CODE_SIGN_ENTITLEMENTS) --timestamp=none $(SYMROOT)/$@; 1873*043036a2SApple OSS Distributions 1874*043036a2SApple OSS DistributionsCUSTOM_TARGETS += print_apple_array_hardened_proc_security 1875*043036a2SApple OSS Distributionsprint_apple_array_hardened_proc_security: CODE_SIGN_ENTITLEMENTS=entitlements/hardened-proc-security.entitlements 1876*043036a2SApple OSS Distributionsprint_apple_array_hardened_proc_security: print_apple_array.c 1877*043036a2SApple OSS Distributions $(CC) $(DT_CFLAGS) -I $(OBJROOT) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $^ -o $(SYMROOT)/$@ 1878*043036a2SApple OSS Distributions env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --entitlements $(SRCROOT)/$(CODE_SIGN_ENTITLEMENTS) --timestamp=none $(SYMROOT)/$@; 1879*043036a2SApple OSS Distributions 1880*043036a2SApple OSS Distributions 1881*043036a2SApple OSS DistributionsCUSTOM_TARGETS += print_apple_array_hardened_heap 1882*043036a2SApple OSS Distributionsprint_apple_array_hardened_heap: CODE_SIGN_ENTITLEMENTS=entitlements/hardened-heap.entitlements 1883*043036a2SApple OSS Distributionsprint_apple_array_hardened_heap: print_apple_array.c 1884*043036a2SApple OSS Distributions $(CC) $(DT_CFLAGS) -I $(OBJROOT) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $^ -o $(SYMROOT)/$@ 1885*043036a2SApple OSS Distributions env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --entitlements $(SRCROOT)/$(CODE_SIGN_ENTITLEMENTS) --timestamp=none $(SYMROOT)/$@; 1886*043036a2SApple OSS Distributions 1887*043036a2SApple OSS DistributionsCUSTOM_TARGETS += print_apple_array_hardened_heap_security 1888*043036a2SApple OSS Distributionsprint_apple_array_hardened_heap_security: CODE_SIGN_ENTITLEMENTS=entitlements/hardened-heap-security.entitlements 1889*043036a2SApple OSS Distributionsprint_apple_array_hardened_heap_security: print_apple_array.c 1890*043036a2SApple OSS Distributions $(CC) $(DT_CFLAGS) -I $(OBJROOT) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $^ -o $(SYMROOT)/$@ 1891*043036a2SApple OSS Distributions env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --entitlements $(SRCROOT)/$(CODE_SIGN_ENTITLEMENTS) --timestamp=none $(SYMROOT)/$@; 1892*043036a2SApple OSS Distributions 1893*043036a2SApple OSS Distributionsinstall-print_apple_array: print_apple_array 1894*043036a2SApple OSS Distributions mkdir -p $(INSTALLDIR)/tools 1895*043036a2SApple OSS Distributions cp $(SYMROOT)/print_apple_array $(INSTALLDIR)/tools/ 1896*043036a2SApple OSS Distributions 1897*043036a2SApple OSS Distributionsinstall-print_apple_array_HR1: print_apple_array_HR1 1898*043036a2SApple OSS Distributions mkdir -p $(INSTALLDIR)/tools 1899*043036a2SApple OSS Distributions cp $(SYMROOT)/print_apple_array_HR1 $(INSTALLDIR)/tools/ 1900*043036a2SApple OSS Distributions 1901*043036a2SApple OSS Distributionsinstall-print_apple_array_HR2: print_apple_array_HR2 1902*043036a2SApple OSS Distributions mkdir -p $(INSTALLDIR)/tools 1903*043036a2SApple OSS Distributions cp $(SYMROOT)/print_apple_array_HR2 $(INSTALLDIR)/tools/ 1904*043036a2SApple OSS Distributions 1905*043036a2SApple OSS Distributionsinstall-print_apple_array_hardened_proc: print_apple_array_hardened_proc 1906*043036a2SApple OSS Distributions mkdir -p $(INSTALLDIR)/tools 1907*043036a2SApple OSS Distributions cp $(SYMROOT)/print_apple_array_hardened_proc $(INSTALLDIR)/tools/ 1908*043036a2SApple OSS Distributions 1909*043036a2SApple OSS Distributionsinstall-print_apple_array_hardened_proc_security: print_apple_array_hardened_proc_security 1910*043036a2SApple OSS Distributions mkdir -p $(INSTALLDIR)/tools 1911*043036a2SApple OSS Distributions cp $(SYMROOT)/print_apple_array_hardened_proc_security $(INSTALLDIR)/tools/ 1912*043036a2SApple OSS Distributions 1913*043036a2SApple OSS Distributionsinstall-print_apple_array_hardened_heap: print_apple_array_hardened_heap 1914*043036a2SApple OSS Distributions mkdir -p $(INSTALLDIR)/tools 1915*043036a2SApple OSS Distributions cp $(SYMROOT)/print_apple_array_hardened_heap $(INSTALLDIR)/tools/ 1916*043036a2SApple OSS Distributions 1917*043036a2SApple OSS Distributions 1918*043036a2SApple OSS Distributionsinstall-print_apple_array_hardened_heap_security: print_apple_array_hardened_heap_security 1919*043036a2SApple OSS Distributions mkdir -p $(INSTALLDIR)/tools 1920*043036a2SApple OSS Distributions cp $(SYMROOT)/print_apple_array_hardened_heap_security $(INSTALLDIR)/tools/ 1921*043036a2SApple OSS Distributions 1922*043036a2SApple OSS Distributionspersona: CODE_SIGN_ENTITLEMENTS = persona.entitlements 1923*043036a2SApple OSS Distributionspersona_adoption: CODE_SIGN_ENTITLEMENTS = persona_adoption.entitlements 1924*043036a2SApple OSS Distributions 1925*043036a2SApple OSS DistributionsOTHER_TEST_TARGETS += libmalloc_apple_array libmalloc_apple_array_unentitled 1926*043036a2SApple OSS Distributions 1927*043036a2SApple OSS Distributionsentropy: OTHER_CFLAGS += -framework perfdata 1928*043036a2SApple OSS Distributions 1929*043036a2SApple OSS Distributionsdebug_enable_syscall_rejection: OTHER_LDFLAGS += -ldarwintest_utils 1930*043036a2SApple OSS Distributions 1931*043036a2SApple OSS Distributionsthread_set_state_arm64_cpsr: CODE_SIGN_ENTITLEMENTS = entitlements/thread_set_state.entitlement 1932*043036a2SApple OSS Distributions 1933*043036a2SApple OSS Distributionsvm/app_swap: OTHER_LDFLAGS += -ldarwintest_utils 1934*043036a2SApple OSS Distributions 1935*043036a2SApple OSS DistributionsCUSTOM_TARGETS += debug_syscall_rejection_helper 1936*043036a2SApple OSS Distributionsdebug_syscall_rejection_helper: debug_syscall_rejection_helper.c 1937*043036a2SApple OSS Distributions $(CC) $(OTHER_CFLAGS) $(CFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $< -o $(SYMROOT)/$@; \ 1938*043036a2SApple OSS Distributions echo $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@; \ 1939*043036a2SApple OSS Distributions env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@; 1940*043036a2SApple OSS Distributions 1941*043036a2SApple OSS Distributions 1942*043036a2SApple OSS Distributionsinstall-debug_syscall_rejection_helper: debug_syscall_rejection_helper 1943*043036a2SApple OSS Distributions mkdir -p $(INSTALLDIR) 1944*043036a2SApple OSS Distributions cp $(SYMROOT)/debug_syscall_rejection_helper $(INSTALLDIR)/ 1945*043036a2SApple OSS Distributions 1946*043036a2SApple OSS Distributionsfile_leases: OTHER_CFLAGS += test_utils.c 1947*043036a2SApple OSS Distributionsfile_leases: OTHER_LDFLAGS += -ldarwintest_utils 1948*043036a2SApple OSS Distributionsfile_leases: CODE_SIGN_ENTITLEMENTS = file_leases.entitlements 1949*043036a2SApple OSS Distributions 1950*043036a2SApple OSS Distributionsiopolicy: OTHER_LDFLAGS += -ldarwintest_utils 1951*043036a2SApple OSS Distributionsiopolicy: CODE_SIGN_ENTITLEMENTS = iopolicy.entitlements 1952*043036a2SApple OSS Distributions 1953*043036a2SApple OSS DistributionsINCLUDED_TEST_SOURCE_DIRS += vfs 1954*043036a2SApple OSS Distributionsvfs/freeable_vnodes: OTHER_LDFLAGS += -ldarwintest_utils 1955*043036a2SApple OSS Distributionsvfs/statfs_ext: OTHER_LDFLAGS += -lsandbox 1956*043036a2SApple OSS Distributionsvfs/sandbox_fstat: OTHER_LDFLAGS += -lsandbox 1957*043036a2SApple OSS Distributionsvfs/named_fork_path: OTHER_LDFLAGS += -lsandbox 1958*043036a2SApple OSS Distributionsvfs/sandbox_type_error: OTHER_LDFLAGS += -lsandbox 1959*043036a2SApple OSS Distributionsvfs/sandbox_appledouble_write: OTHER_LDFLAGS += -lsandbox 1960*043036a2SApple OSS Distributions 1961*043036a2SApple OSS Distributions# tests/vm/configurator_*.c use the VM configurator 1962*043036a2SApple OSS Distributions 1963*043036a2SApple OSS DistributionsVM_CONFIGURATOR_SRCS = $(wildcard vm/configurator_*.c) 1964*043036a2SApple OSS DistributionsVM_CONFIGURATOR_TARGETS = $(VM_CONFIGURATOR_SRCS:%.c=%) 1965*043036a2SApple OSS Distributions 1966*043036a2SApple OSS Distributions$(VM_CONFIGURATOR_TARGETS): vm/configurator/vm_configurator.c 1967*043036a2SApple OSS Distributions$(VM_CONFIGURATOR_TARGETS): vm/configurator/vm_configurator.h vm/configurator/vm_configurator_tests.h 1968*043036a2SApple OSS Distributions$(VM_CONFIGURATOR_TARGETS): OTHER_CFLAGS += -Wall -Wextra -g 1969*043036a2SApple OSS Distributions 1970*043036a2SApple OSS Distributions# exception handling helpers 1971*043036a2SApple OSS Distributions$(VM_CONFIGURATOR_TARGETS): exc_guard_helper.c try_read_write.c exc_helpers.c test_utils.c excserver 1972*043036a2SApple OSS Distributions$(VM_CONFIGURATOR_TARGETS): OTHER_CFLAGS += $(OBJROOT)/excserver.c -I $(OBJROOT) 1973*043036a2SApple OSS Distributions$(VM_CONFIGURATOR_TARGETS): OTHER_LDFLAGS += -ldarwintest_utils 1974*043036a2SApple OSS Distributions$(VM_CONFIGURATOR_TARGETS): CODE_SIGN_ENTITLEMENTS = entitlements/set_exception_port.entitlement 1975*043036a2SApple OSS Distributions 1976*043036a2SApple OSS Distributions# Convenience target to build all tests that use vm_configurator.c 1977*043036a2SApple OSS Distributions.PHONY: all-vm-configurator-tests 1978*043036a2SApple OSS Distributionsall-vm-configurator-tests: $(VM_CONFIGURATOR_TARGETS) 1979*043036a2SApple OSS Distributions 1980*043036a2SApple OSS Distributions# Convenience target to list all test executables that use vm_configurator.c 1981*043036a2SApple OSS Distributions.PHONY: list-all-vm-configurator-executables 1982*043036a2SApple OSS Distributionslist-all-vm-configurator-executables: 1983*043036a2SApple OSS Distributions @ echo $(addprefix $(SYMROOT)/,$(VM_CONFIGURATOR_TARGETS)) 1984*043036a2SApple OSS Distributions 1985*043036a2SApple OSS Distributionsvm/corpse_footprint: OTHER_LDFLAGS += -ldarwintest_utils 1986*043036a2SApple OSS Distributions 1987*043036a2SApple OSS DistributionsEXCLUDED_SOURCES += constrained_ctypes_tests.c 1988*043036a2SApple OSS DistributionsCUSTOM_TARGETS += constrained_ctypes_tests_enabled constrained_ctypes_tests_enacted constrained_ctypes_tests_disabled 1989*043036a2SApple OSS Distributionsconstrained_ctypes_tests_enabled: OTHER_CFLAGS += -D__CCT_TEST_ENABLED 1990*043036a2SApple OSS Distributionsconstrained_ctypes_tests_enabled: OTHER_LDFLAGS += -ldarwintest_utils 1991*043036a2SApple OSS Distributionsconstrained_ctypes_tests_enabled: constrained_ctypes_tests.c 1992*043036a2SApple OSS Distributions $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) constrained_ctypes_tests.c -o $(SYMROOT)/constrained_ctypes_tests_enabled 1993*043036a2SApple OSS Distributions env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/constrained_ctypes_tests_enabled; 1994*043036a2SApple OSS Distributions 1995*043036a2SApple OSS Distributionsinstall-constrained_ctypes_tests_enabled: constrained_ctypes_tests_enabled 1996*043036a2SApple OSS Distributions mkdir -p $(INSTALLDIR) 1997*043036a2SApple OSS Distributions cp $(SYMROOT)/constrained_ctypes_tests_enabled $(INSTALLDIR)/ 1998*043036a2SApple OSS Distributions 1999*043036a2SApple OSS Distributionsconstrained_ctypes_tests_enacted: OTHER_CFLAGS += -D__CCT_TEST_ENABLED 2000*043036a2SApple OSS Distributionsconstrained_ctypes_tests_enacted: OTHER_CFLAGS += -D__CCT_TEST_ENACTED 2001*043036a2SApple OSS Distributionsconstrained_ctypes_tests_enacted: OTHER_CFLAGS += -fbounds-safety 2002*043036a2SApple OSS Distributionsconstrained_ctypes_tests_enacted: OTHER_LDFLAGS += -ldarwintest_utils 2003*043036a2SApple OSS Distributionsconstrained_ctypes_tests_enacted: constrained_ctypes_tests.c 2004*043036a2SApple OSS Distributions $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) constrained_ctypes_tests.c -o $(SYMROOT)/constrained_ctypes_tests_enacted 2005*043036a2SApple OSS Distributions env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/constrained_ctypes_tests_enacted; 2006*043036a2SApple OSS Distributions 2007*043036a2SApple OSS Distributionsinstall-constrained_ctypes_tests_enacted: constrained_ctypes_tests_enacted 2008*043036a2SApple OSS Distributions mkdir -p $(INSTALLDIR) 2009*043036a2SApple OSS Distributions cp $(SYMROOT)/constrained_ctypes_tests_enacted $(INSTALLDIR)/ 2010*043036a2SApple OSS Distributions 2011*043036a2SApple OSS Distributions 2012*043036a2SApple OSS Distributionsconstrained_ctypes_tests_disabled: OTHER_LDFLAGS += -ldarwintest_utils 2013*043036a2SApple OSS Distributionsconstrained_ctypes_tests_disabled: constrained_ctypes_tests.c 2014*043036a2SApple OSS Distributions $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) constrained_ctypes_tests.c -o $(SYMROOT)/constrained_ctypes_tests_disabled 2015*043036a2SApple OSS Distributions env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/constrained_ctypes_tests_disabled; 2016*043036a2SApple OSS Distributions 2017*043036a2SApple OSS Distributionsinstall-constrained_ctypes_tests_disabled: constrained_ctypes_tests_disabled 2018*043036a2SApple OSS Distributions mkdir -p $(INSTALLDIR) 2019*043036a2SApple OSS Distributions cp $(SYMROOT)/constrained_ctypes_tests_disabled $(INSTALLDIR)/ 2020*043036a2SApple OSS Distributions 2021*043036a2SApple OSS Distributionstask_suspend_stats: OTHER_LDFLAGS += -ldarwintest_utils 2022*043036a2SApple OSS Distributionstask_suspend_stats: CODE_SIGN_ENTITLEMENTS = task_for_pid_entitlement.plist 2023*043036a2SApple OSS Distributions 2024*043036a2SApple OSS Distributionsexec_set_proc_name: OTHER_LDFLAGS += -ldarwintest_utils 2025*043036a2SApple OSS Distributions 2026*043036a2SApple OSS Distributions 2027*043036a2SApple OSS Distributionsinclude $(DEVELOPER_DIR)/AppleInternal/Makefiles/darwintest/Makefile.targets 2028*043036a2SApple OSS Distributions 2029*043036a2SApple OSS Distributionsexception_ports_info: CODE_SIGN_ENTITLEMENTS = entitlements/set_exception_port.entitlement 2030*043036a2SApple OSS Distributions 2031*043036a2SApple OSS Distributionsvfs/longpaths: vfs/longpaths.c 2032*043036a2SApple OSS Distributionsvfs/longpaths: OTHER_LDFLAGS += -ldarwintest_utils 2033*043036a2SApple OSS Distributionsvfs/longpaths: CODE_SIGN_ENTITLEMENTS = vfs/longpaths.entitlements 2034*043036a2SApple OSS Distributions 2035*043036a2SApple OSS Distributionsvfs/devfs_fdesc: vfs/devfs_fdesc.c 2036*043036a2SApple OSS Distributionsvfs/devfs_fdesc: CODE_SIGN_ENTITLEMENTS = vfs/devfs_fdesc.entitlements 2037*043036a2SApple OSS Distributions 2038*043036a2SApple OSS Distributionsvfs/openbyid_stress: vfs/openbyid_stress.c 2039*043036a2SApple OSS Distributionsvfs/openbyid_stress: CODE_SIGN_ENTITLEMENTS = vfs/openbyid_stress.entitlements 2040*043036a2SApple OSS Distributions 2041*043036a2SApple OSS DistributionsOTHER_TEST_TARGETS += trial_experiment_factors_entitled 2042*043036a2SApple OSS Distributionstrial_experiment_factors_entitled: OTHER_CFLAGS += -DENTITLED=1 2043*043036a2SApple OSS Distributionstrial_experiment_factors_entitled: CODE_SIGN_ENTITLEMENTS=kern-trial.entitlements 2044*043036a2SApple OSS Distributionstrial_experiment_factors_entitled: trial_experiment_factors.c 2045*043036a2SApple OSS Distributions $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $^ -o $(SYMROOT)/$@ 2046*043036a2SApple OSS Distributions env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none --entitlements $(CODE_SIGN_ENTITLEMENTS) $(SYMROOT)/$@; 2047*043036a2SApple OSS Distributions 2048*043036a2SApple OSS Distributionsmemorystatus_experiment_factors: CODESIGN_ENTITLEMENTS=./memorystatus/memorystatus_experiment_factors.entitlements 2049*043036a2SApple OSS Distributionsmemorystatus_experiment_factors: memorystatus/memorystatus_experiment_factors.c 2050*043036a2SApple OSS Distributions $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $^ -o $(SYMROOT)/$@ 2051*043036a2SApple OSS Distributions $(ENV) CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none --entitlements $(CODESIGN_ENTITLEMENTS) $(SYMROOT)/$@; 2052*043036a2SApple OSS Distributions 2053*043036a2SApple OSS Distributionsifeq ($(PLATFORM),MacOSX) 2054*043036a2SApple OSS DistributionsCUSTOM_TARGETS += nox86exec_helper 2055*043036a2SApple OSS Distributions 2056*043036a2SApple OSS Distributionsnox86exec_helper: INVALID_ARCHS = arm64e arm64 2057*043036a2SApple OSS Distributionsnox86exec_helper: nox86exec_helper.c 2058*043036a2SApple OSS Distributions $(CC) $(DT_CFLAGS) $(OTHER_CFLAGS) $(CFLAGS) $(DT_LDFLAGS) $(OTHER_LDFLAGS) $(LDFLAGS) $^ -o $(SYMROOT)/$@ 2059*043036a2SApple OSS Distributions env CODESIGN_ALLOCATE=$(CODESIGN_ALLOCATE) $(CODESIGN) --force --sign - --timestamp=none $(SYMROOT)/$@; 2060*043036a2SApple OSS Distributions 2061*043036a2SApple OSS Distributionsinstall-posix_spawn_alt_rosetta_helper: nox86exec_helper 2062*043036a2SApple OSS Distributions mkdir -p $(INSTALLDIR) 2063*043036a2SApple OSS Distributions cp $(SYMROOT)/nox86exec_helper $(INSTALLDIR)/ 2064*043036a2SApple OSS Distributionsendif 2065*043036a2SApple OSS Distributions 2066*043036a2SApple OSS Distributionsvm/memorystatus_rearm: excserver 2067*043036a2SApple OSS Distributionsvm/memorystatus_rearm: OTHER_CFLAGS += $(OBJROOT)/excserver.c -I $(OBJROOT) 2068*043036a2SApple OSS Distributionsvm/memorystatus_rearm: CODE_SIGN_ENTITLEMENTS = vm/memorystatus_rearm.entitlements 2069*043036a2SApple OSS Distributions 2070*043036a2SApple OSS Distributionsksancov: OTHER_LDFLAGS += -framework IOKit 2071*043036a2SApple OSS Distributionsksancov: CODE_SIGN_ENTITLEMENTS = ksancov.entitlements 2072