5.12.12: LLVM=1 causes undefined reference to sched_cpu_util

Building the kernel with Clang/LLVM tools via LLVM=1 LLVM_IAS=1 causes an undefined reference error with or without LTO. Also an issue with Clang & ld.bfd

  LD      .tmp_vmlinux.kallsyms1
ld.lld: error: undefined symbol: sched_cpu_util
>>> referenced by cpufreq_cooling.c
>>>               thermal/cpufreq_cooling.o:(cpufreq_get_requested_power) in archive drivers/built-in.a
make: *** [Makefile:1204: vmlinux] Error 1

.config

Edited by James Beddek