Thread overview | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
June 01, 2013 Re: Suggestion: Build windows DMD with MSVC | ||||
---|---|---|---|---|
| ||||
On 6/1/13, Manu <turkeyman@gmail.com> wrote: > Building DMD with MSVC results in a compiler that runs MUCH MUCH faster. In the interest of making DMD releases as fast as possible, this should be standardised. Just one thing: Before attempting to build git-head, the following pull is required: https://github.com/D-Programming-Language/dmd/pull/2102 For some reason when I use DMD built with MSVC my unittests don't run. Other than that it does seem to be faster. I haven't ran any benchmarks yet. |
June 01, 2013 Re: Suggestion: Build windows DMD with MSVC | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrej Mitrovic | Am 01.06.2013 03:23, schrieb Andrej Mitrovic:
> On 6/1/13, Manu <turkeyman@gmail.com> wrote:
>> Building DMD with MSVC results in a compiler that runs MUCH MUCH faster.
>> In the interest of making DMD releases as fast as possible, this should be
>> standardised.
>
> Just one thing: Before attempting to build git-head, the following
> pull is required:
> https://github.com/D-Programming-Language/dmd/pull/2102
>
> For some reason when I use DMD built with MSVC my unittests don't run.
>
> Other than that it does seem to be faster. I haven't ran any benchmarks yet.
>
There is a bug in the visual studio 2010 and up compiler which causes real support to break. Its easiyl fixable though:
Replace line 136 in longdouble.h
template<typename T> inline longdouble ldouble(volatile T x) { longdouble d; d.set(x); return d; }
with
template<typename T> __declspec(noinline) longdouble ldouble(T x) { longdouble d; d.set(x); return d; }
And your unittests should run again.
Visual Studio 2008 and older don't have that problem.
Kind Regards
Benjamin Thaut
|
June 01, 2013 Re: Suggestion: Build windows DMD with MSVC | ||||
---|---|---|---|---|
| ||||
Posted in reply to Benjamin Thaut | On 6/1/13, Benjamin Thaut <code@benjamin-thaut.de> wrote:
> There is a bug in the visual studio 2010 and up compiler which causes real support to break.
Ouch. I'll give it a go soon. Is this filed as a bug / pull ready somewhere?
|
June 01, 2013 Re: Suggestion: Build windows DMD with MSVC | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrej Mitrovic | Am 01.06.2013 15:35, schrieb Andrej Mitrovic:
> On 6/1/13, Benjamin Thaut <code@benjamin-thaut.de> wrote:
>> There is a bug in the visual studio 2010 and up compiler which causes
>> real support to break.
>
> Ouch. I'll give it a go soon. Is this filed as a bug / pull ready somewhere?
>
This is a MSVC only bug, its a optimizer bug in the microsoft c++ compiler. I didn't do a pull request for it because I thought no one would be interrested in it.
Kind Regards
Benjamin Thaut
|
June 01, 2013 Re: Suggestion: Build windows DMD with MSVC | ||||
---|---|---|---|---|
| ||||
Posted in reply to Benjamin Thaut | On 6/1/13, Benjamin Thaut <code@benjamin-thaut.de> wrote: > And your unittests should run again. I've tried this fix, it still doesn't work for me: $ echo unittest { assert(0); } void main() { } > test.d $ rdmd --force -unittest --compiler=dmd_dmc test.d > core.exception.AssertError@test(1): unittest failure $ rdmd --force -unittest --compiler=dmd_msc test.d > I've tried with a clean build and then a full release build. |
June 01, 2013 Re: Suggestion: Build windows DMD with MSVC | ||||
---|---|---|---|---|
| ||||
On 6/1/13, Andrej Mitrovic <andrej.mitrovich@gmail.com> wrote:
> I've tried with a clean build and then a full release build.
Same problem with the debug build. :/
|
June 01, 2013 Re: Suggestion: Build windows DMD with MSVC | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrej Mitrovic | Am 01.06.2013 16:34, schrieb Andrej Mitrovic:
> On 6/1/13, Benjamin Thaut <code@benjamin-thaut.de> wrote:
>> And your unittests should run again.
>
> I've tried this fix, it still doesn't work for me:
>
> $ echo unittest { assert(0); } void main() { } > test.d
>
> $ rdmd --force -unittest --compiler=dmd_dmc test.d
>> core.exception.AssertError@test(1): unittest failure
>
> $ rdmd --force -unittest --compiler=dmd_msc test.d
>>
>
> I've tried with a clean build and then a full release build.
>
Strange, is this the latest git version of dmd? The last time I tried compiling with MSVC was dmd 2.062
Its possible that its borken again, as the only guy keeping it working is Rainer Schuetze. Thid you try debugging the executable generated by the dmd_msc ? Most likely its throwing some hardware exception which emediatly kills it.
Kind Regards
Benjamin Thaut
|
June 01, 2013 Re: Suggestion: Build windows DMD with MSVC | ||||
---|---|---|---|---|
| ||||
Posted in reply to Benjamin Thaut | On 6/1/13, Benjamin Thaut <code@benjamin-thaut.de> wrote: > Most likely its throwing some hardware exception which emediatly kills it. It turns out it's something related to RDMD: $ rdmd --force -unittest --compiler=dmd_msc test.d > $ dmd_msc -unittest test.d -oftest.exe && test.exe > core.exception.AssertError@test(1): unittest failure I've also tried it *without* your patch, and I get the same results. So it looks like an RDMD-related bug. |
June 01, 2013 Re: Suggestion: Build windows DMD with MSVC | ||||
---|---|---|---|---|
| ||||
Posted in reply to Benjamin Thaut |
On 01.06.2013 16:39, Benjamin Thaut wrote:
> Am 01.06.2013 16:34, schrieb Andrej Mitrovic:
>> On 6/1/13, Benjamin Thaut <code@benjamin-thaut.de> wrote:
>>> And your unittests should run again.
>>
>> I've tried this fix, it still doesn't work for me:
>>
>> $ echo unittest { assert(0); } void main() { } > test.d
>>
>> $ rdmd --force -unittest --compiler=dmd_dmc test.d
>>> core.exception.AssertError@test(1): unittest failure
>>
>> $ rdmd --force -unittest --compiler=dmd_msc test.d
>>>
>>
>> I've tried with a clean build and then a full release build.
>>
>
> Strange, is this the latest git version of dmd? The last time I tried
> compiling with MSVC was dmd 2.062
> Its possible that its borken again, as the only guy keeping it working
> is Rainer Schuetze. Thid you try debugging the executable generated by
> the dmd_msc ? Most likely its throwing some hardware exception which
> emediatly kills it.
>
> Kind Regards
> Benjamin Thaut
If I remember correctly you also had problems with a MSVC build invoking the linker if there are spaces in the path to it. I suspect this might also happen when rdmd tries to run the program.
|
June 01, 2013 Re: Suggestion: Build windows DMD with MSVC | ||||
---|---|---|---|---|
| ||||
Posted in reply to Benjamin Thaut |
On 01.06.2013 16:20, Benjamin Thaut wrote:
> Am 01.06.2013 15:35, schrieb Andrej Mitrovic:
>> On 6/1/13, Benjamin Thaut <code@benjamin-thaut.de> wrote:
>>> There is a bug in the visual studio 2010 and up compiler which causes
>>> real support to break.
>>
>> Ouch. I'll give it a go soon. Is this filed as a bug / pull ready
>> somewhere?
>>
>
> This is a MSVC only bug, its a optimizer bug in the microsoft c++
> compiler. I didn't do a pull request for it because I thought no one
> would be interrested in it.
And it only manifests itself in the debug build, because the respective code is not inlined.
|
Copyright © 1999-2021 by the D Language Foundation