Fix file-check-cxx to handle quoted arguments
If the OVERRIDE_C_DATE_TIME environment variable is set, the build system will add a macro to the global cflags that contains a static quoted date, like: -D__DATE__="\"Sep 28 2015\"" file-check-cxx needs to properly pass that through as a single, still quoted argument. So use the quoted "$@" instead of turning each word into an argument. Change-Id: I6929d712c280d0452062640e0cba8a176d045c97
This commit is contained in:
parent
70a9f0a3bc
commit
808602a485
@ -2,10 +2,10 @@
|
||||
FILECHECK=$1
|
||||
CXX=$2
|
||||
PREFIX=$3
|
||||
ARGS=${*:4}
|
||||
SOURCE=$(echo $ARGS | grep -oP '\S+\.cpp\b')
|
||||
OBJ=$(echo $ARGS | grep -oP '\S+\.o\b')
|
||||
$CXX $ARGS 2>&1 | $FILECHECK -check-prefix=$PREFIX $SOURCE
|
||||
shift 3
|
||||
SOURCE=$(echo "$@" | grep -oP '\S+\.cpp\b')
|
||||
OBJ=$(echo "$@" | grep -oP '\S+\.o\b')
|
||||
$CXX "$@" 2>&1 | $FILECHECK -check-prefix=$PREFIX $SOURCE
|
||||
if [ "$?" -eq 0 ]; then
|
||||
touch $OBJ
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user