You've already forked RecordFlux
mirror of
https://github.com/AdaCore/RecordFlux.git
synced 2026-02-12 13:01:56 -08:00
153 lines
5.6 KiB
Plaintext
153 lines
5.6 KiB
Plaintext
abstract project Defaults is
|
||
|
||
type Build_Mode is ("strict", "asserts_enabled", "optimized");
|
||
Mode : Build_Mode := external ("mode", "asserts_enabled");
|
||
Memcached := external ("MEMCACHED", "");
|
||
Procs := external ("GNATPROVE_PROCS", "");
|
||
|
||
Compiler_Variant := external ("gnat", "");
|
||
|
||
GNATVI := "-gnatVi";
|
||
GNATVO := "-gnatVo";
|
||
GNATEV := "-gnateV";
|
||
GNATA := "-gnata";
|
||
|
||
case Compiler_Variant is
|
||
when "community2020" =>
|
||
GNATVI := ""; -- https://github.com/Componolit/Workarounds/issues/43
|
||
GNATA := ""; -- https://github.com/Componolit/Workarounds/issues/49
|
||
when "community2021" =>
|
||
GNATA := ""; -- https://github.com/Componolit/Workarounds/issues/49
|
||
when "pro20.2" =>
|
||
GNATVI := ""; -- https://github.com/Componolit/Workarounds/issues/43
|
||
GNATVO := ""; -- https://github.com/Componolit/Workarounds/issues/23
|
||
GNATEV := ""; -- https://github.com/Componolit/Workarounds/issues/22
|
||
GNATA := ""; -- https://github.com/Componolit/Workarounds/issues/49
|
||
when "pro21.2" | "pro22.0" =>
|
||
GNATA := ""; -- https://github.com/Componolit/Workarounds/issues/49
|
||
when "fsf11.2.4" | "fsf12.1.2" =>
|
||
GNATA := ""; -- https://github.com/Componolit/Workarounds/issues/49
|
||
when others =>
|
||
end case;
|
||
|
||
case Mode is
|
||
when "strict" | "optimized" =>
|
||
GNATA := "";
|
||
when "asserts_enabled" =>
|
||
end case;
|
||
|
||
Global_Configuration_Pragmas := "defaults_backward_compatible.adc";
|
||
|
||
case Compiler_Variant is
|
||
when "pro23.0w-20220508" | "pro23.0" | "pro23.1" | "pro23.2" =>
|
||
Global_Configuration_Pragmas := "defaults.adc";
|
||
when others =>
|
||
end case;
|
||
|
||
Memcached_Switch := "";
|
||
case Memcached is
|
||
when "" =>
|
||
null;
|
||
when others =>
|
||
Memcached_Switch := "--memcached-server=" & Memcached;
|
||
end case;
|
||
|
||
Procs_Switch := "";
|
||
case Procs is
|
||
when "" =>
|
||
Procs_Switch := "-j 0";
|
||
when others =>
|
||
Procs_Switch := "-j " & Procs;
|
||
end case;
|
||
|
||
Proof_Switches :=
|
||
(
|
||
"--prover=z3,cvc4,altergo,colibri",
|
||
"--steps=0",
|
||
"--timeout=180",
|
||
"--memlimit=2000",
|
||
"--checks-as-errors",
|
||
"--warnings=error",
|
||
-- https://github.com/Componolit/RecordFlux/issues/670
|
||
-- "--proof-warnings",
|
||
"--no-axiom-guard",
|
||
"--counterexamples=off",
|
||
Procs_Switch,
|
||
Memcached_Switch
|
||
);
|
||
|
||
Builder_Switches :=
|
||
(
|
||
"-j0"
|
||
);
|
||
|
||
Compiler_Switches :=
|
||
(
|
||
"-gnatA", -- Avoid processing gnat.adc. If a gnat.adc file is present, it will be ignored.
|
||
"-gnatf", -- Full errors. Multiple errors per line, all undefined references, do not attempt to suppress cascaded errors.
|
||
"-gnatU", -- Tag all error messages with the unique string ‘error:’.
|
||
|
||
-- Validity Checks
|
||
"-gnatVc", -- Validity checks for copies.
|
||
"-gnatVd", -- Default (RM) validity checks.
|
||
"-gnatVe", -- Validity checks for elementary components.
|
||
"-gnatVf", -- Validity checks for floating-point values.
|
||
GNATVI, -- Validity checks for ``in`` mode parameters.
|
||
"-gnatVm", -- Validity checks for ``in out`` mode parameters.
|
||
GNATVO, -- Validity checks for operator and attribute operands.
|
||
"-gnatVp", -- Validity checks for parameters.
|
||
"-gnatVr", -- Validity checks for function returns.
|
||
"-gnatVs", -- Validity checks for subscripts.
|
||
"-gnatVt", -- Validity checks for tests.
|
||
GNATEV, -- Check that all actual parameters of a subprogram call are valid according to the rules of validity checking (Validity Checking).
|
||
|
||
-- Debugging
|
||
"-fstack-check", -- Activate stack checking.
|
||
"-g", -- Enable generation of debugging information.
|
||
GNATA, -- Enable assertions.
|
||
|
||
-- Warnings
|
||
"-gnatwa", -- Activate most optional warnings.
|
||
"-gnatw.d", -- Activate tagging of warning and info messages.
|
||
"-gnatwe", -- Treat all run-time exception warnings as errors.
|
||
"-gnatwd", -- Activate warnings on implicit dereferencing.
|
||
-- https://github.com/Componolit/Workarounds/issues/27
|
||
-- "-gnatwh", -- Activate warnings on hiding.
|
||
"-gnatwt", -- Activate warnings for tracking of deleted conditional code.
|
||
"-gnatwQ", -- Suppress warnings on questionable missing parentheses.
|
||
|
||
-- Style Checks
|
||
"-gnaty3", -- Specify indentation level.
|
||
"-gnatya", -- Check attribute casing.
|
||
"-gnatyA", -- Use of array index numbers in array attributes.
|
||
"-gnatyb", -- Blanks not allowed at statement end.
|
||
"-gnatyC", -- Check comments, single space.
|
||
"-gnatyd", -- Check no DOS line terminators present.
|
||
"-gnatye", -- Check end/exit labels.
|
||
"-gnatyf", -- No form feeds or vertical tabs.
|
||
"-gnatyh", -- No horizontal tabs.
|
||
"-gnatyi", -- Check if-then layout.
|
||
"-gnatyI", -- Check mode IN keywords.
|
||
"-gnatyk", -- Check keyword casing.
|
||
"-gnatyl", -- Check layout.
|
||
"-gnatyL9", -- Set maximum nesting level.
|
||
"-gnatyM120", -- Set maximum line length.
|
||
"-gnatyn", -- Check casing of entities in Standard.
|
||
"-gnatyO", -- Check that overriding subprograms are explicitly marked as such.
|
||
"-gnatyp", -- Check pragma casing.
|
||
"-gnatyr", -- Check references.
|
||
"-gnatyS", -- Check no statements after then/else.
|
||
"-gnatyt", -- Check token spacing.
|
||
"-gnatyu", -- Check unnecessary blank lines.
|
||
"-gnatyx", -- Check extra parentheses.
|
||
|
||
""
|
||
);
|
||
|
||
Binder_Switches :=
|
||
(
|
||
"-Es"
|
||
);
|
||
|
||
end Defaults;
|