platform_bionic/tests/file-check-cxx
Dan Albert f68dcbe093 Fix our fortify tests for global -Werror.
If anyone has a better way of doing this it would be welcome...

Bug: http://b/26936282
Change-Id: I796896866327b4b5b5ee4ec36994fb320993f85d
2016-02-02 17:13:03 -08:00

13 lines
256 B
Bash
Executable file

#!/bin/bash
FILECHECK=$1
CXX=$2
PREFIX=$3
shift 3
SOURCE=$(echo "$@" | grep -oP '\S+\.cpp\b')
OBJ=$(echo "$@" | grep -oP '\S+\.o\b')
$CXX "$@" -Wno-error 2>&1 | $FILECHECK -check-prefix=$PREFIX $SOURCE
if [ "$?" -eq 0 ]; then
touch $OBJ
else
exit 1
fi