Skip to content

Commit

Permalink
Add a hash to the metadata symbol
Browse files Browse the repository at this point in the history
To avoid duplicated metadata

This should help for woboq/qmetaobject-rs#150
  • Loading branch information
ogoffart committed Jun 22, 2021
1 parent bfea72f commit 9433d1b
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions cpp_build/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -365,12 +365,7 @@ struct MetaData {{
}};
MetaData
#ifdef _WIN32
__declspec (selectany)
#elif __GNUC__
__attribute__((weak))
#endif
metadata = {{
metadata_{hash} = {{
{{ {magic} }},
"{version}",
0xffef,
Expand All @@ -380,6 +375,7 @@ MetaData
}} // namespace rustcpp
"#,
hash = *FILE_HASH,
data = sizealign.join(", "),
length = sizealign.len(),
magic = magic.join(", "),
Expand Down

0 comments on commit 9433d1b

Please sign in to comment.