From 4a25a5b4b1e010be17135cef4d024314ceab3012 Mon Sep 17 00:00:00 2001 From: Junyeong Jeong Date: Sun, 17 Oct 2021 22:34:03 +0900 Subject: [PATCH] Give the llvm11 feature to redbpf-tools and example-userspace In order to re-enable Alpine Linux 3.14 build test, add llvm11 feature to redbpf-tools and example-userspace crates. Signed-off-by: Junyeong Jeong Reviewed-by: rsdy --- .github/workflows/build-test.yml | 3 +-- examples/example-userspace/Cargo.toml | 4 +++- redbpf-tools/Cargo.toml | 6 +++++- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 05590598..1e82cde9 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -111,7 +111,6 @@ jobs: alpine-314-build-test: name: Alpine 3.14 (Disabled until LLVM12 support) runs-on: ubuntu-latest - if: false steps: - uses: actions/checkout@v2 - name: Build host info @@ -137,7 +136,7 @@ jobs: - ubuntu-2104-build-test - ubuntu-2004-build-test - ubuntu-1804-build-test - # - alpine-314-build-test + - alpine-314-build-test steps: - uses: actions/checkout@v2 diff --git a/examples/example-userspace/Cargo.toml b/examples/example-userspace/Cargo.toml index 27e33e17..2b939c99 100644 --- a/examples/example-userspace/Cargo.toml +++ b/examples/example-userspace/Cargo.toml @@ -10,7 +10,7 @@ keywords = ["bpf", "ebpf", "build", "bindgen", "redbpf"] publish = false [build-dependencies] -cargo-bpf = { path = "../../cargo-bpf", default-features = false, features = ["build", "llvm12"] } +cargo-bpf = { path = "../../cargo-bpf", default-features = false, features = ["build"] } [dependencies] probes = { path = "../example-probes", package = "example-probes" } @@ -28,3 +28,5 @@ required-features = ["kernel5_8"] # bpf iterator has been supported since kerne [features] kernel5_8 = [] +default = ["cargo-bpf/llvm12"] +llvm11 = ["cargo-bpf/llvm11"] diff --git a/redbpf-tools/Cargo.toml b/redbpf-tools/Cargo.toml index 6fab8028..c79aa06d 100644 --- a/redbpf-tools/Cargo.toml +++ b/redbpf-tools/Cargo.toml @@ -7,7 +7,7 @@ repository = "https://github.com/foniod/redbpf" publish = false [build-dependencies] -cargo-bpf = { path = "../cargo-bpf", default-features = false, features = ["build", "llvm12"] } +cargo-bpf = { path = "../cargo-bpf", default-features = false, features = ["build"] } [dependencies] probes = { path = "./probes" } @@ -16,3 +16,7 @@ tokio = { version = "^1.0.1", features = ["rt", "macros", "signal", "time"] } futures = "0.3" getopts = "0.2" libc = "0.2" + +[features] +default = ["cargo-bpf/llvm12"] +llvm11 = ["cargo-bpf/llvm11"]