remove -O add-C++ and -O update-C++ options

This commit is contained in:
Vern Paxson 2021-11-07 17:02:18 -08:00
parent e1a760e674
commit bb618bae30
3 changed files with 1 additions and 38 deletions

View file

@ -202,8 +202,6 @@ static void print_analysis_help()
fprintf(stderr, " report-uncompilable print names of functions that can't be compiled\n"); fprintf(stderr, " report-uncompilable print names of functions that can't be compiled\n");
fprintf(stderr, " use-C++ use available C++ script bodies\n"); fprintf(stderr, " use-C++ use available C++ script bodies\n");
fprintf(stderr, "\n experimental options for incremental compilation:\n"); fprintf(stderr, "\n experimental options for incremental compilation:\n");
fprintf(stderr, " add-C++ generate private C++ for any missing script bodies\n");
fprintf(stderr, " update-C++ generate reusable C++ for any missing script bodies\n");
} }
static void set_analysis_option(const char* opt, Options& opts) static void set_analysis_option(const char* opt, Options& opts)
@ -223,9 +221,7 @@ static void set_analysis_option(const char* opt, Options& opts)
exit(0); exit(0);
} }
if ( util::streq(opt, "add-C++") ) if ( util::streq(opt, "dump-uds") )
a_o.add_CPP = true;
else if ( util::streq(opt, "dump-uds") )
a_o.activate = a_o.dump_uds = true; a_o.activate = a_o.dump_uds = true;
else if ( util::streq(opt, "dump-xform") ) else if ( util::streq(opt, "dump-xform") )
a_o.activate = a_o.dump_xform = true; a_o.activate = a_o.dump_xform = true;
@ -253,8 +249,6 @@ static void set_analysis_option(const char* opt, Options& opts)
a_o.inliner = a_o.report_recursive = true; a_o.inliner = a_o.report_recursive = true;
else if ( util::streq(opt, "report-uncompilable") ) else if ( util::streq(opt, "report-uncompilable") )
a_o.report_uncompilable = true; a_o.report_uncompilable = true;
else if ( util::streq(opt, "update-C++") )
a_o.update_CPP = true;
else if ( util::streq(opt, "use-C++") ) else if ( util::streq(opt, "use-C++") )
a_o.use_CPP = true; a_o.use_CPP = true;
else if ( util::streq(opt, "xform") ) else if ( util::streq(opt, "xform") )

View file

@ -221,8 +221,6 @@ static void init_options()
check_env_opt("ZEEK_PROFILE", analysis_options.profile_ZAM); check_env_opt("ZEEK_PROFILE", analysis_options.profile_ZAM);
// Compile-to-C++-related options. // Compile-to-C++-related options.
check_env_opt("ZEEK_ADD_CPP", analysis_options.add_CPP);
check_env_opt("ZEEK_UPDATE_CPP", analysis_options.update_CPP);
check_env_opt("ZEEK_GEN_CPP", analysis_options.gen_CPP); check_env_opt("ZEEK_GEN_CPP", analysis_options.gen_CPP);
check_env_opt("ZEEK_GEN_STANDALONE_CPP", analysis_options.gen_standalone_CPP); check_env_opt("ZEEK_GEN_STANDALONE_CPP", analysis_options.gen_standalone_CPP);
check_env_opt("ZEEK_COMPILE_ALL", analysis_options.compile_all); check_env_opt("ZEEK_COMPILE_ALL", analysis_options.compile_all);
@ -233,23 +231,6 @@ static void init_options()
analysis_options.gen_CPP = true; analysis_options.gen_CPP = true;
if ( analysis_options.gen_CPP ) if ( analysis_options.gen_CPP )
{
if ( analysis_options.add_CPP )
{
reporter->Warning("gen-C++ incompatible with add-C++");
analysis_options.add_CPP = false;
}
if ( analysis_options.update_CPP )
{
reporter->Warning("gen-C++ incompatible with update-C++");
analysis_options.update_CPP = false;
}
generating_CPP = true;
}
if ( analysis_options.update_CPP || analysis_options.add_CPP )
generating_CPP = true; generating_CPP = true;
if ( analysis_options.use_CPP && generating_CPP ) if ( analysis_options.use_CPP && generating_CPP )

View file

@ -96,18 +96,6 @@ struct AnalyOpt
// of the corresponding script, and not activated by default). // of the corresponding script, and not activated by default).
bool gen_standalone_CPP = false; bool gen_standalone_CPP = false;
// If true, generate C++ for those script bodies that don't already
// have generated code, in a form that enables later compiles to
// take advantage of the newly-added elements. Only use for generating
// a zeek that will always include the associated scripts.
bool update_CPP = false;
// If true, generate C++ for those script bodies that don't already
// have generated code. The added C++ is not made available for
// later generated code, and will work for a generated zeek that
// runs without including the associated scripts.
bool add_CPP = false;
// If true, use C++ bodies if available. // If true, use C++ bodies if available.
bool use_CPP = false; bool use_CPP = false;