Fix the cosmocc ar commands

This commit is contained in:
Justine Tunney 2023-08-14 20:12:51 -07:00
parent f5b39e9f31
commit b494d56549
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
4 changed files with 19 additions and 64 deletions

View file

@ -9,21 +9,8 @@ fatal_error() {
exit 1
}
if [ ! -x "$COSMO/o//tool/build/ar.com" ]; then
if [ ! -x "$COSMO/o/third_party/gcc/bin/aarch64-linux-musl-ar" ]; then
fatal_error "you need to run: aarch64-unknown-cosmo-cc --update"
fi
if [ x"$1" = x"rc" ] ||
[ x"$1" = x"rcD" ] ||
[ x"$1" = x"rcu" ] |
[ x"$1" = x"rcuD" ] ||
[ x"$1" = x"rcs" ] ||
[ x"$1" = x"rcsD" ] ||
[ x"$1" = x"--help" ] ||
[ x"$1" = x"--version" ]; then
AR="$COSMO/o//tool/build/ar.com"
else
AR="$COSMO/o/third_party/gcc/bin/aarch64-linux-musl-ar"
fi
exec "$AR" "$@"
exec "$COSMO/o/third_party/gcc/bin/aarch64-linux-musl-ar" "$@"