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

Johan Engelen via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat May 20 01:08:38 PDT 2017


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 architecture are you on, x86?).

> so, what should i do to disable inlining of ldc2 in release 
> build?

You can try disabling inlining of a specific function 
(pragma(inline, false)), or disabling optimization inside a 
function (@optStrategy("none")).

-Johan


More information about the Digitalmars-d-learn mailing list