Skip to content

Commit

Permalink
quickjs-ng: fix limit plat & add more configs (#5093)
Browse files Browse the repository at this point in the history
  • Loading branch information
star-hengxing authored Aug 30, 2024
1 parent 7b6d85f commit ea12e0f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/q/quickjs-ng/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit ea12e0f

Please sign in to comment.