Build: support passing VM flags to subprocesses

Created on 7 Nov 2019  路  8Comments  路  Source: dart-lang/build

Users would like to be able to plumb VM flags to subprocesses. The main motivating example at this time is to specify a different --old-gen-heap-size to the VM when invoking dart2js to prevent OOM errors. See https://github.com/dart-lang/sdk/issues/27883 for an example

@jakemac53 - not sure if this is the right repo to track this?

Most helpful comment

Thanks! Can confirm this does in fact get --old-gen-heap-size through to dart2js when running webdev.

All 8 comments

@jakemac53 should this be bounced over to the build package?

and possibly might need a similar issue for webdev

It should be done with an environment variable, so only build will have to know about it.

How do we want to support passing multiple arguments here? separate by commas or...?

Actually I will just go with space separated args

planned name for the environment variable is BUILD_DART2JS_VM_ARGS

This has been publish in build_modules 2.7.0. Multiple arguments can be provided by separating them with spaces.

Thanks! Can confirm this does in fact get --old-gen-heap-size through to dart2js when running webdev.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

corwinsheahan-wf picture corwinsheahan-wf  路  5Comments

Hexer10 picture Hexer10  路  4Comments

Fjnova picture Fjnova  路  6Comments

kentcb picture kentcb  路  7Comments

carlowenig picture carlowenig  路  3Comments