CMakeLists.txt: remove bootstrap script, use executable directly; move its functionalities to twn tooling
This commit is contained in:
31
tools/twn
31
tools/twn
@ -7,9 +7,32 @@ toolpath="$(dirname -- "${BASH_SOURCE[0]}")"
|
||||
export TWNROOT=$(realpath "$toolpath"/../)
|
||||
export TWNBUILDDIR=$(realpath "$toolpath"/../.build)
|
||||
|
||||
exe="$(basename $PWD)"
|
||||
|
||||
case "$1" in
|
||||
build ) "$toolpath"/build.sh "${@:2}"
|
||||
;;
|
||||
* ) echo "Unknown command."
|
||||
;;
|
||||
build ) "$toolpath"/build.sh "${@:2}"
|
||||
;;
|
||||
|
||||
gdb ) unset DEBUGINFOD_URLS
|
||||
gdb -ex run --args "$(basename $PWD)" "${@:2}"
|
||||
;;
|
||||
|
||||
apitrace ) case "$2" in
|
||||
take ) export ASAN_OPTIONS=verify_asan_link_order=0
|
||||
export LD_PRELOAD="/usr/lib/libubsan.so /usr/lib/apitrace/wrappers/glxtrace.so $LD_PRELOAD"
|
||||
./$exe "${@:3}"
|
||||
;;
|
||||
|
||||
show ) traces=( "$exe.*.trace" )
|
||||
trace=${traces[-1]}
|
||||
if [ "$trace" = "$exe.*.trace" ]; then
|
||||
trace="$exe.trace"
|
||||
fi
|
||||
qapitrace ${trace}
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
||||
* ) echo "Unknown command."
|
||||
;;
|
||||
esac
|
||||
|
Reference in New Issue
Block a user