Skip to content

Commit

Permalink
Merge pull request iovisor#1795 from iovisor/yhs_dev2
Browse files Browse the repository at this point in the history
Add "-D __BPF_TRACING__" to frontend compilation flags
  • Loading branch information
4ast authored Jun 2, 2018
2 parents d8bb097 + 7c4311f commit db09336
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/cc/frontends/clang/loader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,11 @@ int ClangLoader::parse(unique_ptr<llvm::Module> *mod, TableStorage &ts,
// Enable -O2 for clang. In clang 5.0, -O0 may result in function marking as
// noinline and optnone (if not always inlining).
// Note that first argument is ignored in clang compilation invocation.
// "-D __BPF_TRACING__" below is added to suppress a warning in 4.17+.
// It can be removed once clang supports asm-goto or the kernel removes
// the warning.
vector<const char *> flags_cstr({"-O0", "-O2", "-emit-llvm", "-I", dstack.cwd(),
"-D", "__BPF_TRACING__",
"-Wno-deprecated-declarations",
"-Wno-gnu-variable-sized-type-not-at-end",
"-Wno-pragma-once-outside-header",
Expand Down

0 comments on commit db09336

Please sign in to comment.