Skip to content

Commit

Permalink
Gate l4-bender linker flavor
Browse files Browse the repository at this point in the history
  • Loading branch information
petrochenkov authored and atopia committed Jan 21, 2022
1 parent 660d993 commit 29d6235
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion compiler/rustc_session/src/config.rs
Expand Up @@ -12,7 +12,7 @@ use rustc_data_structures::fx::FxHashSet;
use rustc_data_structures::impl_stable_hash_via_hash;

use rustc_target::abi::{Align, TargetDataLayout};
use rustc_target::spec::{SplitDebuginfo, Target, TargetTriple, TargetWarnings};
use rustc_target::spec::{LinkerFlavor, SplitDebuginfo, Target, TargetTriple, TargetWarnings};

use rustc_serialize::json;

Expand Down Expand Up @@ -2237,6 +2237,16 @@ pub fn build_session_options(matches: &getopts::Matches) -> Options {
}
}

if cg.linker_flavor == Some(LinkerFlavor::L4Bender)
&& !nightly_options::is_unstable_enabled(matches)
{
early_error(
error_format,
"`l4-bender` linker flavor is unstable, `-Z unstable-options` \
flag must also be passed to explicitly use it",
);
}

let prints = collect_print_requests(&mut cg, &mut debugging_opts, matches, error_format);

let cg = cg;
Expand Down

0 comments on commit 29d6235

Please sign in to comment.