From 1e38985fef4cce8dec3e3d8da54e92dd458dc8ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20=C5=9Aliwak?= Date: Thu, 16 Apr 2020 18:05:54 +0200 Subject: [PATCH 1/3] command-line help: Clarify that --optimize-yul no longer does anything --- solc/CommandLineInterface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solc/CommandLineInterface.cpp b/solc/CommandLineInterface.cpp index 90c2931c5..0338b234f 100644 --- a/solc/CommandLineInterface.cpp +++ b/solc/CommandLineInterface.cpp @@ -753,7 +753,7 @@ Allowed options)", "Set for how many contract runs to optimize." "Lower values will optimize more for initial deployment cost, higher values will optimize more for high-frequency usage." ) - (g_strOptimizeYul.c_str(), "Enable Yul optimizer in Solidity. Legacy option: the yul optimizer is enabled as part of the general --optimize option.") + (g_strOptimizeYul.c_str(), "Legacy option, ignored. Use the general --optimize to enable Yul optimizer.") (g_strNoOptimizeYul.c_str(), "Disable Yul optimizer in Solidity.") (g_argPrettyJson.c_str(), "Output JSON in pretty format. Currently it only works with the combined JSON output.") ( From 004be1788f8492c3fd2280d3e6c80204115fb91a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20=C5=9Aliwak?= Date: Thu, 16 Apr 2020 18:12:53 +0200 Subject: [PATCH 2/3] command-line help: Move optimizer options to a separate section --- solc/CommandLineInterface.cpp | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/solc/CommandLineInterface.cpp b/solc/CommandLineInterface.cpp index 0338b234f..3c1445e44 100644 --- a/solc/CommandLineInterface.cpp +++ b/solc/CommandLineInterface.cpp @@ -746,15 +746,6 @@ Allowed options)", "Select desired EVM version. Either homestead, tangerineWhistle, spuriousDragon, " "byzantium, constantinople, petersburg, istanbul (default) or berlin." ) - (g_argOptimize.c_str(), "Enable bytecode optimizer.") - ( - g_argOptimizeRuns.c_str(), - po::value()->value_name("n")->default_value(200), - "Set for how many contract runs to optimize." - "Lower values will optimize more for initial deployment cost, higher values will optimize more for high-frequency usage." - ) - (g_strOptimizeYul.c_str(), "Legacy option, ignored. Use the general --optimize to enable Yul optimizer.") - (g_strNoOptimizeYul.c_str(), "Disable Yul optimizer in Solidity.") (g_argPrettyJson.c_str(), "Output JSON in pretty format. Currently it only works with the combined JSON output.") ( g_argLibraries.c_str(), @@ -834,6 +825,18 @@ Allowed options)", (g_argOldReporter.c_str(), "Enables old diagnostics reporter.") (g_argErrorRecovery.c_str(), "Enables additional parser error recovery.") (g_argIgnoreMissingFiles.c_str(), "Ignore missing files."); + po::options_description optimizerOptions("Optimizer options"); + optimizerOptions.add_options() + (g_argOptimize.c_str(), "Enable bytecode optimizer.") + ( + g_argOptimizeRuns.c_str(), + po::value()->value_name("n")->default_value(200), + "Set for how many contract runs to optimize." + "Lower values will optimize more for initial deployment cost, higher values will optimize more for high-frequency usage." + ) + (g_strOptimizeYul.c_str(), "Legacy option, ignored. Use the general --optimize to enable Yul optimizer.") + (g_strNoOptimizeYul.c_str(), "Disable Yul optimizer in Solidity."); + desc.add(optimizerOptions); po::options_description outputComponents("Output Components"); outputComponents.add_options() (g_argAstJson.c_str(), "AST of all source files in JSON format.") From 56af85ef39acc9a9ff64ce74167ab27d3df2a2e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20=C5=9Aliwak?= Date: Thu, 16 Apr 2020 18:20:28 +0200 Subject: [PATCH 3/3] command-line help: Minor whitespace and text tweaks --- solc/CommandLineInterface.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/solc/CommandLineInterface.cpp b/solc/CommandLineInterface.cpp index 3c1445e44..79da75289 100644 --- a/solc/CommandLineInterface.cpp +++ b/solc/CommandLineInterface.cpp @@ -778,8 +778,8 @@ Allowed options)", ) ( g_argImportAst.c_str(), - "Import ASTs to be compiled, assumes input holds the AST in compact JSON format." - " Supported Inputs is the output of the standard-json or the one produced by --combined-json ast,compact-format" + "Import ASTs to be compiled, assumes input holds the AST in compact JSON format. " + "Supported Inputs is the output of the --standard-json or the one produced by --combined-json ast,compact-format" ) ( @@ -831,7 +831,7 @@ Allowed options)", ( g_argOptimizeRuns.c_str(), po::value()->value_name("n")->default_value(200), - "Set for how many contract runs to optimize." + "Set for how many contract runs to optimize. " "Lower values will optimize more for initial deployment cost, higher values will optimize more for high-frequency usage." ) (g_strOptimizeYul.c_str(), "Legacy option, ignored. Use the general --optimize to enable Yul optimizer.")