Skip to content

Commit 7285c13

Browse files
committed
Reorganize scripts
1 parent 044470a commit 7285c13

File tree

7 files changed

+10
-6
lines changed

7 files changed

+10
-6
lines changed

build_sysroot/build_sysroot.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ set -e
66
cd $(dirname "$0")
77

88
pushd ../ >/dev/null
9-
source ./config.sh
9+
source ./scripts/config.sh
1010
popd >/dev/null
1111

1212
# Cleanup for previous run

cargo.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export CHANNEL='release'
55
fi
66

77
pushd $(dirname "$0") >/dev/null
8-
source config.sh
8+
source scripts/config.sh
99

1010
# read nightly compiler from rust-toolchain file
1111
TOOLCHAIN=$(cat rust-toolchain)

scripts/Readme.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
This directory is for scripts that are either never directly invoked or are not used very often.
2+
Scripts that are frequently used should be kept at the project root.

config.sh renamed to scripts/config.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ if [[ `uname` == 'Darwin' ]]; then
3838
export RUSTFLAGS="$RUSTFLAGS -Clink-arg=-undefined -Clink-arg=dynamic_lookup"
3939
fi
4040

41-
RUSTC="rustc $RUSTFLAGS -L crate=target/out --out-dir target/out"
4241
export RUSTC_LOG=warn # display metadata load errors
4342

4443
export LD_LIBRARY_PATH="$(pwd)/target/out:$(pwd)/build_sysroot/sysroot/lib/rustlib/$TARGET_TRIPLE/lib"

filter_profile.rs renamed to scripts/filter_profile.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22
#![forbid(unsafe_code)]/* This line is ignored by bash
33
# This block is ignored by rustc
44
CHANNEL="release"
5-
source ./config.sh
6-
CG_CLIF_JIT=1 PROFILE=$1 OUTPUT=$2 exec $RUSTC $0 --crate-type bin -Cprefer-dynamic
5+
pushd $(dirname "$0")/../
6+
source scripts/config.sh
7+
popd
8+
CG_CLIF_JIT=1 PROFILE=$1 OUTPUT=$2 exec rustc $RUSTFLAGS $0 --crate-type bin -Cprefer-dynamic
79
#*/
810

911
//! This program filters away uninteresting samples and trims uninteresting frames for stackcollapse
File renamed without changes.

test.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@ else
1111
fi
1212

1313
# Config
14-
source config.sh
14+
source scripts/config.sh
1515
export CG_CLIF_INCR_CACHE_DISABLED=1
16+
RUSTC="rustc $RUSTFLAGS -L crate=target/out --out-dir target/out"
1617

1718
# Cleanup
1819
rm -r target/out || true

0 commit comments

Comments
 (0)