Skip to content

Commit fc9d17d

Browse files
authored
Merge pull request #25 from gwsystems/arm-cleanup
LLVM Dependency Cleanup and Debian Install Script Fixes
2 parents a8c473b + 1aeae6f commit fc9d17d

File tree

3 files changed

+76
-84
lines changed

3 files changed

+76
-84
lines changed

Cargo.lock

Lines changed: 59 additions & 73 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ edition = "2018"
66

77
[dependencies]
88
flexi_logger = "0.14.4"
9-
llvm-alt = { git = "https://github.com/Others/llvm-rs.git"}
9+
llvm-alt = { git = "https://github.com/gwsystems/llvm-rs", branch = "sfbase"}
1010
log = "0.4.8"
1111
structopt = "0.3.2"
1212
wasmparser = "0.39.2"

install_deb.sh

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,25 @@
22
# Installs dependencies, builds Silverfish, and places it into your path
33
# Be sure to validate the Rust and LLVM install scripts we invoke below!
44

5+
sudo="sudo"
6+
if [[ $(whoami) == "root" ]]; then
7+
sudo=""
8+
fi
9+
510
# Exit if not executing script from project root because we use relative paths
611
# We want to match without case because the URL of the git repo is case insensitive, but the resulting
712
# directory is case sensitive. Thus, we can end up with either "aWsm" or "awsm."
813
shopt -s nocasematch
9-
if [[ $(git remote get-url origin) != *"/aWsm.git" || $(git rev-parse --show-toplevel) != $(pwd) ]]; then
14+
if [[ $(git remote get-url origin) != *"/awsm"* || $(git rev-parse --show-toplevel) != $(pwd) ]]; then
1015
echo "Install script must be run from project root."
1116
exit 1
1217
fi
1318
shopt -u nocasematch
1419

1520
# Install Build Dependencies
16-
sudo apt install build-essential --yes
17-
sudo apt install cmake --yes
21+
$sudo apt install build-essential --yes
22+
$sudo apt install cmake --yes
23+
$sudo apt install lsb-release wget software-properties-common --yes
1824

1925
# Initialize Wasmception submodule
2026
# Check to see if ./wasmception directory exists and is not empty.
@@ -38,13 +44,13 @@ source "$HOME/.cargo/env"
3844
export PATH="$HOME/.cargo/bin:$PATH"
3945

4046
# Install LLVM build dependencies
41-
LLVM_VERSION=9
42-
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" bash $LLVM_VERSION
43-
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-$LLVM_VERSION 100
44-
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-$LLVM_VERSION 100
45-
sudo update-alternatives --install /usr/bin/llvm-config llvm-config /usr/bin/llvm-config-$LLVM_VERSION 100
46-
sudo apt install libc++-dev libc++abi-dev --yes
47+
LLVM_VERSION=11
48+
$sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" bash $LLVM_VERSION
49+
$sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-$LLVM_VERSION 100
50+
$sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-$LLVM_VERSION 100
51+
$sudo update-alternatives --install /usr/bin/llvm-config llvm-config /usr/bin/llvm-config-$LLVM_VERSION 100
52+
$sudo apt install libc++-dev libc++abi-dev --yes
4753

4854
# Build and install Silverfish
4955
cargo build --release
50-
sudo cp -t /usr/bin ./target/release/silverfish
56+
$sudo cp -t /usr/bin ./target/release/silverfish

0 commit comments

Comments
 (0)