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

#[cfg(...)] flags don't work #178

Closed
thejpster opened this issue Feb 22, 2019 · 3 comments
Closed

#[cfg(...)] flags don't work #178

thejpster opened this issue Feb 22, 2019 · 3 comments

Comments

@thejpster
Copy link
Contributor

The #[cfg(...)] flags don't work, which I think is because we don't set them in the build.rs file. I think we need to copy the relevant code from the cortex-m/build.rs file.

This affects armv8m-main because without #[cfg(armv8)] you don't get a SecureFault handler.

@thejpster
Copy link
Contributor Author

See #182

@jonas-schievink
Copy link
Contributor

It looks like the cfg flag is now set properly:

cortex-m-rt/build.rs

Lines 53 to 55 in 7c8778f

} else if target.starts_with("thumbv8m") {
println!("cargo:rustc-cfg=cortex_m");
println!("cargo:rustc-cfg=armv8m");

@thejpster
Copy link
Contributor Author

Yup. Looks like I fixed it already.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants