"-O compile-all" option to specify compilation of inlined functions

This commit is contained in:
Vern Paxson 2021-06-01 09:24:17 -07:00
parent 7855557e92
commit b5b58b0a3a
3 changed files with 13 additions and 3 deletions

View file

@ -223,6 +223,7 @@ void analyze_scripts()
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_COMPILE_ALL", analysis_options.compile_all);
check_env_opt("ZEEK_REPORT_CPP", analysis_options.report_CPP);
check_env_opt("ZEEK_USE_CPP", analysis_options.use_CPP);
@ -523,7 +524,8 @@ void analyze_scripts()
{
auto func = f.Func();
if ( inl && inl->WasInlined(func) &&
if ( ! analysis_options.compile_all &&
inl && inl->WasInlined(func) &&
func_used_indirectly.count(func) == 0 )
// No need to compile as it won't be
// called directly.