Skip to content

Commit

Permalink
integrate rftrace into hermit-sys
Browse files Browse the repository at this point in the history
- make sure that RUSTFLAGS is set correctly
  • Loading branch information
stlankes committed Jan 31, 2021
1 parent 40276a0 commit 997735f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 1 addition & 2 deletions hermit-sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,4 @@ features = ["std", "ethernet", "socket-udp", "socket-tcp", "proto-ipv4", "proto-
[dependencies.rftrace]
version = "0.1.0"
optional = true
features = ["autokernel", "buildcore", "interruptsafe"]

features = ["autokernel", "buildcore", "interruptsafe"]
3 changes: 3 additions & 0 deletions hermit-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ fn build_hermit(src_dir: &Path, target_dir_opt: Option<&Path>) {
#[cfg(feature = "instrument")]
{
cmd.env("RUSTFLAGS", "-Z instrument-mcount");
}
#[cfg(not(feature = "instrument"))]
{
// if instrument is not set, ensure that instrument is not in environment variables!
cmd.env(
"RUSTFLAGS",
Expand Down
2 changes: 2 additions & 0 deletions hermit-sys/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
extern crate aarch64;
#[macro_use]
extern crate log;
#[cfg(feature = "instrument")]
extern crate rftrace;
#[cfg(feature = "smoltcp")]
extern crate smoltcp;
#[cfg(target_arch = "x86_64")]
Expand Down

0 comments on commit 997735f

Please sign in to comment.