From 886c7ed397ca8b31980d7117092ed3a978463bea Mon Sep 17 00:00:00 2001 From: Pat Hickey Date: Fri, 22 Oct 2021 12:05:34 -0700 Subject: [PATCH 1/3] silence deprecation warnings in lucet-benchmarks --- benchmarks/lucet-benchmarks/src/lib.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/benchmarks/lucet-benchmarks/src/lib.rs b/benchmarks/lucet-benchmarks/src/lib.rs index 989b582af..0f00e5a6a 100644 --- a/benchmarks/lucet-benchmarks/src/lib.rs +++ b/benchmarks/lucet-benchmarks/src/lib.rs @@ -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)] + mod compile; mod context; mod modules; From d143f71500a1bec7e247e1d7c94411ec547c7687 Mon Sep 17 00:00:00 2001 From: Pat Hickey Date: Fri, 22 Oct 2021 12:44:31 -0700 Subject: [PATCH 2/3] cargo audit: ignore RUSTSEC-2020-0159 we do not believe this vulnerablity is reachable in our project --- .github/workflows/main.yml | 2 +- Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 537aa696b..2da511f84 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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 diff --git a/Makefile b/Makefile index aea941654..399ebce2a 100644 --- a/Makefile +++ b/Makefile @@ -87,7 +87,7 @@ bench: .PHONY: audit audit: - cargo audit + cargo audit --ignore RUSTSEC-2020-0159 .PHONY: clean clean: From 749a7e981e76db302f258edbbb07f96da3e8e45a Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Fri, 22 Oct 2021 23:02:50 +0200 Subject: [PATCH 3/3] Fix macOS support on Big Sur & Monterey --- lucetc/src/lib.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lucetc/src/lib.rs b/lucetc/src/lib.rs index 2ec54de78..b8e39d3bc 100644 --- a/lucetc/src/lib.rs +++ b/lucetc/src/lib.rs @@ -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 {}.