Skip to content

Commit

Permalink
build: remove llvm-dev dependency from libbcc
Browse files Browse the repository at this point in the history
In #4737 I added depedency on llvm-config.h in order to discover what LLVM version
is being used. This was only meant to be used at build time.
By adding llvm-config.h in bpf_module.h, a public header of libbcc, I introduced
a dependency on llvm-dev to libbcc which is unnecessary.

This change removes the include from `bpf_module.h`, which should be enough, and
add it to `bpf_module.cc` instead.

Fixes #4997

Signed-off-by: Manu Bretelle <chantr4@gmail.com>
  • Loading branch information
chantra authored and yonghong-song committed May 30, 2024
1 parent c93a19a commit 5b8e284
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 1 addition & 0 deletions src/cc/bpf_module.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

#include <fcntl.h>
#include <linux/bpf.h>
#include <llvm/Config/llvm-config.h>
#if LLVM_VERSION_MAJOR <= 16
#include <llvm-c/Transforms/IPO.h>
#endif
Expand Down
2 changes: 0 additions & 2 deletions src/cc/bpf_module.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
#include <string>
#include <vector>

#include <llvm/Config/llvm-config.h>

#include "bcc_exception.h"
#include "table_storage.h"

Expand Down

0 comments on commit 5b8e284

Please sign in to comment.