Thread overview
Survey: Is somebody using the -enable-*/-disable-* command line option pairs?
Mar 15, 2015
Kai Nacke
Mar 15, 2015
Dan Olson
Apr 14, 2015
Johan Engelen
Mar 21, 2015
Johan Engelen
Apr 10, 2015
David Nadlinger
Apr 14, 2015
Temtaime
March 15, 2015
Hi!

Some command line options have a switch to turn them on and off, e.g. -enable-asserts and -disable-asserts.
These option pairs are only available for a handful of ldc2 command line options. Every option defined inside the LLVM framework does not offer an opposite switch, e.g. -disable-red-zone exists but not -enable-red-zone.

With LLVM 3.7, an overhaul of the option code has started. In consequence, the implementation for the ldc2 option pairs does not work anymore. I have an idea how to fix it but this includes a fair amount of work.

Before I start fixing the code I would like to know if someone is using these options.

If not then I will deprecated these options and remove them by the time LLVM 3.7 is released (will be in late autumn).

Regards,
Kai
March 15, 2015
I sometimes use, but rare.

Because inlining is enabled by default with -O2 and above:

ldc2 -output-s -O0 -enable-inlining xyzzy.d
ldc2 -output-s -O2 -disable-inlining xyzzy.d

If it is lots of work to keep with LLVM 3.7, then it is not worth it to me.
--
Dan
March 21, 2015
Thanks for working on this Kai.
Our build relies on -disable-invariants being a valid cmdline switch, and so now LLVM 3.7 builds fail for me. (I'd like to be able to build with LLVM3.7 to compare exception handling between 3.6/3.7 and work on issues that pop up in that area)
April 10, 2015
On Sunday, 15 March 2015 at 14:20:00 UTC, Kai Nacke wrote:
> If not then I will deprecated these options and remove them by the time LLVM 3.7 is released (will be in late autumn).

We might want to thinkg about making -singleobj the default at the same time to avoid people having to review their makefiles twice. Or, on the other hand, avoid doing two "breaking" changes at the same time. Either way, we should think about it.

 — David
April 14, 2015
I think ldc should come with options as original DMD. Nobody is interested in all those switches.
-debug
-release
-inline
-O
I think only one option should be added to this list:
-arch:(SSE3|SSE4|AVX|AVX2)
April 14, 2015
On Sunday, 15 March 2015 at 15:39:15 UTC, Dan Olson wrote:
> Because inlining is enabled by default with -O2 and above:
>
> ldc2 -output-s -O0 -enable-inlining xyzzy.d
> ldc2 -output-s -O2 -disable-inlining xyzzy.d

I think this is still possible with the standard bool LLVM
option. It would look like:
  ldc2 -output-s -O0 -inlining=true xyzzy.d
  ldc2 -output-s -O2 -inlining=false xyzzy.d

See http://llvm.org/docs/CommandLine.html#boolean-arguments