Open Bug 1019273 Opened 8 years ago Updated 4 years ago

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

Categories

(Firefox Build System :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

People

(Reporter: nalexander, Unassigned)

References

(Blocks 1 open bug)

Details

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 config_status.py, 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
You need to log in before you can comment on or make changes to this bug.