mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Merge remote-tracking branch 'origin/topic/vern/standalone-skip-fatal'
* origin/topic/vern/standalone-skip-fatal: for -O gen-standalone-C++, make the presence of uncompilable functions fatal unless -O allow-cond is used
This commit is contained in:
commit
b25a844210
4 changed files with 18 additions and 1 deletions
4
CHANGES
4
CHANGES
|
@ -1,3 +1,7 @@
|
||||||
|
8.1.0-dev.538 | 2025-09-12 09:24:51 -0700
|
||||||
|
|
||||||
|
* for -O gen-standalone-C++, make the presence of uncompilable functions fatal unless -O allow-cond is used (Vern Paxson, Corelight)
|
||||||
|
|
||||||
8.1.0-dev.536 | 2025-09-12 09:24:12 -0700
|
8.1.0-dev.536 | 2025-09-12 09:24:12 -0700
|
||||||
|
|
||||||
* Bump zeekctl for new trace-summary/pysubnettree versions (Tim Wojtulewicz, Corelight)
|
* Bump zeekctl for new trace-summary/pysubnettree versions (Tim Wojtulewicz, Corelight)
|
||||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
||||||
8.1.0-dev.536
|
8.1.0-dev.538
|
||||||
|
|
|
@ -25,6 +25,13 @@ CPPCompile::CPPCompile(vector<FuncInfo>& _funcs, std::shared_ptr<ProfileFuncs> _
|
||||||
}
|
}
|
||||||
|
|
||||||
Compile(report_uncompilable);
|
Compile(report_uncompilable);
|
||||||
|
|
||||||
|
if ( standalone && skipped_uncompilable_func && ! analysis_options.allow_cond ) {
|
||||||
|
reporter->Error(
|
||||||
|
"standalone C++ compilation incomplete due to having to skip some functions; use \"-O allow-cond\" to "
|
||||||
|
"override");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CPPCompile::~CPPCompile() { fclose(write_file); }
|
CPPCompile::~CPPCompile() { fclose(write_file); }
|
||||||
|
@ -208,6 +215,7 @@ bool CPPCompile::AnalyzeFuncBody(FuncInfo& fi, unordered_set<string>& filenames_
|
||||||
}
|
}
|
||||||
|
|
||||||
fi.SetSkip(true);
|
fi.SetSkip(true);
|
||||||
|
skipped_uncompilable_func = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -252,6 +260,8 @@ bool CPPCompile::AnalyzeFuncBody(FuncInfo& fi, unordered_set<string>& filenames_
|
||||||
}
|
}
|
||||||
|
|
||||||
not_fully_compilable.insert(f->GetName());
|
not_fully_compilable.insert(f->GetName());
|
||||||
|
skipped_uncompilable_func = true;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -104,6 +104,9 @@ std::unordered_map<std::string, std::string> hashed_funcs;
|
||||||
// If true, the generated code should run "standalone".
|
// If true, the generated code should run "standalone".
|
||||||
bool standalone = false;
|
bool standalone = false;
|
||||||
|
|
||||||
|
// If true, compilation skipped at least one function due to non-compilability.
|
||||||
|
bool skipped_uncompilable_func = false;
|
||||||
|
|
||||||
// Hash over the functions in this compilation. This is only needed for
|
// Hash over the functions in this compilation. This is only needed for
|
||||||
// "seatbelts", to ensure that we can produce a unique hash relating to this
|
// "seatbelts", to ensure that we can produce a unique hash relating to this
|
||||||
// compilation (*and* its compilation time, which is why these are "seatbelts"
|
// compilation (*and* its compilation time, which is why these are "seatbelts"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue