Reorganize scripts

This commit is contained in:
bjorn3 2020-09-16 16:46:02 +02:00
parent 044470a726
commit 7285c134d1
7 changed files with 10 additions and 6 deletions

View File

@ -6,7 +6,7 @@ set -e
cd $(dirname "$0")
pushd ../ >/dev/null
source ./config.sh
source ./scripts/config.sh
popd >/dev/null
# Cleanup for previous run

View File

@ -5,7 +5,7 @@ export CHANNEL='release'
fi
pushd $(dirname "$0") >/dev/null
source config.sh
source scripts/config.sh
# read nightly compiler from rust-toolchain file
TOOLCHAIN=$(cat rust-toolchain)

2
scripts/Readme.md Normal file
View File

@ -0,0 +1,2 @@
This directory is for scripts that are either never directly invoked or are not used very often.
Scripts that are frequently used should be kept at the project root.

View File

@ -38,7 +38,6 @@ if [[ `uname` == 'Darwin' ]]; then
export RUSTFLAGS="$RUSTFLAGS -Clink-arg=-undefined -Clink-arg=dynamic_lookup"
fi
RUSTC="rustc $RUSTFLAGS -L crate=target/out --out-dir target/out"
export RUSTC_LOG=warn # display metadata load errors
export LD_LIBRARY_PATH="$(pwd)/target/out:$(pwd)/build_sysroot/sysroot/lib/rustlib/$TARGET_TRIPLE/lib"

View File

@ -2,8 +2,10 @@
#![forbid(unsafe_code)]/* This line is ignored by bash
# This block is ignored by rustc
CHANNEL="release"
source ./config.sh
CG_CLIF_JIT=1 PROFILE=$1 OUTPUT=$2 exec $RUSTC $0 --crate-type bin -Cprefer-dynamic
pushd $(dirname "$0")/../
source scripts/config.sh
popd
CG_CLIF_JIT=1 PROFILE=$1 OUTPUT=$2 exec rustc $RUSTFLAGS $0 --crate-type bin -Cprefer-dynamic
#*/
//! This program filters away uninteresting samples and trims uninteresting frames for stackcollapse

View File

@ -11,8 +11,9 @@ else
fi
# Config
source config.sh
source scripts/config.sh
export CG_CLIF_INCR_CACHE_DISABLED=1
RUSTC="rustc $RUSTFLAGS -L crate=target/out --out-dir target/out"
# Cleanup
rm -r target/out || true