1--- a/src/prefixed.rs 2023-11-21 14:54:21.563997351 +0000 2+++ b/src/prefixed.rs 2023-11-21 14:48:18.346428666 +0000 3@@ -73,6 +73,7 @@ 4 }; 5 } 6 7+#[cfg(not(soong))] 8 macro_rules! prefixed_item { 9 // Calculate the prefixed name in a separate layer of macro expansion 10 // because rustc won't currently accept a non-literal expression as 11@@ -88,6 +89,34 @@ 12 { $( $item )+ } 13 } 14 }; 15+ 16+ // Output the item. 17+ { 18+ $attr:ident 19+ { $prefixed_name:expr } 20+ { $( $item:tt )+ } 21+ } => { 22+ #[$attr = $prefixed_name] 23+ $( $item )+ 24+ }; 25+} 26+ 27+#[cfg(soong)] 28+macro_rules! prefixed_item { 29+ // Calculate the prefixed name in a separate layer of macro expansion 30+ // because rustc won't currently accept a non-literal expression as 31+ // the value for `#[link_name = value]`. 32+ { 33+ $attr:ident 34+ $name:ident 35+ { $( $item:tt )+ } 36+ } => { 37+ prefixed_item! { 38+ $attr 39+ { concat!("ring_core_android_platform_", stringify!($name)) } 40+ { $( $item )+ } 41+ } 42+ }; 43 44 // Output the item. 45 { 46