-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: make shims
cargo test --workspace
compatible
Signed-off-by: Harald Hoyer <harald@profian.com>
- Loading branch information
Showing
6 changed files
with
891 additions
and
861 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,14 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
use std::env::var; | ||
|
||
fn main() { | ||
println!( | ||
"cargo:rustc-link-arg-bin=enarx-shim-kvm=-T{}/layout.ld", | ||
std::env::var("CARGO_MANIFEST_DIR").unwrap() | ||
); | ||
println!("cargo:rustc-link-arg-bin=enarx-shim-kvm=-Wl,--sort-section=alignment"); | ||
println!("cargo:rustc-link-arg-bin=enarx-shim-kvm=-nostartfiles"); | ||
if var("CARGO_CFG_TARGET_OS").expect("missing CARGO_CFG_TARGET_OS") == "none" { | ||
println!( | ||
"cargo:rustc-link-arg-bin=enarx-shim-kvm=-T{}/layout.ld", | ||
std::env::var("CARGO_MANIFEST_DIR").unwrap() | ||
); | ||
println!("cargo:rustc-link-arg-bin=enarx-shim-kvm=-Wl,--sort-section=alignment"); | ||
println!("cargo:rustc-link-arg-bin=enarx-shim-kvm=-nostartfiles"); | ||
} | ||
} |
Oops, something went wrong.