diff options
| author | Leo Di Donato <[email protected]> | 2022-04-14 12:58:30 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-04-14 12:58:30 +0200 |
| commit | a4723aca5f13984010556d190be7d8790406d678 (patch) | |
| tree | 3facd790ba64a4284729a5aa02d7f4c13f44504f | |
| parent | 23dd00c8f43b6c84a617578ae960e5d79f1735f5 (diff) | |
update(rules/platform/linux/bpf): enforce -O2 when compiling BPF
To avoid compiler optimizations messing up with generated IR and BPF instructions is paramount to enforce the optimization level to 2 disregarding the mode (whether it is set to debug or release etc.)
Signed-off-by: Leonardo Di Donato <[email protected]>
| -rw-r--r-- | xmake/rules/platform/linux/bpf/xmake.lua | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/xmake/rules/platform/linux/bpf/xmake.lua b/xmake/rules/platform/linux/bpf/xmake.lua index d2afd9160..b14e6a9a0 100644 --- a/xmake/rules/platform/linux/bpf/xmake.lua +++ b/xmake/rules/platform/linux/bpf/xmake.lua @@ -46,6 +46,7 @@ rule("platform.linux.bpf") targetarch = "__TARGET_ARCH_powerpc" end target:add("includedirs", path.directory(headerfile)) + target:set("optimize", "faster") batchcmds:show_progress(opt.progress, "${color.build.object}compiling.bpf %s", sourcefile) batchcmds:mkdir(path.directory(objectfile)) batchcmds:compile(sourcefile, objectfile, {configs = {force = {cxflags = {"-target bpf", "-g"}}, defines = targetarch}}) |
