Skip to content

Commit 29d6235

Browse files
petrochenkovatopia
authored andcommitted
Gate l4-bender linker flavor
1 parent 660d993 commit 29d6235

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

compiler/rustc_session/src/config.rs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use rustc_data_structures::fx::FxHashSet;
1212
use rustc_data_structures::impl_stable_hash_via_hash;
1313

1414
use rustc_target::abi::{Align, TargetDataLayout};
15-
use rustc_target::spec::{SplitDebuginfo, Target, TargetTriple, TargetWarnings};
15+
use rustc_target::spec::{LinkerFlavor, SplitDebuginfo, Target, TargetTriple, TargetWarnings};
1616

1717
use rustc_serialize::json;
1818

@@ -2237,6 +2237,16 @@ pub fn build_session_options(matches: &getopts::Matches) -> Options {
22372237
}
22382238
}
22392239

2240+
if cg.linker_flavor == Some(LinkerFlavor::L4Bender)
2241+
&& !nightly_options::is_unstable_enabled(matches)
2242+
{
2243+
early_error(
2244+
error_format,
2245+
"`l4-bender` linker flavor is unstable, `-Z unstable-options` \
2246+
flag must also be passed to explicitly use it",
2247+
);
2248+
}
2249+
22402250
let prints = collect_print_requests(&mut cg, &mut debugging_opts, matches, error_format);
22412251

22422252
let cg = cg;

0 commit comments

Comments
 (0)