• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/bash
2#
3# Copyright 2017 The Android Open Source Project
4#
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9#      http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16
17#
18# Perform a mostly normal build.
19# Since this test imports 'dalvik.annotation.optimization.FastNative' (and CriticalNative),
20# we put them to src-aotex/ to allow the annotations to be used at javac-compile time,
21# but remove compiled *-aotex* artifacts afterwards.
22#
23# This enables the test to compile with vanilla RI javac and work on either ART or RI.
24# TODO: The test is currently disabled for RI anyway, presumably because @CriticalNative
25# has a different ABI and cannot be tested on RI.
26#
27
28# Stop on failure.
29set -e
30
31# Use release mode to check optimizations do not break JNI.
32export D8_FLAGS=--release
33./default-build "$@"
34
35# Remove the *-aotex build artifacts (but keep src-aotex) with dalvik.* annotations.
36rm -rf classes-aotex classes-aotex.jar $TEST_NAME-aotex.jar
37