From 37ff4abbe80b0fac3cfd543629a7c29e58b97d61 Mon Sep 17 00:00:00 2001 From: midipix Date: Fri, 18 Mar 2016 19:43:41 -0400 Subject: driver: accept --config even when no --mode has been specified. --- src/driver/slbt_driver_ctx.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') 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); -- cgit v1.2.3