summaryrefslogtreecommitdiffstats
path: root/config/cc.sh
diff options
context:
space:
mode:
Diffstat (limited to 'config/cc.sh')
-rwxr-xr-xconfig/cc.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/config/cc.sh b/config/cc.sh
new file mode 100755
index 0000000..04b142a
--- /dev/null
+++ b/config/cc.sh
@@ -0,0 +1,12 @@
+#!/usr/bin/env bash
+
+# Copyright © Tavian Barnes <tavianator@tavianator.com>
+# SPDX-License-Identifier: 0BSD
+
+# Run the compiler and check if it succeeded
+
+printf '$ %s' "$XCC" >&2
+printf ' %q' "$@" >&2
+printf ' -o /dev/null\n' >&2
+
+$XCC "$@" -o /dev/null