Forráskód Böngészése

update libxmake (#1497)

* update libxmake

* fix format error

* fix format error

* fix link

* fix shared
ruki 3 éve
szülő
commit
41128e2779
1 módosított fájl, 8 hozzáadás és 6 törlés
  1. 8 6
      packages/l/libxmake/xmake.lua

+ 8 - 6
packages/l/libxmake/xmake.lua

@@ -9,22 +9,23 @@ package("libxmake")
              "https://gitlab.com/tboox/xmake.git")
 
     add_versions("v2.5.9", "5b50e3f28956cabcaa153624c91781730387ceb7c056f3f9b5306b1c77460d8f")
+    add_versions("v2.7.1", "e44085090641547d8814afcc345d641d8ce1e38b6e05fee7375fc88150c0803d")
 
     add_configs("readline", { description = "Enable readline library.", default = false, type = "boolean"})
+    add_configs("shared", {description = "Build shared library.", default = false, type = "boolean", readonly = true})
 
     add_includedirs("include")
     if is_plat("windows") then
-        add_ldflags("/export:malloc", "/export:free")
+        add_ldflags("/export:malloc", "/export:free", "/export:memmove")
         add_syslinks("kernel32", "user32", "gdi32")
         add_syslinks("ws2_32", "advapi32", "shell32")
+        add_ldflags("/LTCG")
+        add_shflags("/LTCG")
     elseif is_plat("android") then
         add_syslinks("m", "c")
     elseif is_plat("macosx") then
         add_ldflags("-all_load", "-pagezero_size 10000", "-image_base 100000000")
-    elseif is_plat("msys") then
-        add_ldflags("-static-libgcc", {force = true})
-        add_syslinks("kernel32", "user32", "gdi32")
-        add_syslinks("ws2_32", "advapi32", "shell32")
+        add_frameworks("CoreFoundation", "CoreServices")
     else
         add_syslinks("pthread", "dl", "m", "c")
     end
@@ -42,7 +43,7 @@ package("libxmake")
         if package:debug() then
             package:add("defines", "__tb_debug__")
         end
-        package:add("links", "lua-cjson")
+        package:add("links", "lua-cjson", "lz4")
         if not package:gitref() and package:version():le("2.5.9") then
             package:add("includedirs", "include/luajit")
             package:add("links", "luajit")
@@ -64,6 +65,7 @@ package("libxmake")
         end
         table.insert(configs, "--readline=" .. (package:config("readline") and "y" or "n"))
         os.cd("core")
+        io.replace("xmake.lua", 'set_warnings("all", "error")', "", {plain = true})
         import("package.tools.xmake").install(package, configs)
         os.cp("../xmake", package:installdir("share"))
     end)