Karl Meakin | 5c78aa4 | 2024-11-17 20:07:56 +0000 | [diff] [blame] | 1 | #!/usr/bin/env bash |
| 2 | # Copyright 2025 The Hafnium Authors. |
| 3 | # |
| 4 | # Use of this source code is governed by a BSD-style |
| 5 | # license that can be found in the LICENSE file or at |
| 6 | # https://opensource.org/licenses/BSD-3-Clause. |
| 7 | |
| 8 | # This wrapper script runs `clangd` in the Docker container. |
| 9 | |
| 10 | set -euo pipefail |
| 11 | |
| 12 | SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" |
| 13 | BUILD_DIR="$(dirname ${SCRIPT_DIR})" |
| 14 | |
| 15 | # Disable tty allocation, otherwise `clangd` crashes. |
| 16 | exec "${BUILD_DIR}/run_in_container.sh" -i --tty false clangd "$@" |