Merge pull request #427 from simonjwright/callgraph

Provide control over -fcallgraph-info in project wizard.
This commit is contained in:
Pat Rogers 2024-02-27 11:26:52 -06:00 committed by GitHub
commit 1c179807ef
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 13 additions and 6 deletions

View File

@ -188,8 +188,9 @@ def ADL_configuration(config, project_directory, project_name,
type Build_Type is ("Debug", "Production");
Build : Build_Type := external ("ADL_BUILD", "Debug");
type Build_Checks_Type is ("Disabled", "Enabled");
Build_Checks : Build_Checks_Type := external ("ADL_BUILD_CHECKS", "Disabled");
type Disabled_Or_Enabled_Type is ("Disabled", "Enabled");
Build_Checks : Disabled_Or_Enabled_Type := external ("ADL_BUILD_CHECKS", "Disabled");
Callgraphs : Disabled_Or_Enabled_Type := external ("CALLGRAPHS", "Enabled");
-- Target architecture
"""
@ -199,11 +200,17 @@ def ADL_configuration(config, project_directory, project_name,
gpr += """
Target := Project'Target;
-- Callgraph info is not available on all architectures
-- Callgraph info is not available on all architectures, and not always
-- desired
Callgraph_Switch := ();
case Target is
when "riscv32-unknown-elf" => null;
when others => Callgraph_Switch := ("-fcallgraph-info=su");
case Callgraphs is
when "Enabled" =>
case Target is
when "riscv32-unknown-elf" => null;
when others => Callgraph_Switch := ("-fcallgraph-info=su");
end case;
when "Disabled" =>
null;
end case;
Build_Checks_Switches := ();