Skip to content
Open
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
12 changes: 8 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ CARGO ?= cargo
CLIPPY_OPTIONS ?= --all-features
CLIPPY_ARGS ?= -D warnings

# Packages that require --target x86_64-unknown-none
BARE_METAL_MEMBERS := svsm bldr stage1
BARE_METAL_EXCLUDES := $(addprefix --exclude ,$(BARE_METAL_MEMBERS))

ifdef CARGO_HACK
CARGO = cargo hack
CLIPPY_OPTIONS = --each-feature
Expand Down Expand Up @@ -157,11 +161,11 @@ endif
touch ${FS_BIN}

clippy:
${CARGO} clippy ${CLIPPY_OPTIONS} --workspace --exclude svsm --exclude stage1 --exclude svsm-fuzz -- ${CLIPPY_ARGS}
${CARGO} clippy ${CLIPPY_OPTIONS} --workspace $(BARE_METAL_EXCLUDES) --exclude svsm-fuzz -- ${CLIPPY_ARGS}
RUSTFLAGS="--cfg fuzzing" ${CARGO} clippy ${CLIPPY_OPTIONS} --package svsm-fuzz -- ${CLIPPY_ARGS}
${CARGO} clippy ${CLIPPY_OPTIONS} --package svsm --target x86_64-unknown-none -- ${CLIPPY_ARGS}
${CARGO} clippy ${CLIPPY_OPTIONS} --package bldr --target x86_64-unknown-none -- ${CLIPPY_ARGS}
${CARGO} clippy ${CLIPPY_OPTIONS} --package stage1 --target x86_64-unknown-none -- ${CLIPPY_ARGS}
for pkg in $(BARE_METAL_MEMBERS); do \
${CARGO} clippy ${CLIPPY_OPTIONS} --package $$pkg --target x86_64-unknown-none -- ${CLIPPY_ARGS} || exit 1; \
done
${CARGO} clippy ${CLIPPY_OPTIONS} --workspace --tests --exclude svsm -- ${CLIPPY_ARGS}
${CARGO} clippy ${CLIPPY_OPTIONS} --package svsm --tests -- ${CLIPPY_ARGS}

Expand Down
7 changes: 1 addition & 6 deletions boot/bldr/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,7 @@
// Author: Joerg Roedel <jroedel@suse.de>

fn main() {
let target = std::env::var("TARGET").unwrap();

if target == "x86_64-unknown-none" {
println!("cargo:rustc-link-arg=--build-id=none");
}

println!("cargo:rustc-link-arg=--build-id=none");
println!("cargo:rustc-link-arg=-nostdlib");
println!("cargo:rustc-link-arg=-Tboot/bldr/src/bldr.lds");
println!("cargo:rustc-link-arg=-no-pie");
Expand Down