Renames Settings ⚠️ (fixes #976) (#1321)

This is a breaking API change: the following settings have been renamed:

- jump_tables_enabled -> enable_jump_tables
- colocated_libcalls -> use_colocated_libcalls
- probestack_enabled -> enable_probestack
- allones_funcaddrs -> emit_all_ones_funcaddrs
This commit is contained in:
Benjamin Bouvier
2020-01-13 22:42:49 +01:00
committed by Sean Stangl
parent bd88155483
commit dd497c19e1
20 changed files with 37 additions and 38 deletions

View File

@@ -59,16 +59,16 @@ pub(crate) fn define(shared: &SettingGroup) -> SettingGroup {
// back in the shared SettingGroup, and use it in x86 instruction predicates.
let is_pic = shared.get_bool("is_pic");
let allones_funcaddrs = shared.get_bool("allones_funcaddrs");
let emit_all_ones_funcaddrs = shared.get_bool("emit_all_ones_funcaddrs");
settings.add_predicate("is_pic", predicate!(is_pic));
settings.add_predicate("not_is_pic", predicate!(!is_pic));
settings.add_predicate(
"all_ones_funcaddrs_and_not_is_pic",
predicate!(allones_funcaddrs && !is_pic),
predicate!(emit_all_ones_funcaddrs && !is_pic),
);
settings.add_predicate(
"not_all_ones_funcaddrs_and_not_is_pic",
predicate!(!allones_funcaddrs && !is_pic),
predicate!(!emit_all_ones_funcaddrs && !is_pic),
);
// Presets corresponding to x86 CPUs.

View File

@@ -37,7 +37,7 @@ pub(crate) fn define() -> SettingGroup {
);
settings.add_bool(
"colocated_libcalls",
"use_colocated_libcalls",
r#"
Use colocated libcalls.
@@ -177,7 +177,7 @@ pub(crate) fn define() -> SettingGroup {
// BaldrMonkey requires that not-yet-relocated function addresses be encoded
// as all-ones bitpatterns.
settings.add_bool(
"allones_funcaddrs",
"emit_all_ones_funcaddrs",
"Emit not-yet-relocated function addresses as all-ones bit patterns.",
false,
);
@@ -185,7 +185,7 @@ pub(crate) fn define() -> SettingGroup {
// Stack probing options.
settings.add_bool(
"probestack_enabled",
"enable_probestack",
r#"
Enable the use of stack probes, for calling conventions which support this
functionality.
@@ -218,7 +218,7 @@ pub(crate) fn define() -> SettingGroup {
// Jump table options.
settings.add_bool(
"jump_tables_enabled",
"enable_jump_tables",
"Enable the use of jump tables in generated machine code.",
true,
);