You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 5, 2022. It is now read-only.
[analyze] Use argparse library command line arg parsing (#1823)
* Use the argparse library for the argument parsing. Some of the
reasons this is an improvement are:
* Improved experience for the user as help messages are provided.
* It is easier to check argument values in the code this way.
* Arguments become self documenting, previously the usage()
function did not describe the "RESTRICT" and "V" options. By
using argparse every argument that is accepted will be shown
in --help.
* Updated two callers of analyze (Makefile & cmake/zjs_linux.cmake)
to use the new argument style.
* Changed 'outdir' to no longer be a global variable.
* Added a description of what the analyze program does to the help. Now
if the user does:
$ scripts/analyze --help
They will see:
usage: analyze [-h] --board BOARD_NAME --json-dir DIR [--prjconf FILE]
[--cmakefile FILE] [--script FILE] [--force FILE,FILE,...]
[--restrict FILE,FILE,...] [--profile FILE] [--js-out FILE]
[--output-dir DIR] [--verbose {0,1}]
Static analysis tool to detect modules being used in a script so the compiler
can include or exclude certain modules if they are/are not used. This will
output gcc pre-processor defines (-D____) so it can be used in-line -during
the compile step.
optional arguments:
-h, --help show this help message and exit
--board BOARD_NAME Board target being built.
--json-dir DIR Directory to look for JSON files.
--prjconf FILE File to write the prj.conf information to.
--cmakefile FILE CMake file to write source/options to.
--script FILE JavaScript script used to build.
--force FILE,FILE,...
Comma separated list of JSON files to force inclusion
of. Files are located in the directory specified by
--json-dir.
--restrict FILE,FILE,...
Comma separated list of JSON files. If specified only
these JSON files will be used. Files are located in
the directory specified by --json-dir.
--profile FILE File to write the JerryScript profile to.
--js-out FILE Output file to use if any JS modules are found in
--script.
--output-dir DIR Output directory.
--verbose {0,1} Level of verbosity.
Signed-off-by: John L. Villalovos <[email protected]>
Signed-off-by: Geoff Gustafson <[email protected]>
0 commit comments