Skip to content

Commit 79416c4

Browse files
cg_clif: Define build opts from FramePointer
1 parent b3a1975 commit 79416c4

File tree

1 file changed

+3
-3
lines changed
  • compiler/rustc_codegen_cranelift/src

1 file changed

+3
-3
lines changed

compiler/rustc_codegen_cranelift/src/lib.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -271,9 +271,9 @@ fn build_isa(sess: &Session, backend_config: &BackendConfig) -> Arc<dyn TargetIs
271271
flags_builder.set("enable_verifier", enable_verifier).unwrap();
272272
flags_builder.set("regalloc_checker", enable_verifier).unwrap();
273273

274-
let preserve_frame_pointer = sess.target.options.frame_pointer
275-
!= rustc_target::spec::FramePointer::MayOmit
276-
|| matches!(sess.opts.cg.force_frame_pointers, Some(true));
274+
let mut frame_ptr = sess.target.options.frame_pointer.clone();
275+
frame_ptr.ratchet(sess.opts.cg.force_frame_pointers);
276+
let preserve_frame_pointer = frame_ptr != rustc_target::spec::FramePointer::MayOmit;
277277
flags_builder
278278
.set("preserve_frame_pointers", if preserve_frame_pointer { "true" } else { "false" })
279279
.unwrap();

0 commit comments

Comments
 (0)