Skip to content

Commit

Permalink
Update xmake.lua to error out on buggy xmake versions
Browse files Browse the repository at this point in the history
Add an error for versions of xmake that can't correctly compile *.bpf.c
files.
  • Loading branch information
waruqi authored and anakryiko committed Nov 17, 2021
1 parent eb48c9e commit 1b9d2a5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions examples/c/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ add_rules("mode.release", "mode.debug")
add_rules("platform.linux.bpf")
set_license("GPL-2.0")

if xmake.version():satisfies(">=2.5.7 <=2.5.9") then
on_load(function (target)
raise("xmake(%s) has a bug preventing BPF source code compilation. Please run `xmake update -f 2.5.6` to revert to v2.5.6 version or upgrade to xmake v2.6.1 that fixed the issue.", xmake.version())
end)
end

option("system-libbpf", {showmenu = true, default = false, description = "Use system-installed libbpf"})
option("require-bpftool", {showmenu = true, default = false, description = "Require bpftool package"})

Expand Down

0 comments on commit 1b9d2a5

Please sign in to comment.