Only compile #[used] as llvm.compiler.used for ELF targets
This commit is contained in:
parent
ecd44958e0
commit
54133cfcf4
2 changed files with 36 additions and 4 deletions
|
@ -13,7 +13,9 @@ pub trait StaticMethods: BackendTypes {
|
|||
/// Same as add_used_global(), but only prevent the compiler from potentially removing an
|
||||
/// otherwise unused symbol. The linker is still permitted to drop it.
|
||||
///
|
||||
/// This corresponds to the semantics of the `#[used]` attribute.
|
||||
/// This corresponds to the documented semantics of the `#[used]` attribute, although
|
||||
/// on some targets (non-ELF), we may use `add_used_global` for `#[used]` statics
|
||||
/// instead.
|
||||
fn add_compiler_used_global(&self, global: Self::Value);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue