mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-11-27 14:04:56 +01:00
implement the #[shared] attribute as specified in RFC #211
This commit is contained in:
parent
9195038c87
commit
fb84029bee
1 changed files with 5 additions and 1 deletions
|
@ -42,7 +42,11 @@ pub fn codegen(
|
||||||
let cfgs = &local.cfgs;
|
let cfgs = &local.cfgs;
|
||||||
has_cfgs |= !cfgs.is_empty();
|
has_cfgs |= !cfgs.is_empty();
|
||||||
|
|
||||||
let section = util::link_section("data", core);
|
let section = if local.shared && cfg!(feature = "heterogeneous") {
|
||||||
|
Some(quote!(#[rtfm::export::shared]))
|
||||||
|
} else {
|
||||||
|
util::link_section("data", core)
|
||||||
|
};
|
||||||
let expr = &local.expr;
|
let expr = &local.expr;
|
||||||
let ty = &local.ty;
|
let ty = &local.ty;
|
||||||
fields.push(quote!(
|
fields.push(quote!(
|
||||||
|
|
Loading…
Reference in a new issue