Bug creation and email sending has been disabled, file new bugs at gcc.gnu.org/bugzilla
Bug 119 - GDC needs friendlier command switches
Summary: GDC needs friendlier command switches
Status: NEW
Alias: None
Product: GDC
Classification: Unclassified
Component: gdc (show other bugs)
Version: development
Hardware: All All
: --- normal
Assignee: Iain Buclaw
URL:
Depends on:
Blocks:
 
Reported: 2014-04-13 18:46 CEST by Iain Buclaw
Modified: 2015-08-19 19:00 CEST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Iain Buclaw 2014-04-13 18:46:01 CEST
Some of GDC's command-line switches are just an eyesore to look at, and are not very obvious or intuitive as to what they do.

To name the main culprits:

-fintfc
-fintfc-dir
-fintfc-file
-fXf
-fd-vtls
-fd-verbose
-fdoc
-fdoc-dir=
-fdoc-file=
-fdoc-inc=


These, and possibly a few others that either don't control the compilation or don't have a negative form should instead be clear --long-options rather than abbreviated -foptions.
Comment 1 Iain Buclaw 2014-07-14 19:56:35 CEST
Any takers on proposed names?

Am looking to set-up aliases for the 2.066 release (and deprecate the old-style switches).
Comment 2 Iain Buclaw 2014-07-14 20:45:36 CEST
OK, this is my proposal:

--dump=json (-fXf)
--dump=tls (-fd-vtls)
--dump=frontend (-fd-verbose)
--dump=all  (all above)

All the above shall be written to a file, not stderr (this is so that these options never conflct with -pipe)

Files generated by --dump will be written in the working directory where gdc was called from.


--write-ddoc (-fdoc-file)
--write-interfaces (-fintfc)
--write-dependencies (-fmake-deps)
--write-user-dependencies (-fmake-mdeps)

*.ddoc will be added to lang-spec.h as a recognised language file instead of the ugly -fdoc-inc=

Remove -dir= switches, maybe also remove the -file= switches too.

Files generated by --write will be written in the same directory path as the -o file
Comment 3 Iain Buclaw 2015-08-19 19:00:44 CEST
OK - I think it's may be time to make a push for this.

While I'm at it, lets go for having short DMD-style switches for most things, changing all others to be aliases to the short opts.

-write-interfaces Alias(H)
fintfc Alias(H)
fintfc-dir= Alias(Hd)
fintfc-file= Alias(Hf)

-write-ddoc Alias(D)
fdoc Alias(D)
fdoc-dir= Alias(Dd)
fdoc-file= Alias(Df)

-write-dependencies Alias(MD)
-write-user-dependencies Alias(MMD)
fdeps Alias(M)
fdeps= Alias(MF)

As per earlier comments:
 * --write-xxx will be the new long aliases
 * -fxxx will be documented as "This switch is deprecated; use <short switch> instead"

The various --dump-xxx commands will be hashed out later.