I think the source of the problem is that head-y is not installed anywhere, but I don't know what to do about it.
Commands I used to compile
$ export ARCH=arm64
$ export CROSS_COMPILE=aarch64-linux-android-
$ cd msm-angler
$ make msm_defconfig
$ make
I did not use the git -checkout command because I just downloaded the tar.gz file from google git repository
Some warning appears when using the make msm_defconfig command.
arch/arm64/configs/msm_defconfig:431:
warning: override: reassigning to symbol LEDS_TRIGGERS
warning: (SND_SOC_APQ8084 && SND_SOC_MSM8X16 && SND_SOC_MSM8994) selects SND_SOC_CPE which has unmet direct dependencies (SOUND && !M68K && !UML && SND && SND_SOC && SND_SOC_WCD_CPE)
warning: (SND_SOC_QDSP6V2) selects SND_SOC_MSM_QDSP6V2_INTF which has unmet direct dependencies (SOUND && !M68K && !UML && SND && SND_SOC && MSM_QDSP6_APRV2)
warning: (ARCH_MSM) selects DEVFREQ_GOV_MSM_BW_HWMON which has unmet direct dependencies (PM_DEVFREQ && (ARCH_MSM_KRAIT || ARCH_MSM_BIMC_BWMON))
warning: (SND_SOC_QDSP6V2) selects SND_SOC_MSM_QDSP6V2_INTF which has unmet direct dependencies (SOUND && !M68K && !UML && SND && SND_SOC && MSM_QDSP6_APRV2)
warning: (SND_SOC_APQ8084 && SND_SOC_MSM8X16 && SND_SOC_MSM8994) selects SND_SOC_CPE which has unmet direct dependencies (SOUND && !M68K && !UML && SND && SND_SOC && SND_SOC_WCD_CPE)
warning: (ARCH_MSM) selects DEVFREQ_GOV_MSM_BW_HWMON which has unmet direct dependencies (PM_DEVFREQ && (ARCH_MSM_KRAIT || ARCH_MSM_BIMC_BWMON))
This is an error that occurs when running make
Makefile:796: *** multiple target patterns. Stop.
Here is line 796
vmlinux: scripts/link-vmlinux.sh $(vmlinux-deps) FORCE
Vmlinux-deps is indicated here (line 788)
vmlinux-deps := $(KBUILD_LDS) $(KBUILD_VMLINUX_INIT) $(KBUILD_VMLINUX_MAIN)
KBUILD_LDS, KBUILD_VMLINUX_INIT, and KBUILD_VMLINUX_MAIN (lines 781-783) are listed here.
export KBUILD_VMLIUX_INIT := $(head-y) $(init-y)
export KBUILD_VMLINUX_MAIN := $(core-y) $(libs-y) $(drivers-y) $(net-y)
export KBUILD_LDS := arch/$(SRCARCH)/kernel/vmlinux.lds
All * -y elements (except head-y) are located here (lines 525-529)
init-y := init/
drivers-y := drivers/ sound/ firmware/
net-y := net/
libs-y := lib/
core-y := usr/
, -, head-y, , , , , head-y.