######################################################################
#BEGIN Machine dependent Makefile fragment for x86_64
######################################################################
CWARNFLAGS = $(CWARNFLAGS_STD) -Wno-atomic-implicit-seq-cst
# Files that must go in the __HIB segment:
UNCONFIGURED_HIB_FILES= \
WKdmDecompress_new.o \
WKdmData_new.o \
hibernate_restore.o \
bcopy.o \
bzero.o
HIB_FILES=$(filter $(UNCONFIGURED_HIB_FILES),$(OBJS))
# Unconfigured __HIB files must be Mach-O for "setsegname"
WKdmDecompress_new.o_CFLAGS_ADD += -fno-stack-protector -fno-stack-check $(CFLAGS_NOLTO_FLAG)
WKdmData_new.o_CFLAGS_ADD += -fno-stack-protector -fno-stack-check $(CFLAGS_NOLTO_FLAG)
hibernate_restore.o_CFLAGS_ADD += -fno-stack-protector -fno-stack-check $(CFLAGS_NOLTO_FLAG)
bcopy.o_CFLAGS_ADD += -fno-stack-protector -fno-stack-check $(CFLAGS_NOLTO_FLAG)
bzero.o_CFLAGS_ADD += -fno-stack-protector -fno-stack-check $(CFLAGS_NOLTO_FLAG)
fp_simd.o_SFLAGS_ADD += -mavx512f
# Profiling information and code coverage must be disabled for __HIB files (see rdar://104951137)
WKdmDecompress_new.o_CFLAGS_ADD += -fno-profile-instr-generate -fno-coverage-mapping
WKdmData_new.o_CFLAGS_ADD += -fno-profile-instr-generate -fno-coverage-mapping
hibernate_restore.o_CFLAGS_ADD += -fno-profile-instr-generate -fno-coverage-mapping
bcopy.o_CFLAGS_ADD += -fno-profile-instr-generate -fno-coverage-mapping
bzero.o_CFLAGS_ADD += -fno-profile-instr-generate -fno-coverage-mapping
# To appear at the beginning of the __HIB segment, emit
# as Mach-O so that the linker can enforce symbol order
boot_pt.o_CFLAGS_ADD += $(CFLAGS_NOLTO_FLAG)
# fast path lock C leaf functions must be built without stack frames
locks_i386_opt.o_CFLAGS_ADD += -momit-leaf-frame-pointer -O2
ifeq ($(KASAN),1)
# rdar://92180818: the fakestack implementation uses ticket locks
# so we need to disable stack use-after-return checks, to avoid deadlocks.
lock_ticket.o_CFLAGS_ADD += -fsanitize-address-use-after-return=never
endif
######################################################################
#END Machine dependent Makefile fragment for x86_64
######################################################################