mirror of
https://github.com/netdata/libbpf.git
synced 2026-04-09 18:19:06 +08:00
Add a test step to produce a minimal binary using libbpf.
This patch adds a test step to link a minimal program to libbpf library produced, making sure that the library works.
This commit is contained in:
committed by
Andrii Nakryiko
parent
70ad3e8314
commit
6bf8babb33
14
travis-ci/managers/test_compile.sh
Executable file
14
travis-ci/managers/test_compile.sh
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
set -euox pipefail
|
||||
|
||||
CFLAGS=${CFLAGS:-}
|
||||
|
||||
cat << EOF > main.c
|
||||
#include <bpf/libbpf.h>
|
||||
int main() {
|
||||
return bpf_object__open(0) < 0;
|
||||
}
|
||||
EOF
|
||||
|
||||
# static linking
|
||||
${CC:-cc} ${CFLAGS} -o main -I./install/usr/include main.c ./build/libbpf.a -lelf -lz
|
||||
Reference in New Issue
Block a user