Rollup merge of #124677 - djkoloski:set_fuchsia_frame_pointer, r=tmandry

Set non-leaf frame pointers on Fuchsia targets

This is part of our work to enable shadow call stack sanitization on Fuchsia, see [this Fuchsia issue](https://g-issues.fuchsia.dev/issues/327643884).

r? ``@tmandry``
This commit is contained in:
Matthias Krüger 2024-05-04 12:37:22 +02:00 committed by GitHub
commit 81b43b759c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,4 +1,6 @@
use crate::spec::{crt_objects, cvs, Cc, LinkOutputKind, LinkerFlavor, Lld, TargetOptions};
use crate::spec::{
crt_objects, cvs, Cc, FramePointer, LinkOutputKind, LinkerFlavor, Lld, TargetOptions,
};
pub fn opts() -> TargetOptions {
// This mirrors the linker options provided by clang. We presume lld for
@ -38,6 +40,7 @@ pub fn opts() -> TargetOptions {
]),
position_independent_executables: true,
has_thread_local: true,
frame_pointer: FramePointer::NonLeaf,
..Default::default()
}
}