summaryrefslogtreecommitdiff
path: root/src/logic
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2024-01-22 01:42:49 +0000
committermidipix <writeonce@midipix.org>2024-01-22 03:49:50 +0000
commitb87f7032b8573966b0537698544c65fbb3f2c143 (patch)
treeeadd79d7237281dede96a0908fde5ccea6c71cbe /src/logic
parent0b535fd267e5b8ebc031b5ca24984102adada87a (diff)
downloadslibtool-b87f7032b8573966b0537698544c65fbb3f2c143.tar.bz2
slibtool-b87f7032b8573966b0537698544c65fbb3f2c143.tar.xz
ar mode: added --version support.
Diffstat (limited to 'src/logic')
-rw-r--r--src/logic/slbt_exec_ar.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/logic/slbt_exec_ar.c b/src/logic/slbt_exec_ar.c
index 3e1c0f2..18ee97e 100644
--- a/src/logic/slbt_exec_ar.c
+++ b/src/logic/slbt_exec_ar.c
@@ -142,6 +142,10 @@ int slbt_exec_ar(
& SLBT_DRIVER_ANNOTATE_NEVER);
return 0;
+ case TAG_AR_VERSION:
+ ictx->cctx.drvflags |= SLBT_DRIVER_VERSION;
+ break;
+
case TAG_AR_CHECK:
ictx->cctx.drvflags |= SLBT_DRIVER_MODE_AR_CHECK;
break;
@@ -155,6 +159,13 @@ int slbt_exec_ar(
};
}
+ /* defer --version printing to slbt_main() as needed */
+ if (cctx->drvflags & SLBT_DRIVER_VERSION) {
+ argv_free(meta);
+ slbt_free_exec_ctx(actx);
+ return SLBT_OK;
+ }
+
/* at least one action must be specified */
if (!(cctx->drvflags & SLBT_DRIVER_MODE_AR_ACTIONS)) {
if (cctx->drvflags & SLBT_DRIVER_VERBOSITY_ERRORS)