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

pull/5095/head
star9029 6 months ago committed by GitHub
parent 7b6d85f7df
commit ea12e0f1c9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 7
      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

Loading…
Cancel
Save