m323/Sources/Aufgabe6/Aufgabe6.xcodeproj/rules_xcodeproj/bazel/clang.sh
cediackermann b1968074b6
build: generate per-package and aggregate Xcode projects
Add rules_xcodeproj targets to each package BUILD plus a root m323
project, with extra_files filegroups so the full source tree shows in
Xcode. Ignore Scala/Metals build dirs.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-29 14:00:40 +02:00

29 lines
537 B
Bash
Executable file

#!/bin/bash
set -euo pipefail
while test $# -gt 0
do
case $1 in
-MF)
shift
touch "$1"
;;
--serialize-diagnostics)
shift
cp "${BASH_SOURCE%/*}/cc.dia" "$1"
;;
*.o)
break
;;
-v)
# TODO: Make this work with custom toolchains
DEV_DIR_PREFIX=$(awk '{ sub(/.*-isysroot /, ""); sub(/.Contents\/Developer.*/, ""); print}' <<< "${@:1}")
clang="$DEV_DIR_PREFIX/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang"
"$clang" "${@:1}"
break
;;
esac
shift
done