Skip to content

Commit

Permalink
Adding Linux analysis target
Browse files Browse the repository at this point in the history
for use with GNATSAS deep CI runs
  • Loading branch information
dinkelk committed Aug 12, 2024
1 parent b702562 commit d3f5ef3
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
25 changes: 25 additions & 0 deletions redo/targets/gpr/linux_analyze.gpr
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
project linux_analyze extends all "a_linux_debug_base.gpr" is

-----------------------------------------------
-- These lines of code must be included at the
-- top of every Adamant based .gpr file. They
-- are used to connect the Adamant build system
-- to GPRBuild.
-----------------------------------------------
for Source_Dirs use a_adamant.SOURCE_DIRS;
for Object_Dir use a_adamant.OBJECT_DIR;
for Exec_Dir use a_adamant.EXEC_DIR;

package Compiler is
-- Add preprocessor definitions and configuration pragma switches:
for Switches ("Ada") use a_linux_debug_base.Compiler'Switches ("Ada") &
-- add ravenscar restriction
("-gnatec=" & a_adamant.ADAMANT_DIR & "/redo/targets/configuration_pragmas/ravenscar.adc");
end Compiler;

-- Force analysis into "deep" mode
package Analyzer is
for Switches ("analyze") use ("--mode=deep");
end Analyzer;

end linux_analyze;
18 changes: 18 additions & 0 deletions redo/targets/linux.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,21 @@ class Linux_Prove(Linux_Debug):
"""This is the target used with GNATprove to verify SPARK code."""
def description(self):
return "This target is used to generate the path for calls to GNATprove to analyze SPARK code."


class Linux_Analyze(Linux_Base):
"""Analyze target which runs GNAT SAS in deep mode."""
def description(self):
return ("Same as Linux_Debug except it adds deep mode switch for GNAT SAS.")

def gpr_project_file(self):
return os.path.join(
os.environ["ADAMANT_DIR"],
"redo"
+ os.sep
+ "targets"
+ os.sep
+ "gpr"
+ os.sep
+ "linux_analyze.gpr",
)

0 comments on commit d3f5ef3

Please sign in to comment.