| # Copyright (c) 2016, the R8 project authors. Please see the AUTHORS file |
| # for details. All rights reserved. Use of this source code is governed by a |
| # BSD-style license that can be found in the LICENSE file. |
| if [ -z "$R8_HOME" ]; then |
| R8_HOME="$(realpath $(dirname ${BASH_SOURCE[0]})/..)" |
| TOOLSDIR=$R8_HOME/tools/linux |
| echo "Usage: $(basename $0) <dex files>" |
| TMPDIR=$(mktemp -d "${TMP:-/tmp/}$(basename $0).XXXXXXXXXXXX") |
| JARFILE="$TMPDIR/all.jar" |
| EXT=$(echo "$BASE" | cut -d '.' -f 2) |
| if [ "$EXT" = "dex" ]; then |
| (cd "$DIR" && zip "$JARFILE" "$BASE") |
| echo "Warning: ignoring non-dex file argument when dex2oat'ing multiple files." |
| LD_LIBRARY_PATH=$TOOLSDIR/art/lib $TOOLSDIR/art/bin/dex2oat \ |
| --android-root=$TOOLSDIR/art/product/angler \ |
| --runtime-arg -Xnorelocate \ |
| --boot-image=$TOOLSDIR/art/product/angler/system/framework/boot.art \ |
| --instruction-set=arm64 \ |
| --compiler-filter=interpret-only |