-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.sh
More file actions
39 lines (27 loc) · 1.07 KB
/
setup.sh
File metadata and controls
39 lines (27 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# NOTE: This script should be sourced by ZSH! O.w. the directory behaviors will be wrong!
# Restore the original directory
RESTORE_DIR=`pwd`
# Go to the setup.sh directory
cd `dirname $0`
# Use the repository path to set the PYTHONPATH and ASSASSYN_HOME
REPO_PATH=`git rev-parse --show-toplevel`
which sccache > /dev/null 2>&1
if [ $? -eq 0 ]; then
echo "Setting up SCCACHE to $SCCACHE"
export RUSTC_WRAPPER=`which sccache`
else
echo "No sccache found! Skip!"
fi
echo "Adding $REPO_PATH/assassyn-public/python to PYTHONPATH"
export PYTHONPATH=$REPO_PATH/assassyn-public/python:$PYTHONPATH
echo "Setting WORKLOAD_HOME to $REPO_PATH"
export WORKLOAD_HOME=$REPO_PATH
echo "Setting ASSASSYN_HOME to $REPO_PATH/assassyn-public"
export ASSASSYN_HOME=$REPO_PATH/assassyn-public
if [ -d $REPO_PATH/assassyn-public/verilator ]; then
echo "In-repo verilator found, setting VERILATOR_ROOT to $REPO_PATH//assassyn-public/verilator"
export VERILATOR_ROOT=$REPO_PATH/assassyn-public/verilator
export PATH="$VERILATOR_ROOT/bin:$PATH"
fi
# Go back to the original directory
cd $RESTORE_DIR