blob: 8dfffc1cfa37b7ab2aad8a9f7c7c4c61b9a077bb [file] [log] [blame]
Michael Merg6bafd752024-02-12 13:52:00 +00001#!/bin/bash -e
2
Kadir Çetinkaya07692002024-02-28 07:10:05 +00003# Copyright (C) 2024 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
Michael Merg6bafd752024-02-12 13:52:00 +000017cd $(dirname $BASH_SOURCE)
18source $(pwd)/../../shell_utils.sh
19require_top
20
21# Ensure cogsetup (out/ will be symlink outside the repo)
Sam Lewis2404c4a2024-09-23 20:06:02 +000022setup_cog_env_if_needed
Michael Merg6bafd752024-02-12 13:52:00 +000023
Kadir Çetinkaya07692002024-02-28 07:10:05 +000024case $(uname -s) in
25 Linux)
26 export PREBUILTS_CLANG_TOOLS_ROOT="${TOP}/prebuilts/clang-tools/linux-x86/"
27 PREBUILTS_GO_ROOT="${TOP}/prebuilts/go/linux-x86/"
28 ;;
29 *)
30 echo "Only supported for linux hosts" >&2
31 exit 1
32 ;;
33esac
34
Michael Merg86cca742024-06-11 15:24:05 +000035export BUILD_ENV_SEQUENCE_NUMBER=13
Michael Merg6bafd752024-02-12 13:52:00 +000036export ANDROID_BUILD_TOP=$TOP
37export OUT_DIR=${OUT_DIR}
Kadir Çetinkaya07692002024-02-28 07:10:05 +000038exec "${PREBUILTS_GO_ROOT}/bin/go" "run" "ide_query" "$@"