Skip to content

Commit 20506e3

Browse files
committed
#[used(linker)] attribute (dtolnay/linkme#41)
1 parent 4bdc784 commit 20506e3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/consts.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ impl<'gcc, 'tcx> StaticMethods for CodegenCx<'gcc, 'tcx> {
144144
// TODO(antoyo): set link section.
145145
}
146146

147-
if attrs.flags.contains(CodegenFnAttrFlags::USED) {
147+
if attrs.flags.contains(CodegenFnAttrFlags::USED) || attrs.flags.contains(CodegenFnAttrFlags::USED_LINKER) {
148148
self.add_used_global(global.to_rvalue());
149149
}
150150
}

0 commit comments

Comments
 (0)