Open Bug 1019273 Opened 9 years ago Updated 6 months ago

Support passing arguments through |mach build-backend| to config_status


(Firefox Build System :: General, defect)



(Not tracked)


(Reporter: nalexander, Unassigned)


(Blocks 1 open bug)


I would like to allow arguments to |mach build-backend -b=AndroidEclipse|.  I reckon other build backends will grow arguments as well.

I'd like build peer feedback on the best way to do this. Some mxr, grep, and experiments lead me to the following:

It's possible to pass arguments through build-backend to, but it's a little ugly to handle per-command arguments in config_status itself.  The most sensible thing appears to be replace config_status's optparse with argparse and replace the existing -b=Backend argument with command subparsers, but it's not easy to have a default command (in the way RecursiveMake is the current default).  It doesn't look like there are many config_status invocations; adding the default RecursiveMake command to each seems feasible.
Blocks: ide
Flags: needinfo?(mh+mozilla)
Flags: needinfo?(gps)
+1 for supporting options to the backends. We could definitely use this for specifying where to generate IDE files.

+1 for replacing optparse with argparse.

argparse subparsers are a PITA.

What you can do to make RecursiveMake the default command is to manually iterate sys.args before they are passed into argparse. If no arguments begin with -b, append a '--backend=RecursiveMake' argument. Then, argparse will redirect it to the appropriate command parser.
Flags: needinfo?(gps)
Flags: needinfo?(mh+mozilla)
Product: Core → Firefox Build System
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.