File tree 1 file changed +12
-2
lines changed
compiler/rustc_session/src
1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -2442,9 +2442,19 @@ pub fn build_session_options(matches: &getopts::Matches) -> Options {
2442
2442
) ;
2443
2443
}
2444
2444
2445
- // Until the unstable flag is removed, ensure `-Zgcc-ld=lld` and `-Clinker-flavor=gcc:lld` have
2446
- // a matching linker choice.
2447
2445
if let Some ( LinkerFlavorCli :: Gcc { use_ld } ) = & cg. linker_flavor {
2446
+ // For testing purposes, until we have more feedback about these options: ensure `-Z
2447
+ // unstable-options` is enabled when using the `gcc` linker flavor enrichments.
2448
+ if !unstable_opts. unstable_options {
2449
+ early_error (
2450
+ error_format,
2451
+ "the `gcc:*` linker flavor is unstable, the `-Z unstable-options` \
2452
+ flag must also be passed to use it",
2453
+ ) ;
2454
+ }
2455
+
2456
+ // Until the unstable flag is removed, ensure `-Zgcc-ld=lld` and `-Clinker-flavor=gcc:lld`
2457
+ // have a matching linker choice.
2448
2458
if use_ld != "lld" && unstable_opts. gcc_ld == Some ( LdImpl :: Lld ) {
2449
2459
early_error (
2450
2460
error_format,
You can’t perform that action at this time.
0 commit comments