Improve memorymapping (#3171)

* improve memorymapping

* update libbpf
pull/3175/head
ruki 10 months ago committed by GitHub
parent 18b02b3ded
commit df9fbd9a8d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 15
      packages/l/libbpf/xmake.lua
  2. 7
      packages/m/memorymapping/xmake.lua

@ -3,7 +3,7 @@ package("libbpf")
set_homepage("https://github.com/libbpf/libbpf")
set_description("Automated upstream mirror for libbpf stand-alone build.")
set_urls("https://github.com/libbpf/libbpf/archive/$(version).tar.gz",
add_urls("https://github.com/libbpf/libbpf/archive/refs/tags/$(version).tar.gz",
"https://github.com/libbpf/libbpf.git")
add_versions("v0.3", "c168d84a75b541f753ceb49015d9eb886e3fb5cca87cdd9aabce7e10ad3a1efc")
@ -11,14 +11,6 @@ package("libbpf")
add_includedirs("include", "include/uapi")
on_load("android", function (package)
import("core.tool.toolchain")
local ndk_sdkver = toolchain.load("ndk", {plat = package:plat(), arch = package:arch()}):config("ndk_sdkver")
if ndk_sdkver and tonumber(ndk_sdkver) < 23 then
package:add("deps", "memorymapping")
end
end)
on_install("linux", "android", function (package)
io.writefile("xmake.lua", [[
add_rules("mode.debug", "mode.release")
@ -35,11 +27,6 @@ package("libbpf")
end
]])
local configs = {}
if package:config("shared") then
configs.kind = "shared"
elseif package:config("pic") ~= false then
configs.cxflags = "-fPIC"
end
import("package.tools.xmake").install(package, configs)
end)

@ -7,7 +7,7 @@ package("memorymapping")
add_versions("2014.12.21", "79ce0ddd0de4b11e4944625eb866290368f867c0")
on_install("android", "macosx", "iphoneos", function (package)
on_install("macosx", "iphoneos", function (package)
io.writefile("xmake.lua", [[
add_rules("mode.debug", "mode.release")
target("fmemopen")
@ -16,11 +16,6 @@ package("memorymapping")
add_headerfiles("src/*.h")
]])
local configs = {}
if package:config("shared") then
configs.kind = "shared"
elseif package:config("pic") ~= false then
configs.cxflags = "-fPIC"
end
import("package.tools.xmake").install(package, configs)
end)

Loading…
Cancel
Save