compiler-explorer: `-flto` does not work with LDC
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…
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 33 (33 by maintainers)
Commits related to this issue
- Fix typo in build-ldc.sh Hopefully fixes issue https://github.com/mattgodbolt/compiler-explorer/issues/438 — committed to JohanEngelen/compiler-explorer-image by JohanEngelen 7 years ago
- Fix typo in build-ldc.sh Hopefully fixes issue https://github.com/mattgodbolt/compiler-explorer/issues/438 — committed to compiler-explorer/clang-builder by JohanEngelen 7 years ago
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 😦
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:
Building LDC is easy. I’ll have a closer look at the clang build script and try to come up with one for LDC. I see the clang script already contains stuff to build the LTO plugin 😃