summaryrefslogtreecommitdiffstats
path: root/config/cc.sh
blob: 45d51ca13ce29494805da1a9a13359c29f0ae7e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh

# Copyright © Tavian Barnes <tavianator@tavianator.com>
# SPDX-License-Identifier: 0BSD

# Run the compiler and check if it succeeded

set -eu

TMP=$(mktemp)
trap 'rm -f "$TMP"' EXIT

(
    set -x
    $XCC $XCPPFLAGS $XCFLAGS $XLDFLAGS "$@" $XLDLIBS -o "$TMP"
)