rust-ape-example/gcc-linker-wrapper.bash

19 lines
313 B
Bash
Raw Normal View History

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