question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`-flto` does not work with LDC

See original GitHub issue

The cmdline option -flto=thin (or -flto=full) does not work with LDC. https://godbolt.org/g/YokGlg

LDC searches for the required LLVMgold.so plugin in the path and in LDC’s own path. LLVMgold.so has to match or be newer than the LLVM version used to build LDC, so that can become a problem. When LLVM is built with the correct option to build LLVMgold.so, LDC will copy it to its own installation and rename it to include “ldc” in the name and it will take priority over a potential LLVMgold.so in the system path.

The current image downloads the release package of LDC, and these unfortunately don’t include LLVMgold.so (because of potential system incompatibilities…).

Don’t know what would be a good solution here, other than building LLVM+LDC from scratch…

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:33 (33 by maintainers)

github_iconTop GitHub Comments

1reaction
mattgodboltcommented, Feb 11, 2018

Hi @JohanEngelen - just an apology that I haven’t looked in to this still. I know it’s low priority…but…no progress at all is pretty bad! Sorry 😦

1reaction
mattgodboltcommented, Jun 15, 2017

I haven’t pushed the fix yet; sorry. Have pushed it now and fixed some other bits and am re-running 😃

On Thu, Jun 15, 2017 at 2:04 PM Johan Engelen notifications@github.com wrote:

I am a total docker beginner, but if I run docker pull mattgodbolt/clang-builder and then docker run -it mattgodbolt/clang-builder again, the typo $ is still there in build-ldc.sh.

— You are receiving this because you modified the open/close state.

Reply to this email directly, view it on GitHub https://github.com/mattgodbolt/compiler-explorer/issues/438#issuecomment-308837465, or mute the thread https://github.com/notifications/unsubscribe-auth/AAmsdb0rv8LnoHWESoVMqv1_mOWmQ9zUks5sEYAggaJpZM4NkZs1 .

Read more comments on GitHub >

github_iconTop Results From Across the Web

LLD and -flto=thin calls ldc.register_dso multiple times instead ...
When using LLD with -flto=thin, we are running into the problem that each D module's call to ldc.register_dso in llvm.global_ctors is not ......
Read more >
960157 - ldc -flto doesn't find LLVMgold.so automatically
Debian Bug report logs - #960157 ldc -flto doesn't find LLVMgold.so automatically. version graph. Package: ldc; Maintainer for ldc is Debian D ...
Read more >
Link Time Optimization (LTO), C++/D cross-language ...
The good news: LTO does not have the language barrier. Because LTO works at the LLVM IR level and both LDC and Clang...
Read more >
LDC lto generate wrong dll export table - D Programming Language ...
The problem is when link with LDC generate lto object, there is no export table name. ldmd2 -mtriple=x86_64-w64-mingw32 -betterC -flto=full -c ./test.d
Read more >
ldc-developers/main - Gitter
Yeah, -mscrtlib=msvcrt is the dynamic one, so don't blame LDC. ;) ... It's a Windows-based UI tool, but does work well on Linux...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found