mirror of
https://github.com/zeek/zeek.git
synced 2025-10-15 13:08:20 +00:00
"-O compile-all" option to specify compilation of inlined functions
This commit is contained in:
parent
7855557e92
commit
b5b58b0a3a
3 changed files with 13 additions and 3 deletions
|
@ -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.
|
||||
|
|
|
@ -61,6 +61,11 @@ struct AnalyOpt {
|
|||
// If true, use C++ bodies if available.
|
||||
bool use_CPP = false;
|
||||
|
||||
// If true, compile all compileable functions, even those that
|
||||
// are inlined. Mainly useful for ensuring compatibility for
|
||||
// some tests in the test suite.
|
||||
bool compile_all = false;
|
||||
|
||||
// If true, report on available C++ bodies.
|
||||
bool report_CPP = false;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue