#!/bin/bash
set -e

target=$1
shift

new_array=()
for value in "$@"
do
    [[ $value != *self-contained/*crt* ]] && [[ $value != *lgcc_s* ]] && [[ $value != *--fix-cortex-a53-843419* ]] && new_array+=($value)
done

zig c++ "${new_array[@]}" -target $target