aboutsummaryrefslogtreecommitdiff
path: root/scripts/wrap-compiler-for-flag-check
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/wrap-compiler-for-flag-check')
-rwxr-xr-xscripts/wrap-compiler-for-flag-check10
1 files changed, 7 insertions, 3 deletions
diff --git a/scripts/wrap-compiler-for-flag-check b/scripts/wrap-compiler-for-flag-check
index 6fa77f0..ee1100c 100755
--- a/scripts/wrap-compiler-for-flag-check
+++ b/scripts/wrap-compiler-for-flag-check
@@ -3,12 +3,16 @@
3# From kmcallister: 3# From kmcallister:
4# https://github.com/kmcallister/autoharden/blob/efaf5a16612589808c276a11536ea9a47071f74b/scripts/wrap-compiler-for-flag-check 4# https://github.com/kmcallister/autoharden/blob/efaf5a16612589808c276a11536ea9a47071f74b/scripts/wrap-compiler-for-flag-check
5 5
6# There is no way to make clang's "argument unused" warning fatal. So when 6# Prior to clang v5.1, there was no way to make
7# configure checks for supported flags, it runs $CC, $CXX, $LD via this 7# clang's "argument unused" warning fatal. This
8# wrapper. 8# wrapper script that greps for this warning message. Newer clang's have no issues.
9# 9#
10# Ideally the search string would also include 'clang: ' but this output might 10# Ideally the search string would also include 'clang: ' but this output might
11# depend on clang's argv[0]. 11# depend on clang's argv[0].
12#
13# This file is in the public domain.
14set -o errexit
15set -o nounset
12 16
13if out=`"$@" 2>&1`; then 17if out=`"$@" 2>&1`; then
14 echo "$out" 18 echo "$out"