@@ -19,7 +19,7 @@ use rustc_macros::{Decodable, Encodable, HashStable_Generic};
19
19
use rustc_span:: edition:: { Edition , DEFAULT_EDITION , EDITION_NAME_LIST , LATEST_STABLE_EDITION } ;
20
20
use rustc_span:: source_map:: FilePathMapping ;
21
21
use rustc_span:: { FileName , FileNameDisplayPreference , RealFileName , SourceFileHashAlgorithm } ;
22
- use rustc_target:: spec:: { LinkSelfContainedComponents , LinkerFeatures } ;
22
+ use rustc_target:: spec:: { FramePointer , LinkSelfContainedComponents , LinkerFeatures } ;
23
23
use rustc_target:: spec:: { SplitDebuginfo , Target , TargetTriple } ;
24
24
use std:: collections:: btree_map:: {
25
25
Iter as BTreeMapIter , Keys as BTreeMapKeysIter , Values as BTreeMapValuesIter ,
@@ -2468,6 +2468,15 @@ pub fn build_session_options(early_dcx: &mut EarlyDiagCtxt, matches: &getopts::M
2468
2468
}
2469
2469
}
2470
2470
2471
+ if !nightly_options:: is_unstable_enabled ( matches)
2472
+ && cg. force_frame_pointers == FramePointer :: NonLeaf
2473
+ {
2474
+ early_dcx. early_fatal (
2475
+ "`-Cforce-frame-pointers=non-leaf` also requires `-Zunstable-options` \
2476
+ and a nightly compiler",
2477
+ )
2478
+ }
2479
+
2471
2480
// For testing purposes, until we have more feedback about these options: ensure `-Z
2472
2481
// unstable-options` is required when using the unstable `-C link-self-contained` and `-C
2473
2482
// linker-flavor` options.
0 commit comments