Skip to content

Commit 1c17980

Browse files
authored
Merge pull request #427 from simonjwright/callgraph
Provide control over -fcallgraph-info in project wizard.
2 parents c45af33 + eca308e commit 1c17980

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

scripts/project_wizard.py

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,9 @@ def ADL_configuration(config, project_directory, project_name,
188188
type Build_Type is ("Debug", "Production");
189189
Build : Build_Type := external ("ADL_BUILD", "Debug");
190190
191-
type Build_Checks_Type is ("Disabled", "Enabled");
192-
Build_Checks : Build_Checks_Type := external ("ADL_BUILD_CHECKS", "Disabled");
191+
type Disabled_Or_Enabled_Type is ("Disabled", "Enabled");
192+
Build_Checks : Disabled_Or_Enabled_Type := external ("ADL_BUILD_CHECKS", "Disabled");
193+
Callgraphs : Disabled_Or_Enabled_Type := external ("CALLGRAPHS", "Enabled");
193194
194195
-- Target architecture
195196
"""
@@ -199,11 +200,17 @@ def ADL_configuration(config, project_directory, project_name,
199200
gpr += """
200201
Target := Project'Target;
201202
202-
-- Callgraph info is not available on all architectures
203+
-- Callgraph info is not available on all architectures, and not always
204+
-- desired
203205
Callgraph_Switch := ();
204-
case Target is
205-
when "riscv32-unknown-elf" => null;
206-
when others => Callgraph_Switch := ("-fcallgraph-info=su");
206+
case Callgraphs is
207+
when "Enabled" =>
208+
case Target is
209+
when "riscv32-unknown-elf" => null;
210+
when others => Callgraph_Switch := ("-fcallgraph-info=su");
211+
end case;
212+
when "Disabled" =>
213+
null;
207214
end case;
208215
209216
Build_Checks_Switches := ();

0 commit comments

Comments
 (0)