162306a36Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0
262306a36Sopenharmony_ci
362306a36Sopenharmony_ci# The compilers are complaining about unused variables inside an if(0) scope
462306a36Sopenharmony_ci# block. This is daft, shut them up.
562306a36Sopenharmony_ciccflags-y += $(call cc-disable-warning, unused-but-set-variable)
662306a36Sopenharmony_ci
762306a36Sopenharmony_ci# These files are disabled because they produce non-interesting flaky coverage
862306a36Sopenharmony_ci# that is not a function of syscall inputs. E.g. involuntary context switches.
962306a36Sopenharmony_ciKCOV_INSTRUMENT := n
1062306a36Sopenharmony_ci
1162306a36Sopenharmony_ci# Disable KCSAN to avoid excessive noise and performance degradation. To avoid
1262306a36Sopenharmony_ci# false positives ensure barriers implied by sched functions are instrumented.
1362306a36Sopenharmony_ciKCSAN_SANITIZE := n
1462306a36Sopenharmony_ciKCSAN_INSTRUMENT_BARRIERS := y
1562306a36Sopenharmony_ci
1662306a36Sopenharmony_ciifneq ($(CONFIG_SCHED_OMIT_FRAME_POINTER),y)
1762306a36Sopenharmony_ci# According to Alan Modra <alan@linuxcare.com.au>, the -fno-omit-frame-pointer is
1862306a36Sopenharmony_ci# needed for x86 only.  Why this used to be enabled for all architectures is beyond
1962306a36Sopenharmony_ci# me.  I suspect most platforms don't need this, but until we know that for sure
2062306a36Sopenharmony_ci# I turn this off for IA-64 only.  Andreas Schwab says it's also needed on m68k
2162306a36Sopenharmony_ci# to get a correct value for the wait-channel (WCHAN in ps). --davidm
2262306a36Sopenharmony_ciCFLAGS_core.o := $(PROFILING) -fno-omit-frame-pointer
2362306a36Sopenharmony_ciendif
2462306a36Sopenharmony_ci
2562306a36Sopenharmony_ci#
2662306a36Sopenharmony_ci# Build efficiency:
2762306a36Sopenharmony_ci#
2862306a36Sopenharmony_ci# These compilation units have roughly the same size and complexity - so their
2962306a36Sopenharmony_ci# build parallelizes well and finishes roughly at once:
3062306a36Sopenharmony_ci#
3162306a36Sopenharmony_ciobj-y += core.o
3262306a36Sopenharmony_ciobj-y += fair.o
3362306a36Sopenharmony_ciobj-y += build_policy.o
3462306a36Sopenharmony_ciobj-y += build_utility.o
3562306a36Sopenharmony_ciobj-$(CONFIG_SCHED_WALT) += walt.o
3662306a36Sopenharmony_ciobj-$(CONFIG_SCHED_RTG) += rtg/
3762306a36Sopenharmony_ciobj-$(CONFIG_SCHED_RUNNING_AVG) += sched_avg.o
3862306a36Sopenharmony_ciobj-$(CONFIG_SCHED_CORE_CTRL) += core_ctl.o
39