Re: how to disable inlining of ldc2 when 'dub build --build=release'?

2017-05-22 Thread lixiaozi via Digitalmars-d-learn
On Saturday, 20 May 2017 at 10:22:14 UTC, Stanislav Blinov wrote: On Saturday, 20 May 2017 at 08:02:26 UTC, lixiaozi wrote: so, what should i do to disable inlining of ldc2 in release build? As Stefan mentioned, a test case would be nice. But have you tried annotating the offending function

Re: how to disable inlining of ldc2 when 'dub build --build=release'?

2017-05-22 Thread lixiaozi via Digitalmars-d-learn
On Saturday, 20 May 2017 at 08:22:43 UTC, Stefan Koch wrote: On Saturday, 20 May 2017 at 08:08:38 UTC, Johan Engelen wrote: On Saturday, 20 May 2017 at 08:02:26 UTC, lixiaozi wrote: [...] I noticed it's the inline optimization in ldc2 that caused the crash. If you are certain that your code

Re: how to disable inlining of ldc2 when 'dub build --build=release'?

2017-05-22 Thread lixiaozi via Digitalmars-d-learn
On Saturday, 20 May 2017 at 08:08:38 UTC, Johan Engelen wrote: On Saturday, 20 May 2017 at 08:02:26 UTC, lixiaozi wrote: [...] I noticed it's the inline optimization in ldc2 that caused the crash. If you are certain that your code is 100% correct, please file a bug report. Inlining is done

Re: how to disable inlining of ldc2 when 'dub build --build=release'?

2017-05-22 Thread lixiaozi via Digitalmars-d-learn
On Saturday, 20 May 2017 at 08:11:06 UTC, Johan Engelen wrote: On Saturday, 20 May 2017 at 08:02:26 UTC, lixiaozi wrote: Now, I try to disable inlining in "dub.json" like == "dflags":[ "-disable-inlining" ], == but it doesn't work, because then dub calls ldc2 like

Re: how to disable inlining of ldc2 when 'dub build --build=release'?

2017-05-20 Thread Stanislav Blinov via Digitalmars-d-learn
On Saturday, 20 May 2017 at 08:02:26 UTC, lixiaozi wrote: so, what should i do to disable inlining of ldc2 in release build? As Stefan mentioned, a test case would be nice. But have you tried annotating the offending function with pragma(inline, false)?

Re: how to disable inlining of ldc2 when 'dub build --build=release'?

2017-05-20 Thread Stefan Koch via Digitalmars-d-learn
On Saturday, 20 May 2017 at 08:08:38 UTC, Johan Engelen wrote: On Saturday, 20 May 2017 at 08:02:26 UTC, lixiaozi wrote: [...] I noticed it's the inline optimization in ldc2 that caused the crash. If you are certain that your code is 100% correct, please file a bug report. Inlining is done

Re: how to disable inlining of ldc2 when 'dub build --build=release'?

2017-05-20 Thread Johan Engelen via Digitalmars-d-learn
On Saturday, 20 May 2017 at 08:02:26 UTC, lixiaozi wrote: Now, I try to disable inlining in "dub.json" like == "dflags":[ "-disable-inlining" ], == but it doesn't work, because then dub calls ldc2 like this: 'ldc2 -disable-inlining -release -enable-inlining

Re: how to disable inlining of ldc2 when 'dub build --build=release'?

2017-05-20 Thread Johan Engelen via Digitalmars-d-learn
On Saturday, 20 May 2017 at 08:02:26 UTC, lixiaozi wrote: [...] I noticed it's the inline optimization in ldc2 that caused the crash. If you are certain that your code is 100% correct, please file a bug report. Inlining is done by LLVM and it is rare to find an LLVM bug like that (what

how to disable inlining of ldc2 when 'dub build --build=release'?

2017-05-20 Thread lixiaozi via Digitalmars-d-learn
Hi,guys! I recently use ldc2 to compile my project. When using 'dub build --build=release --compiler=ldc2 ',it crashed in a try catch block. After a few tries, I noticed it's the inline optimization in ldc2 that caused the crash. So i manually changed the call of ldc2 to 'ldc2 -release