Skip to content
This repository was archived by the owner on Mar 24, 2022. It is now read-only.

silence deprecation warnings in lucet-benchmarks #679

Merged
merged 4 commits into from
Oct 22, 2021
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
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ jobs:
- name: Install Rust (rustup)
run: rustup update
- run: cargo install cargo-audit
- run: cargo audit
- run: cargo audit --ignore RUSTSEC-2020-0159

docs:
name: Build docs
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ bench:

.PHONY: audit
audit:
cargo audit
cargo audit --ignore RUSTSEC-2020-0159

.PHONY: clean
clean:
Expand Down
6 changes: 6 additions & 0 deletions benchmarks/lucet-benchmarks/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// This crate uses several Criterion APIs which are deprecated. However, the
// Lucet project is in maintence mode and we no longer really care about
// maintaining and updating these interfaces, so we will ignore these
// warnings:
#![allow(deprecated)]
Comment on lines +1 to +5
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe a better fix would simply be to add the html_reports feature to the criterion dependency in cargo.toml?


mod compile;
mod context;
mod modules;
Expand Down
10 changes: 8 additions & 2 deletions lucetc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -472,9 +472,15 @@ fn ldflags_default(target: &Triple, target_version: &TargetVersion) -> String {
| OperatingSystem::Freebsd
| OperatingSystem::Dragonfly
| OperatingSystem::Netbsd
| OperatingSystem::Openbsd => "-shared",
| OperatingSystem::Openbsd => "-shared".to_string(),
OperatingSystem::Darwin | OperatingSystem::MacOSX { .. } => {
"-dylib -dead_strip -export_dynamic -undefined dynamic_lookup"
let sdk_path = std::process::Command::new("xcrun")
.args(&["-sdk", "macosx", "--show-sdk-path"])
.output()
.expect("xcrun failed")
.stdout;
let sdk_path = std::str::from_utf8(&sdk_path).expect("invalid sdk_path").trim();
format!("-dylib -dead_strip -export_dynamic -undefined dynamic_lookup -L {}/usr/lib -lSystem", sdk_path)
}
_ => panic!(
"Cannot determine default flags for {}.
Expand Down