diff --git a/build_sysroot/build_sysroot.sh b/build_sysroot/build_sysroot.sh index b4b7c5e5e01..4404fb49238 100755 --- a/build_sysroot/build_sysroot.sh +++ b/build_sysroot/build_sysroot.sh @@ -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 diff --git a/cargo.sh b/cargo.sh index d5be7773d34..ba4b7d6c942 100755 --- a/cargo.sh +++ b/cargo.sh @@ -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) diff --git a/scripts/Readme.md b/scripts/Readme.md new file mode 100644 index 00000000000..83cec9c6f36 --- /dev/null +++ b/scripts/Readme.md @@ -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. diff --git a/config.sh b/scripts/config.sh similarity index 95% rename from config.sh rename to scripts/config.sh index b47da434c64..93db4a54a56 100644 --- a/config.sh +++ b/scripts/config.sh @@ -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" diff --git a/filter_profile.rs b/scripts/filter_profile.rs similarity index 97% rename from filter_profile.rs rename to scripts/filter_profile.rs index 82bf53934b8..75f2f61b21a 100755 --- a/filter_profile.rs +++ b/scripts/filter_profile.rs @@ -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 diff --git a/rustup.sh b/scripts/rustup.sh similarity index 100% rename from rustup.sh rename to scripts/rustup.sh diff --git a/test.sh b/test.sh index 230e464d279..67dd4d3aa00 100755 --- a/test.sh +++ b/test.sh @@ -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