aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtem Serov <artem.serov@linaro.org>2022-01-26 16:24:08 +0000
committerArtem Serov <artem.serov@linaro.org>2022-01-28 17:56:42 +0000
commit99702dd4fe1c3c67c851f5563c828ee7929b0948 (patch)
treef1b28f950823aa2d9b3b03b509ada122ce9dc34f
parent6cdfba9a141cc70c14ad862c26b88fdbf5e25fb8 (diff)
downloadart-testing-99702dd4fe1c3c67c851f5563c828ee7929b0948.tar.gz
Remove javac-helper.sh use and adjust BCP.HEADmaster
This patch adjusts build.sh to account for javac-helper.sh being removed from ./art. Now we have to use javac directly and manually handle the compile-time bootclasspath on host using JAVAC_BOOTCLASSPATH env variable - to provide path for the ART core modules. Test: ./test/test.py. Test: running art-build-scripts. Change-Id: Ifcc0db66d593c68a9917cefe8a909613cde34b1a
-rwxr-xr-xbuild.sh25
1 files changed, 14 insertions, 11 deletions
diff --git a/build.sh b/build.sh
index 95bc6f9..8766a63 100755
--- a/build.sh
+++ b/build.sh
@@ -207,16 +207,21 @@ if [[ -f "${jar_files[0]}" ]]; then
done
fi
-javac_cmd_options=("-encoding" "UTF-8" \
- "-cp" "${DIR_BENCHMARKS}:${DIR_BUILD}/classes" \
- "-d" "$DIR_BUILD/classes/" \
- $JAVA_FRAMEWORK_FILES \
- $JAVA_BENCHMARK_FILES)
+javac_cmd_options=()
+
+# javac is used both for the target and host builds; for target we also need to set
+# the correct bootclasspath.
+if [[ "$TARGET_BUILD" == "true" && -n "${JAVAC_BOOTCLASSPATH}" ]]; then
+ javac_cmd_options+="-bootclasspath" "${JAVAC_BOOTCLASSPATH}"
+fi
+
+javac_cmd_options+=("-encoding" "UTF-8")
+javac_cmd_options+=("-cp" "${DIR_BENCHMARKS}:${DIR_BUILD}/classes")
+javac_cmd_options+=( "-d" "$DIR_BUILD/classes/")
+javac_cmd_options+=($JAVA_FRAMEWORK_FILES)
+javac_cmd_options+=($JAVA_BENCHMARK_FILES)
DX=$(which dx)
-# Use different javac for target and host builds:
-# For target: the art/tools/javac-helper.sh is used to invoke javac with the correct bootclasspath.
-# For host: javac from PATH is used.
if [ $TARGET_BUILD = "true" ] || [ -n "$DX" ]; then
if [ $TARGET_BUILD = "false" ]; then
info "This is not a target build (\`-t\` was not specified), but" \
@@ -225,9 +230,7 @@ if [ $TARGET_BUILD = "true" ] || [ -n "$DX" ]; then
if [[ -d "${DIR_BENCHMARKS}"/resources ]]; then
tar cfv $DIR_BUILD/resources.tar -C "${DIR_BENCHMARKS}" ./resources
fi
- verbose_safe ${ANDROID_BUILD_TOP}/art/tools/javac-helper.sh --show-commands --core-only \
- $CROSS_COMPILE_FLAGS \
- "${javac_cmd_options[@]}"
+ verbose_safe javac $CROSS_COMPILE_FLAGS "${javac_cmd_options[@]}"
if hash dx 2> /dev/null; then
# Use custom Java options to compile benchmarks that require more memory.
export _JAVA_OPTIONS="-Xms512m -Xmx2048m -XX:MaxPermSize=512m"