LDC D Language Compiler

LDC D Language Compiler

github.com

2

About this website

LDC (LLVM D Compiler) is a free and open-source compiler for the D programming language that uses LLVM (Low Level Virtual Machine) as its backend code generator and optimizer. Originally created by Tomas Lindquist Olsen in 2007 as a port of the Digital Mars DMD compiler frontend to LLVM, LDC is one of the three major D compilers (alongside DMD, the reference compiler, and GDC, the GCC-based compiler). Key features: LLVM backend: LDC uses LLVM for code generation, inheriting all of LLVM's optimization passes, target architectures, and debugging information generation. This enables LDC to produce highly optimized machine code for a wide range of platforms including x86, x86_64, ARM, ARM64, PowerPC, MIPS, RISC-V, WebAssembly, and NVPTX (NVIDIA CUDA GPUs). D language support: full support for D language version 2 (D2), including all language features: template metaprogramming, compile-time function execution (CTFE), contract programming (invariants, in/out contracts), scope-based memory management, pure functions, immutable data, and the @safe/@trusted/@system memory safety annotations. Optimization levels: -O0 (no optimization, fastest compilation), -O1 through -O3 (increasing optimization), -Os (optimize for size), and -O5 (aggressive link-time optimization via LLVM LTO). Cross-compilation: LDC supports cross-compilation to any LLVM target from any host, using LLVM target triples and cross-compilation sysroots. BetterC mode: compile D code in a restricted mode that produces C-compatible output without the D runtime, useful for kernel development, embedded systems, and C interoperability. Dynamic compilation: LDC can JIT-compile D code at runtime via the llvm.d module. Profile-guided optimization (PGO). Link-time optimization (LTO). DUB integration: LDC integrates with DUB (D's package manager and build system) for dependency management. Cross-platform: Linux, macOS, Windows, FreeBSD, and many others. BSD/Boost.

Tags & Categories

Statistics

2
Views
0
Clicks
0
Like
0
Dislike

Comments

Log In to post a comment

No comments yet. Be the first!