brintos

brintos / llvm-project-archived public Read only

0
0
Text · 641 B · 1d51419 Raw
18 lines · bash
1#!/bin/bash2 3if [ -z $1 ]; then4  echo "Path to clang required!"5  echo "Usage: update_memprof_inputs.sh /path/to/updated/clang"6  exit 17else8  CLANG=$19fi10 11# Allows the script to be invoked from other directories.12OUTDIR=$(dirname $(realpath -s $0))13 14DEFAULT_MEMPROF_FLAGS="-fuse-ld=lld -Wl,--no-rosegment -gmlt -fdebug-info-for-profiling -fmemory-profile -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer -fno-optimize-sibling-calls -m64 -Wl,-build-id -no-pie"15 16${CLANG} ${DEFAULT_MEMPROF_FLAGS} ${OUTDIR}/../memprof.cpp -o ${OUTDIR}/memprof.exe17env MEMPROF_OPTIONS=log_path=stdout ${OUTDIR}/memprof.exe > ${OUTDIR}/memprof.memprofraw18