Handle missing dist directory when --skip-apex is used.
Test: rm -r out/dist
art/build/build-art-module.sh --skip-apex
packages/modules/ArtPrebuilt/update-art-module-prebuilts.py \
--local-dist=out/dist --skip-cls --skip-apex
Bug: 172480615
Change-Id: Ia27308b93a288ee3693f2f077698074807023c7a
diff --git a/build/build-art-module.sh b/build/build-art-module.sh
index 8dc4743..1b9514e 100755
--- a/build/build-art-module.sh
+++ b/build/build-art-module.sh
@@ -122,5 +122,6 @@
${MODULE_SDKS_AND_EXPORTS[*]}
rm -rf ${DIST_DIR}/mainline-sdks
- echo_and_run cp -r ${OUT_DIR}/soong/mainline-sdks ${DIST_DIR}
+ mkdir -p ${DIST_DIR}
+ echo_and_run cp -r ${OUT_DIR}/soong/mainline-sdks ${DIST_DIR}/
fi