Verified Commit f3916c79 authored by Camil Staps's avatar Camil Staps
Browse files

Make -dynamics a project option and add -ndynamics

parent 3ec7d9da
Pipeline #49221 passed with stage
in 9 seconds
......@@ -53,8 +53,6 @@ only generate object (.o) files of modules in the project.
These options apply whenever a module is recompiled, but do not trigger recompilation themselves.
.IP -ci\ -nci
enable/disable array indices checking. (default: -nci)
.IP -dynamics
enable support for dynamics.
.IP -lt\ -nlt
enable/disable listing only the inferred types. (default -nlt)
.IP -lat\ -nlat
......@@ -68,6 +66,8 @@ enable the function totality checker but only emit it as a warning.
.SH PROJECT OPTIONS
These options apply to the whole project.
If a module was previously compiled with different options, it is recompiled.
.IP -dynamics\ -ndynamics
enable/disable support for dynamics. (default: -ndynamics)
.IP -desc
generate all descriptors.
.IP -exl
......
......@@ -211,7 +211,7 @@ static char *cocl_redirect_stderr,*cocl_redirect_stderr_option;
static int redirect_stderr_to_stdout=1;
#endif
static int check_stack_overflow,check_indices,dynamics;
static int check_stack_overflow,check_indices;
#ifdef ARM
static int position_independent_code;
#endif
......@@ -1191,6 +1191,13 @@ static int project_node_is_abc_up_to_date (P_NODE project_node)
return 0;
}
if ((DYNAMICS_MASK & (clean_options ^ abc_options))!=0){
if (verbose)
warning_s ("(%s.icl is compiled with different dynamics option)",project_node->pro_fname);
close_abc_file();
return 0;
}
if ((NO_DESCRIPTORS_MASK & (clean_options ^ abc_options))!=0){
if (verbose)
warning_s ("(%s.icl is compiled with different descriptors option)",project_node->pro_fname);
......@@ -2047,7 +2054,7 @@ static int compile_project_node (P_NODE project_node)
*arg++="-pt";
if ((clean_options & CALLGRAPH_PROFILE_MASK)!=0)
*arg++="-pg";
if (dynamics)
if ((clean_options & DYNAMICS_MASK)!=0)
*arg++="-dynamics";
if (project_node->pro_valid_options)
......@@ -4056,7 +4063,6 @@ static void argument_error (void)
printf ("\nCompilation options:\n");
printf (" -ci -nci Enable/disable array indices checking\n");
printf (" (default: -nci)\n");
printf (" -dynamics Enable support for dynamics\n");
printf (" -lt -nlt Enable/disable listing only the inferred types\n");
printf (" (note: strictness information is never included)\n");
printf (" (default: -nlt)\n");
......@@ -4068,6 +4074,8 @@ static void argument_error (void)
printf (" -warnfuncmayfail\n");
printf (" Enable the function totality checker but only emit warnings\n");
printf ("\nProject options:\n");
printf (" -dynamics -ndynamics\n");
printf (" Enable/disable support for dynamics\n");
printf (" -desc Generate all descriptors\n");
printf (" -exl Export local labels\n");
printf (" -tst Generate code for stack tracing\n");
......@@ -4447,7 +4455,6 @@ int main (int argc,char **argv)
#ifdef ARM
position_independent_code=0;
#endif
dynamics=0;
#ifdef OPTIMISE_LINK
no_optimise_link=0;
#endif
......@@ -4606,7 +4613,9 @@ int main (int argc,char **argv)
} else if (!strcmp (s,"ngeneric_fusion")){
option_off (GENERIC_FUSION_MASK);
} else if (!strcmp (s,"dynamics")){
dynamics=1;
option_on (DYNAMICS_MASK);
} else if (!strcmp (s,"ndynamics")){
option_off (DYNAMICS_MASK);
} else if (!strcmp (s,"clc")){
++arg_n;
if (arg_n>=argc)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment