fix: clangd under Docker
Add a wrapper script to run `clangd` under Docker, so that IDE features work.
Change-Id: I958a40240d0e19a9a18764194f6afb8114ead361
Signed-off-by: Karl Meakin <karl.meakin@arm.com>
diff --git a/build/run_in_container.sh b/build/run_in_container.sh
index 2289edd..bab31f6 100755
--- a/build/run_in_container.sh
+++ b/build/run_in_container.sh
@@ -38,9 +38,14 @@
# Parse command line arguments
INTERACTIVE=false
ALLOW_PTRACE=false
+TTY=true
while true
do
case "${1:-}" in
+ --tty)
+ TTY=${2:-}
+ shift; shift
+ ;;
-i)
INTERACTIVE=true
shift
@@ -51,7 +56,7 @@
;;
-*)
echo "ERROR: Unknown command line flag: $1" 1>&2
- echo "Usage: $0 [-i] [-p] <command>"
+ echo "Usage: $0 [-i] [-p] [--tty true|false] <command>"
exit 1
;;
*)
@@ -62,7 +67,7 @@
ARGS=()
# Run with a pseduo-TTY for nicer logging.
-ARGS+=(-t)
+ARGS+=(--tty=${TTY})
# Run interactive if this script was invoked with '-i'.
if [ "${INTERACTIVE}" == "true" ]
then