Make the CFG metadata computation conditional on a flag.

This commit is contained in:
Chris Fallin
2021-05-24 11:16:57 -07:00
parent 11a2ef01e7
commit 800cf25bb5
4 changed files with 49 additions and 22 deletions

View File

@@ -245,6 +245,21 @@ pub(crate) fn define() -> SettingGroup {
true,
);
settings.add_bool(
"machine_code_cfg_info",
"Generate CFG metadata for machine code.",
r#"
This increases metadata size and compile time, but allows for the
embedder to more easily post-process or analyze the generated
machine code. It provides code offsets for the start of each
basic block in the generated machine code, and a list of CFG
edges (with blocks identified by start offsets) between them.
This is useful for, e.g., machine-code analyses that verify certain
properties of the generated code.
"#,
false,
);
// BaldrMonkey requires that not-yet-relocated function addresses be encoded
// as all-ones bitpatterns.
settings.add_bool(