Skip to content

Commit

Permalink
ClangParser: fix builtin includes
Browse files Browse the repository at this point in the history
Commit 14cb69d added the "/bpftrace/include" prefix to headers
generated by bpftrace (__btf_generated_header.h, clang_workarounds.h),
however, commit bc73244 ("Don't unpack kernel headers or look in tmp
(#3156)") broke the latter when moving code around in main.cpp.

Reintroduce the prefix.
  • Loading branch information
viktormalik committed May 21, 2024
1 parent 67629c1 commit 4c8b262
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ static void parse_env(BPFtrace& bpftrace)
}
}
extra_flags.push_back("-include");
extra_flags.push_back(CLANG_WORKAROUNDS_H);
extra_flags.push_back("/bpftrace/include/" CLANG_WORKAROUNDS_H);

for (auto dir : include_dirs) {
extra_flags.push_back("-I");
Expand Down

0 comments on commit 4c8b262

Please sign in to comment.