Reorganize scripts
This commit is contained in:
parent
044470a726
commit
7285c134d1
7 changed files with 10 additions and 6 deletions
|
@ -6,7 +6,7 @@ set -e
|
||||||
cd $(dirname "$0")
|
cd $(dirname "$0")
|
||||||
|
|
||||||
pushd ../ >/dev/null
|
pushd ../ >/dev/null
|
||||||
source ./config.sh
|
source ./scripts/config.sh
|
||||||
popd >/dev/null
|
popd >/dev/null
|
||||||
|
|
||||||
# Cleanup for previous run
|
# Cleanup for previous run
|
||||||
|
|
2
cargo.sh
2
cargo.sh
|
@ -5,7 +5,7 @@ export CHANNEL='release'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
pushd $(dirname "$0") >/dev/null
|
pushd $(dirname "$0") >/dev/null
|
||||||
source config.sh
|
source scripts/config.sh
|
||||||
|
|
||||||
# read nightly compiler from rust-toolchain file
|
# read nightly compiler from rust-toolchain file
|
||||||
TOOLCHAIN=$(cat rust-toolchain)
|
TOOLCHAIN=$(cat rust-toolchain)
|
||||||
|
|
2
scripts/Readme.md
Normal file
2
scripts/Readme.md
Normal 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.
|
|
@ -38,7 +38,6 @@ if [[ `uname` == 'Darwin' ]]; then
|
||||||
export RUSTFLAGS="$RUSTFLAGS -Clink-arg=-undefined -Clink-arg=dynamic_lookup"
|
export RUSTFLAGS="$RUSTFLAGS -Clink-arg=-undefined -Clink-arg=dynamic_lookup"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
RUSTC="rustc $RUSTFLAGS -L crate=target/out --out-dir target/out"
|
|
||||||
export RUSTC_LOG=warn # display metadata load errors
|
export RUSTC_LOG=warn # display metadata load errors
|
||||||
|
|
||||||
export LD_LIBRARY_PATH="$(pwd)/target/out:$(pwd)/build_sysroot/sysroot/lib/rustlib/$TARGET_TRIPLE/lib"
|
export LD_LIBRARY_PATH="$(pwd)/target/out:$(pwd)/build_sysroot/sysroot/lib/rustlib/$TARGET_TRIPLE/lib"
|
|
@ -2,8 +2,10 @@
|
||||||
#![forbid(unsafe_code)]/* This line is ignored by bash
|
#![forbid(unsafe_code)]/* This line is ignored by bash
|
||||||
# This block is ignored by rustc
|
# This block is ignored by rustc
|
||||||
CHANNEL="release"
|
CHANNEL="release"
|
||||||
source ./config.sh
|
pushd $(dirname "$0")/../
|
||||||
CG_CLIF_JIT=1 PROFILE=$1 OUTPUT=$2 exec $RUSTC $0 --crate-type bin -Cprefer-dynamic
|
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
|
//! This program filters away uninteresting samples and trims uninteresting frames for stackcollapse
|
3
test.sh
3
test.sh
|
@ -11,8 +11,9 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Config
|
# Config
|
||||||
source config.sh
|
source scripts/config.sh
|
||||||
export CG_CLIF_INCR_CACHE_DISABLED=1
|
export CG_CLIF_INCR_CACHE_DISABLED=1
|
||||||
|
RUSTC="rustc $RUSTFLAGS -L crate=target/out --out-dir target/out"
|
||||||
|
|
||||||
# Cleanup
|
# Cleanup
|
||||||
rm -r target/out || true
|
rm -r target/out || true
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue