Thread overview
Where can I find a reference for compiler flags?
Jun 05, 2019
Mike Brockus
Jun 05, 2019
Jacob Carlborg
Jun 09, 2019
Mike Brockus
Jun 09, 2019
Marco de Wild
June 05, 2019
If you never herd about Meson before:
🤔. https://mesonbuild.com/

I was surprised to find out about Visual D.  And now I’m getting concerned about whether my current D projects will work on windows beings that I am about to move my operations on a Windows computer.

Where can I find a reference for compiler flags?

Also any recommendations for making windows compatible programs?

I would like to use the standard libraries over none standard.
June 05, 2019
On 2019-06-05 03:19, Mike Brockus wrote:

> Where can I find a reference for compiler flags?

Here's the reference [1]. You can also run "dmd --help" to print out the available flags. [1] might not be up to date.

[1] https://dlang.org/dmd-windows.html

-- 
/Jacob Carlborg
June 09, 2019
On Wednesday, 5 June 2019 at 09:45:53 UTC, Jacob Carlborg wrote:
> On 2019-06-05 03:19, Mike Brockus wrote:
>
>> Where can I find a reference for compiler flags?
>
> Here's the reference [1]. You can also run "dmd --help" to print out the available flags. [1] might not be up to date.
>
> [1] https://dlang.org/dmd-windows.html

This bit of information was helpful.  But do you know what this is -dip- followed by some number...  I seen three of them in Mir Algorithm meson build.
June 09, 2019
On Sunday, 9 June 2019 at 19:12:32 UTC, Mike Brockus wrote:
> On Wednesday, 5 June 2019 at 09:45:53 UTC, Jacob Carlborg wrote:
>> On 2019-06-05 03:19, Mike Brockus wrote:
>>
>>> Where can I find a reference for compiler flags?
>>
>> Here's the reference [1]. You can also run "dmd --help" to print out the available flags. [1] might not be up to date.
>>
>> [1] https://dlang.org/dmd-windows.html
>
> This bit of information was helpful.  But do you know what this is -dip- followed by some number...  I seen three of them in Mir Algorithm meson build.

A DIP is a D improvement proposal. It is basically a request for a change of the language. Some of these can be implemented in one go, as they don't have any breaking changes. However, some DIPs break an unknown amount of code. To allow for a smooth transition, the new features are implemented, and are opt-in. Users can then gradually get their code base to compile with the new behaviour.

The DIP flags indicate that the compiler will build your code with said improvement enabled. The three DIPs you are talking about are

* dip25 which implements https://github.com/dlang/DIPs/blob/master/DIPs/archive/DIP25.md
  This is about sealed references. If I understand correctly, switching this flag requires that you annotate a ref function parameter with return if you want to return it from the function.

* dip1000 which implements https://github.com/dlang/DIPs/blob/master/DIPs/other/DIP1000.md
  This implements more scope checking for pointers. It hands a few extra safety checks for when pointers may last longer than the data they actually point to.

* dip1008 which implements https://github.com/dlang/DIPs/blob/master/DIPs/DIP1008.md
  This allows users to throw exceptions in @nogc code.

For completeness, they correspond to the current "-preview=dipX" compiler flag. They have been grouped together under the "preview" option because they were cluttering the interface. In fact, I gathered the information in this post by running "-preview=?", listing all features here. Also, at some time in the future, a preview will become the default behaviour.