I build AOSP on branch android-13.0.0_r41 with the following command:
. build/envsetup.sh
lunch aosp_arm-eng
m all -j$(nproc)
Some environment variables:
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=13
TARGET_PRODUCT=aosp_arm
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=generic
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-5.4.0-150-generic-x86_64-Ubuntu-20.04.5-LTS
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=TQ2A.230405.003.E1
OUT_DIR=out
Althought the HOST_CROSS_OS environment variable is set to windows, but no Windows binary is built. I search with find out -name '*.exe'
, and nothing is found. I also look for other targets of m
command, but can not find a suitable target. How can I build Windows binaries as well when building AOSP in Linux?
as per the official documents you still need to build the target win_sdk
and/or winsdk-tools
then you should be able to see the required output in out/host/**
directory.
Official ref: https://android.googlesource.com/platform/sdk/+/master/docs/howto_build_SDK.txt#110