convert ehcont-guard to an unstable option
This commit is contained in:
parent
d582f1092b
commit
9429d68842
@ -350,8 +350,9 @@ pub unsafe fn create_module<'ll>(
|
||||
1,
|
||||
);
|
||||
}
|
||||
|
||||
// Set module flag to enable Windows EHCont Guard (/guard:ehcont).
|
||||
if sess.opts.cg.ehcont_guard {
|
||||
if sess.opts.unstable_opts.ehcont_guard {
|
||||
llvm::LLVMRustAddModuleFlag(
|
||||
llmod,
|
||||
llvm::LLVMModFlagBehavior::Warning,
|
||||
|
@ -2379,7 +2379,7 @@ fn add_order_independent_options(
|
||||
}
|
||||
|
||||
// OBJECT-FILES-NO, AUDIT-ORDER
|
||||
if sess.opts.cg.ehcont_guard {
|
||||
if sess.opts.unstable_opts.ehcont_guard {
|
||||
cmd.ehcont_guard();
|
||||
}
|
||||
|
||||
|
@ -1387,8 +1387,6 @@ pub(crate) fn parse_llvm_module_flag(
|
||||
"allow the linker to link its default libraries (default: no)"),
|
||||
dlltool: Option<PathBuf> = (None, parse_opt_pathbuf, [UNTRACKED],
|
||||
"import library generation tool (ignored except when targeting windows-gnu)"),
|
||||
ehcont_guard: bool = (false, parse_bool, [TRACKED],
|
||||
"generate Windows EHCont Guard tables"),
|
||||
embed_bitcode: bool = (true, parse_bool, [TRACKED],
|
||||
"emit bitcode in rlibs (default: yes)"),
|
||||
extra_filename: String = (String::new(), parse_string, [UNTRACKED],
|
||||
@ -1584,6 +1582,8 @@ pub(crate) fn parse_llvm_module_flag(
|
||||
"version of DWARF debug information to emit (default: 2 or 4, depending on platform)"),
|
||||
dylib_lto: bool = (false, parse_bool, [UNTRACKED],
|
||||
"enables LTO for dylib crate type"),
|
||||
ehcont_guard: bool = (false, parse_bool, [TRACKED],
|
||||
"generate Windows EHCont Guard tables"),
|
||||
emit_stack_sizes: bool = (false, parse_bool, [UNTRACKED],
|
||||
"emit a section containing stack size metadata (default: no)"),
|
||||
emit_thin_lto: bool = (true, parse_bool, [TRACKED],
|
||||
|
@ -1,4 +1,4 @@
|
||||
// compile-flags: -C ehcont_guard
|
||||
// compile-flags: -Z ehcont-guard
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user