summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-03-18 19:43:41 -0400
committermidipix <writeonce@midipix.org>2016-03-18 19:49:09 -0400
commit37ff4abbe80b0fac3cfd543629a7c29e58b97d61 (patch)
tree577ee1c1cb7fbd7dbc2db6f262e7aca8adcef8d8
parent24efc664156da7567a4af08dd4027af75ed9e256 (diff)
downloadslibtool-37ff4abbe80b0fac3cfd543629a7c29e58b97d61.tar.bz2
slibtool-37ff4abbe80b0fac3cfd543629a7c29e58b97d61.tar.xz
driver: accept --config even when no --mode has been specified.
-rw-r--r--src/driver/slbt_driver_ctx.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/driver/slbt_driver_ctx.c b/src/driver/slbt_driver_ctx.c
index 03f01b1..05cf04e 100644
--- a/src/driver/slbt_driver_ctx.c
+++ b/src/driver/slbt_driver_ctx.c
@@ -115,6 +115,7 @@ static int slbt_split_argv(
struct argv_meta * meta;
struct argv_entry * entry;
struct argv_entry * mode;
+ struct argv_entry * config;
const struct argv_option * option;
const struct argv_option * options = slbt_default_options;
struct argv_ctx ctx = {ARGV_VERBOSITY_NONE,
@@ -155,14 +156,16 @@ static int slbt_split_argv(
meta = argv_get(argv,options,ARGV_VERBOSITY_NONE);
argv[ctx.unitidx] = compiler;
- /* missing --mode? */
+ /* missing both --mode and --config? */
for (mode=0, entry=meta->entries; entry->fopt; entry++)
if (entry->tag == TAG_MODE)
mode = entry;
+ else if (entry->tag == TAG_CONFIG)
+ config = entry;
argv_free(meta);
- if (!mode) {
+ if (!mode && !config) {
fprintf(stderr,
"%s: error: --mode must be specified.\n",
program);