Rework force-frame-pointer
This reworks the force-frame-pointer PR to explicitly only consider the
value of the flag if it is provided, and use a target default otherwise.
Something that was tried but not kept was renaming the flag to
`frame-pointer`, because for flag `frame-pointer=no`, there is no
guarante, that LLVM will elide *all* the frame pointers; oposite of what
the literal reading of the flag would suggest.
diff --git a/src/librustc/session/config.rs b/src/librustc/session/config.rs
index 023be78..59b40e9 100644
--- a/src/librustc/session/config.rs
+++ b/src/librustc/session/config.rs
@@ -1053,8 +1053,8 @@
2 = full debug info with variable and type information"),
opt_level: Option<String> = (None, parse_opt_string, [TRACKED],
"optimize with possible levels 0-3, s, or z"),
- force_frame_pointers: bool = (false, parse_bool, [TRACKED],
- "force frame pointers to be used"),
+ force_frame_pointers: Option<bool> = (None, parse_opt_bool, [TRACKED],
+ "force use of the frame pointers"),
debug_assertions: Option<bool> = (None, parse_opt_bool, [TRACKED],
"explicitly enable the cfg(debug_assertions) directive"),
inline_threshold: Option<usize> = (None, parse_opt_uint, [TRACKED],
@@ -2968,7 +2968,7 @@
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
opts = reference.clone();
- opts.cg.force_frame_pointers = true;
+ opts.cg.force_frame_pointers = Some(false);
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
opts = reference.clone();