2018-05-13 23:12:30 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -e -x
|
|
|
|
|
|
|
|
source default-config
|
|
|
|
|
2018-05-14 18:49:51 +00:00
|
|
|
./install-os-packages.sh jq
|
2018-05-13 23:12:30 +00:00
|
|
|
|
|
|
|
[[ -d "${WORKSPACE}/sources" ]] || die "Run get-sources.sh first"
|
|
|
|
|
|
|
|
mkdir -p "${WORKSPACE}/build"
|
|
|
|
pushd "${WORKSPACE}/build"
|
|
|
|
|
|
|
|
cmake -D CMAKE_BUILD_TYPE=Debug $CMAKE_FLAGS ../sources
|
2018-05-13 23:20:57 +00:00
|
|
|
|
2018-05-13 23:32:03 +00:00
|
|
|
make -j $THREADS re2_st # Generated headers
|
2018-05-13 23:20:57 +00:00
|
|
|
|
2018-05-13 23:12:30 +00:00
|
|
|
jq --raw-output '.[] | .command' compile_commands.json | grep -v -P -- '-c .+/contrib/' | sed -r -e 's/-o\s+\S+/-fsyntax-only/' > syntax-commands
|
|
|
|
xargs --arg-file=syntax-commands --max-procs=$THREADS --replace /bin/sh -c "{}"
|
|
|
|
|
|
|
|
popd
|