Michael Merg | 6bafd75 | 2024-02-12 13:52:00 +0000 | [diff] [blame] | 1 | #!/bin/bash -e |
| 2 | |
Kadir Çetinkaya | 0769200 | 2024-02-28 07:10:05 +0000 | [diff] [blame] | 3 | # 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 Merg | 6bafd75 | 2024-02-12 13:52:00 +0000 | [diff] [blame] | 17 | cd $(dirname $BASH_SOURCE) |
| 18 | source $(pwd)/../../shell_utils.sh |
| 19 | require_top |
| 20 | |
| 21 | # Ensure cogsetup (out/ will be symlink outside the repo) |
Sam Lewis | 2404c4a | 2024-09-23 20:06:02 +0000 | [diff] [blame] | 22 | setup_cog_env_if_needed |
Michael Merg | 6bafd75 | 2024-02-12 13:52:00 +0000 | [diff] [blame] | 23 | |
Kadir Çetinkaya | 0769200 | 2024-02-28 07:10:05 +0000 | [diff] [blame] | 24 | case $(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 | ;; |
| 33 | esac |
| 34 | |
Michael Merg | 86cca74 | 2024-06-11 15:24:05 +0000 | [diff] [blame] | 35 | export BUILD_ENV_SEQUENCE_NUMBER=13 |
Michael Merg | 6bafd75 | 2024-02-12 13:52:00 +0000 | [diff] [blame] | 36 | export ANDROID_BUILD_TOP=$TOP |
| 37 | export OUT_DIR=${OUT_DIR} |
Kadir Çetinkaya | 0769200 | 2024-02-28 07:10:05 +0000 | [diff] [blame] | 38 | exec "${PREBUILTS_GO_ROOT}/bin/go" "run" "ide_query" "$@" |