Skip to content

feat: improve GN tool to support extra arguments#6149

Merged
waruqi merged 2 commits intoxmake-io:devfrom
poirierlouis:dev
Feb 13, 2025
Merged

feat: improve GN tool to support extra arguments#6149
waruqi merged 2 commits intoxmake-io:devfrom
poirierlouis:dev

Conversation

@poirierlouis
Copy link
Contributor

@poirierlouis poirierlouis commented Feb 11, 2025

package.tools.gn

Allows to pass extra arguments to ninja command. It defaults to an empty table (no arguments).

Example of usage:

local gn = import("package.tools.gn")

gn.build(package, configs, {buildir = "out.gn", argv = {"v8_monolith"}})
--                                              ^
--                                              | optional key of strings

This is a solution to discussion: #6148 (comment)
I've been able to test with my local installation of xmake. fyi, it allows to reduce time to build V8 in half.

Let me know if something is wrong or need changes.

Allows to pass extra arguments to ninja command. It defaults to an empty table (no arguments) for backward compatibility.
- rename option from argv to target, follows usage of ninja.
- add option in install command.
@waruqi waruqi added this to the v2.9.9 milestone Feb 13, 2025
@waruqi waruqi merged commit da482b4 into xmake-io:dev Feb 13, 2025
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants