summaryrefslogtreecommitdiff
path: root/xmake/modules/package/tools/gn.lua
diff options
context:
space:
mode:
authorLouis Poirier <[email protected]>2025-02-11 20:16:57 +0100
committerLouis Poirier <[email protected]>2025-02-11 20:16:57 +0100
commit39a7e8b21849bf1102f0d71ca35fc2e65b5946fd (patch)
treea21a3b5d8434c965c23df6092d67bf8a4e8a9fd9 /xmake/modules/package/tools/gn.lua
parentb509baeaf00de64d57f0fa1171e4c3eaf94e0dd2 (diff)
feat: improve GN tool to support extra arguments
Allows to pass extra arguments to ninja command. It defaults to an empty table (no arguments) for backward compatibility.
Diffstat (limited to 'xmake/modules/package/tools/gn.lua')
-rw-r--r--xmake/modules/package/tools/gn.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/xmake/modules/package/tools/gn.lua b/xmake/modules/package/tools/gn.lua
index fe6566ab4..461f43259 100644
--- a/xmake/modules/package/tools/gn.lua
+++ b/xmake/modules/package/tools/gn.lua
@@ -124,7 +124,8 @@ function build(package, configs, opt)
-- do build
local buildir = _get_buildir(opt)
- ninja.build(package, {}, {buildir = buildir, envs = opt.envs or buildenvs(package, opt)})
+ local argv = opt.argv or {}
+ ninja.build(package, argv, {buildir = buildir, envs = opt.envs or buildenvs(package, opt)})
end
-- install package