From 16c9b3042d925270d1536429a239261b5a7df9b8 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Wed, 5 Jan 2022 11:42:13 -0800 Subject: Add categories to --help text (#4421) The general shape of the --help output is now: ======================== wasm-foo Does the foo operation ======================== wasm-foo opts: -------------- --foo-bar .. Tool opts: ---------- .. The options are now in categories, with the more specific ones - most likely to be wanted by the user - first. I think this makes the list a lot less confusing. In particular, in wasm-opt all the opt passes are now in their own category. Also add a script to make it easy to update the help tests. --- src/tools/wasm-split/split-options.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/tools/wasm-split/split-options.h') diff --git a/src/tools/wasm-split/split-options.h b/src/tools/wasm-split/split-options.h index faa6ee30f..d52f215cd 100644 --- a/src/tools/wasm-split/split-options.h +++ b/src/tools/wasm-split/split-options.h @@ -75,12 +75,14 @@ struct WasmSplitOptions : ToolOptions { WasmSplitOptions& add(const std::string& longName, const std::string& shortName, const std::string& description, + const std::string& category, std::vector&& modes, Arguments arguments, const Action& action); WasmSplitOptions& add(const std::string& longName, const std::string& shortName, const std::string& description, + const std::string& category, Arguments arguments, const Action& action); bool validate(); -- cgit v1.2.3