mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
Don't overwrite CodegenFnAttrs when adding used compiler/linker
This commit is contained in:
parent
b4151a41a0
commit
6cfd471ffe
@ -2843,7 +2843,7 @@ fn codegen_fn_attrs(tcx: TyCtxt<'_>, did: DefId) -> CodegenFnAttrs {
|
||||
let is_like_elf = !(tcx.sess.target.is_like_osx
|
||||
|| tcx.sess.target.is_like_windows
|
||||
|| tcx.sess.target.is_like_wasm);
|
||||
codegen_fn_attrs.flags = if is_like_elf {
|
||||
codegen_fn_attrs.flags |= if is_like_elf {
|
||||
CodegenFnAttrFlags::USED
|
||||
} else {
|
||||
CodegenFnAttrFlags::USED_LINKER
|
||||
|
Loading…
Reference in New Issue
Block a user