From a2500c761ba3740dd416eaebac808f7c8d93aef7 Mon Sep 17 00:00:00 2001 From: midipix Date: Wed, 28 Feb 2024 21:33:56 +0000 Subject: ar mode: -Wdlsyms: require an accompanying -Wdlunit argument. --- src/logic/slbt_exec_ar.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/logic/slbt_exec_ar.c') diff --git a/src/logic/slbt_exec_ar.c b/src/logic/slbt_exec_ar.c index 2abf7f2..ad8896c 100644 --- a/src/logic/slbt_exec_ar.c +++ b/src/logic/slbt_exec_ar.c @@ -307,7 +307,19 @@ int slbt_exec_ar(const struct slbt_driver_ctx * dctx) (void)0; } else if (cctx->fmtflags & SLBT_OUTPUT_ARCHIVE_DLSYMS) { - (void)0; + if (!cctx->dlunit) + slbt_dprintf(fderr, + "%s: missing -Wdlunit: generation of a dlsyms vtable " + "requires the name of the dynamic library, executable " + "program, or dynamic module for which the vtable would " + "be generated.\n", + dctx->program); + + return slbt_exec_ar_fail( + ectx,meta, + SLBT_CUSTOM_ERROR( + dctx, + SLBT_ERR_AR_DLUNIT_NOT_SPECIFIED)); } else if (!(cctx->drvflags & SLBT_DRIVER_MODE_AR_ACTIONS)) { if (cctx->drvflags & SLBT_DRIVER_VERBOSITY_ERRORS) -- cgit v1.2.3