Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion bin/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -387,8 +387,9 @@ if [ ${INSTALL_RUST} -eq 1 ] ; then
${WGET} https://static.rust-lang.org/dist/${RUST_VERSION}/rust-nightly-x86_64-unknown-linux-gnu.tar.gz -O rust.tar.gz
tar xf rust.tar.gz
cd rust-nightly-x86_64-unknown-linux-gnu
sudo ./install.sh
sudo ./install.sh --without=rust-docs
cd ..
rm -r rust-nightly-x86_64-unknown-linux-gnu rust.tar.gz

puts "Installed Rust"
fi
Expand Down
2 changes: 1 addition & 1 deletion bin/versions
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ SYMBOOGLIX_COMMIT=7210e5d09b
LOCKPWN_COMMIT=73eddf97bd
LLVM_SHORT_VERSION=8
LLVM_FULL_VERSION=8.0.1
RUST_VERSION=2016-12-16
RUST_VERSION=2019-07-16
6 changes: 2 additions & 4 deletions lib/smack/SmackInstGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -646,10 +646,8 @@ void SmackInstGenerator::visitCallInst(llvm::CallInst &ci) {
} else if (name.find(Naming::RUST_ENTRY) != std::string::npos) {
// Set the entry point for Rust programs
auto castExpr = ci.getArgOperand(0);
if (auto CE = dyn_cast<const Constant>(castExpr)) {
auto mainFunc = CE->getOperand(0);
emit(Stmt::call(mainFunc->getName(), {}, {}));
}
auto mainFunction = cast<const Function>(castExpr);
emit(Stmt::call(mainFunction->getName(), {}, {}));

} else if (name.find(Naming::RUST_PANIC1) != std::string::npos ||
name.find(Naming::RUST_PANIC2) != std::string::npos) {
Expand Down
2 changes: 1 addition & 1 deletion share/smack/frontend.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ def rust_frontend(input_file, args):
"""Generate Boogie code from Rust programming language source(s)."""
compile_command = ['rustc', '-A', 'unused-imports', '-C', 'opt-level=0',
'-C', 'no-prepopulate-passes', '-g', '--emit=llvm-bc',
'--cfg', 'verifier="smack"']
'--cfg', 'verifier="smack"', '-C', 'passes=name-anon-globals']

# This links in the Rust SMACK library. This is needed due to the way rustc
# finds a programs libraries.
Expand Down