Skip to content

Commit

Permalink
Update xmake.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
Chi-EEE committed Jan 19, 2025
1 parent ba3d840 commit 77b3572
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/q/quickjs-ng/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ package("quickjs-ng")
io.replace("CMakeLists.txt", "xcheck_add_c_compiler_flag(-Werror)", "", {plain = true})
io.replace("CMakeLists.txt", "if(NOT WIN32 AND NOT EMSCRIPTEN)", "if(0)", {plain = true})

local configs = {"-DBUILD_QJS_LIBC=ON"}
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"))
Expand All @@ -48,12 +48,11 @@ package("quickjs-ng")
if package:config("shared") and package:is_plat("windows") then
table.insert(configs, "-DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON")
end
local opt = {}
if package:is_plat("wasm") then
io.replace("quickjs-libc.c", " defined(__wasi__)", " (defined(__wasi__) || defined(EMSCRIPTEN))", {plain = true})
io.replace("quickjs-libc.c", " !defined(__wasi__)", " (!defined(__wasi__) && !defined(EMSCRIPTEN))", {plain = true})
end
import("package.tools.cmake").install(package, configs, opt)
import("package.tools.cmake").install(package, configs)
for _, filedir in ipairs(os.filedirs("**")) do
print(filedir)
end
Expand Down

0 comments on commit 77b3572

Please sign in to comment.