Commit 155f1926 authored by Alastair Robertson's avatar Alastair Robertson

ClangParser: Fix behaviour if kernel headers are not found

Still continue regular clang parsing, just without extra kernel header flags
parent 1e42caf5
......@@ -164,13 +164,14 @@ void ClangParser::parse(ast::Program *program, StructMap &structs)
auto kpath = kernel_modules_dir + "/" + kpath_info.second;
bool has_kpath_source = kpath_info.first;
ebpf::DirStack dstack(kpath);
if (!dstack.ok())
return;
std::vector<std::string> kflags;
ebpf::DirStack dstack(kpath);
if (dstack.ok())
{
ebpf::KBuildHelper kbuild_helper(kpath, has_kpath_source);
std::vector<std::string> kflags;
kbuild_helper.get_flags(utsname.machine, &kflags);
}
std::vector<const char *> args =
{
......
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