Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide control over -fcallgraph-info in project wizard. #427

Merged
merged 1 commit into from
Feb 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions scripts/project_wizard.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
"""
Expand All @@ -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 := ();
Expand Down
Loading