Explorar el Código

quickjs-ng: fix limit plat & add more configs (#5093)

star9029 hace 1 año
padre
commit
ea12e0f1c9
Se han modificado 1 ficheros con 6 adiciones y 1 borrados
  1. 6 1
      packages/q/quickjs-ng/xmake.lua

+ 6 - 1
packages/q/quickjs-ng/xmake.lua

@@ -8,6 +8,8 @@ package("quickjs-ng")
 
     add_versions("v0.5.0", "41212a6fb84bfe07d61772c02513734b7a06465843ba8f76f1ce1e5df866f489")
 
+    add_configs("libc", {description = "Build standard library modules as part of the library", default = false, type = "boolean"})
+
     if is_plat("linux", "bsd") then
         add_syslinks("m", "pthread")
     end
@@ -24,11 +26,14 @@ package("quickjs-ng")
         end)
     end
 
-    on_install("!iphoneos and windows|!x86", function (package)
+    on_install("!iphoneos and (!windows or windows|!x86)", function (package)
         local configs = {}
         table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release"))
         table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
         table.insert(configs, "-DCONFIG_ASAN=" .. (package:config("asan") and "ON" or "OFF"))
+        table.insert(configs, "-DCONFIG_MSAN=" .. (package:config("msan") and "ON" or "OFF"))
+        table.insert(configs, "-DCONFIG_UBSAN=" .. (package:config("ubsan") and "ON" or "OFF"))
+        table.insert(configs, "-DBUILD_QJS_LIBC=" .. (package:config("libc") and "ON" or "OFF"))
         if package:config("shared") and package:is_plat("windows") then
             table.insert(configs, "-DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON")
         end