Factor out version-printing to usage.cpp (#1870)

This commit is contained in:
Rangi
2025-12-05 23:04:49 -05:00
committed by GitHub
parent c8161be23a
commit 33475e2c36
6 changed files with 14 additions and 11 deletions

View File

@@ -21,7 +21,6 @@
#include "usage.hpp"
#include "util.hpp" // UpperMap, printChar
#include "verbosity.hpp"
#include "version.hpp"
#include "link/assign.hpp"
#include "link/lexer.hpp"
@@ -283,7 +282,7 @@ static void parseArg(int ch, char *arg) {
// LCOV_EXCL_START
case 'V':
printf("%s %s\n", usage.name.c_str(), get_package_version_string());
usage.printVersion(false);
exit(0);
case 'v':
@@ -330,7 +329,7 @@ static void verboseOutputConfig() {
style_Set(stderr, STYLE_MAGENTA, false);
fprintf(stderr, "%s %s\n", usage.name.c_str(), get_package_version_string());
usage.printVersion(true);
printVVVVVVerbosity();