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

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

# Run the compiler and check if it succeeded

set -eux

$XCC \
    $BFS_CPPFLAGS $XCPPFLAGS ${EXTRA_CPPFLAGS:-} \
    $BFS_CFLAGS $XCFLAGS ${EXTRA_CFLAGS:-} \
    $XLDFLAGS ${EXTRA_LDFLAGS:-} \
    "$@" \
    $XLDLIBS ${EXTRA_LDLIBS:-} $BFS_LDLIBS \
    -o /dev/null