blob: 2df48d012952ae1f11cbe7ed1f85fa7586c13468 [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)
22. ${TOP}/build/make/cogsetup.sh
23
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 Merg6bafd752024-02-12 13:52:00 +000035export ANDROID_BUILD_TOP=$TOP
36export OUT_DIR=${OUT_DIR}
Kadir Çetinkaya07692002024-02-28 07:10:05 +000037exec "${PREBUILTS_GO_ROOT}/bin/go" "run" "ide_query" "$@"