error if multiple -g options are given for abc
authorN. Engelhardt <nak@symbioticeda.com>
Mon, 6 Jan 2020 18:10:13 +0000 (19:10 +0100)
committerN. Engelhardt <nak@symbioticeda.com>
Mon, 6 Jan 2020 18:10:13 +0000 (19:10 +0100)
passes/techmap/abc.cc

index 28a1c01b1c782c7a7ed03fc3a6e81a2524086173..581652a41ae93cb469d6d4cb78fe91eee29586fa 100644 (file)
@@ -1623,6 +1623,8 @@ struct AbcPass : public Pass {
                                continue;
                        }
                        if (arg == "-g" && argidx+1 < args.size()) {
+                               if (g_arg_from_cmd)
+                                       log_cmd_error("Can only use -g once. Please combine.");
                                g_arg = args[++argidx];
                                g_argidx = argidx;
                                g_arg_from_cmd = true;