1
Fork 0

Rollup merge of #121694 - davidtwco:stabilize-relro-level, r=Mark-Simulacrum

sess: stabilize `-Zrelro-level` as `-Crelro-level`

Stabilise `-Zrelro-level` as `-Crelro-level`. There's no tracking issue for this flag to close.
This commit is contained in:
Guillaume Gomez 2024-04-16 15:19:10 +02:00 committed by GitHub
commit 26b6a234a1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 29 additions and 9 deletions

View file

@ -2059,7 +2059,7 @@ fn add_library_search_dirs(cmd: &mut dyn Linker, sess: &Session, self_contained:
/// Add options making relocation sections in the produced ELF files read-only
/// and suppressing lazy binding.
fn add_relro_args(cmd: &mut dyn Linker, sess: &Session) {
match sess.opts.unstable_opts.relro_level.unwrap_or(sess.target.relro_level) {
match sess.opts.cg.relro_level.unwrap_or(sess.target.relro_level) {
RelroLevel::Full => cmd.full_relro(),
RelroLevel::Partial => cmd.partial_relro(),
RelroLevel::Off => cmd.no_relro(),