rust-ape-example/gcc-linker-wrapper.bash
2023-10-10 08:27:44 -05:00

18 lines
313 B
Bash
Executable file

#!/bin/bash
set -eu
COSMO="${COSMO:-/opt/cosmo}"
ARCH="${ARCH:-x86_64}"
declare -a args
args=()
for o in "$@" ; do
case $o in
"-lunwind") continue;;
"-Wl,-Bdynamic") continue;;
"-Wl,-Bstatic") continue;;
esac
args+=("$o")
done
$COSMO/bin/$ARCH-unknown-cosmo-cc "${args[@]}"